Skip to content

Commit 2bec6c2

Browse files
authored
Merge branch 'develop' into profiles_branch
2 parents 934fc87 + 4db612c commit 2bec6c2

18 files changed

Lines changed: 95 additions & 34 deletions

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ dist: all
3636

3737
cp -r exefs_patches dist/atmosphere/
3838

39-
mkdir -p dist/atmosphere/config_templates
40-
cp mc_mitm/config.ini dist/atmosphere/config_templates/missioncontrol.ini
39+
mkdir -p dist/config/MissionControl
40+
cp mc_mitm/config.ini dist/config/MissionControl/missioncontrol.ini.template
4141

42-
mkdir -p dist/switch/missioncontrol/profiles
43-
cp mc_mitm/default.ini dist/switch/missioncontrol/profiles/default.ini
42+
mkdir -p dist/config/MissionControl/profiles
43+
cp mc_mitm/default.ini dist/config/MissionControl/profiles/default.ini
4444

4545
cd dist; zip -r $(PROJECT_NAME)-$(BUILD_VERSION).zip ./*; cd ../;
4646

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Use controllers from other consoles natively on your Nintendo Switch via Bluetoo
2424
* Rumble support*
2525
* Low input lag.
2626
* Spoofing of host Bluetooth adapter name and address.
27-
* `btdrv.mitm` module adds extension IPC commands that can be used to interact with the `bluetooth` process without interfering with the state of the system.
27+
* `mc.mitm` module adds extension IPC commands that can be used to interact with the `bluetooth` process without interfering with the state of the system.
2828

2929
**Rumble not currently implemented for all compatible controllers*
3030

@@ -75,7 +75,7 @@ Use controllers from other consoles natively on your Nintendo Switch via Bluetoo
7575
Download the [latest release](https://github.com/ndeadly/MissionControl/releases) .zip and extract to the root of your SD card, allowing the folders to merge and overwriting any existing files. A console reboot is required in order for Mission Control to become active.
7676

7777
***IMPORTANT:
78-
Atmosphère >= 0.19.3 is required to run the latest release of Mission Control. Using an older Atmosphère version will cause Mission Control to crash the system on boot.
78+
Atmosphère >= 0.19.5 is required to run the latest release of Mission Control. Using an older Atmosphère version will cause Mission Control to crash the system on boot.
7979
Users upgrading from version 0.1.0 of Mission Control are also advised to wipe their pairing database and re-pair controllers running the latest version. Failure to wipe the old entries may result in non-switch controllers being detected incorrectly.***
8080

8181
### Usage
@@ -104,6 +104,20 @@ You should also ensure your controller firmware is up to date, as old firmwares
104104
***Other Controllers***
105105
Please refer to your controller's user manual for information on how to put it in sync mode. Note that many generic Bluetooth controllers can be started in one of several modes. Usually you want to choose something like HID, PC or Android mode for it to work correctly.
106106

107+
### Module configuration
108+
109+
A template for the config .ini file will be installed to `/config/MissionControl/missioncontrol.ini.template`. To modify the default module settings, copy the template to `/config/MissionControl/missioncontrol.ini` and uncomment/modify any settings you want to change. The file is only parsed on startup, so any changes you make will require a reboot to take effect. Currently there is only a small set of configuration settings, but this will be expanded upon in future releases.
110+
111+
- `[general]`
112+
These are general settings for mission control features.
113+
- `enable_rumble` Enables/disables rumble support for unofficial controllers.
114+
- `enable_motion` Enables/disables motion controls support. Not currently used
115+
116+
- `[bluetooth]`
117+
These settings can be used to spoof your switch bluetooth to appear as another device. This may be useful (in conjunction with a link key) if you want to use your controller across multiple devices without having to re-pair every time you switch. Note that changing these settings will invalidate your console information stored in any previously paired controllers and will require re-pairing.
118+
- `host_name` Override the bluetooth host adapter name
119+
- `host_address` Override the bluetooth host adapter address
120+
107121
### Removal
108122

109123
To functionally uninstall Mission Control and its components, all that needs to be done is to delete the following directories from your SD card and reboot your console.
@@ -113,9 +127,8 @@ To functionally uninstall Mission Control and its components, all that needs to
113127

114128
If you wish to completely remove all traces of the software ever having been installed (telemetry excepted), you may also want to follow these additional steps
115129

116-
* Remove the following files from your SD card (if present)
117-
* `/atmosphere/config_templates/missioncontrol.ini`
118-
* `/atmosphere/config/missioncontrol.ini`
130+
* Remove the following directory from your SD card
131+
* `/config/MissionControl`
119132

120133
* Wipe the Bluetooth pairing database via `System Settings->Controllers and Sensors->Disconnect Controllers`
121134

@@ -217,7 +230,7 @@ git clone --recurse-submodules https://github.com/ndeadly/MissionControl.git
217230
cd MissionControl
218231
```
219232

220-
~~Mission Control currently uses a custom fork of `libnx` that adds Bluetooth service wrappers and type definitions.~~ Official libnx master is now used to build Mission Control. This needs to be built and installed first.
233+
~~Mission Control currently uses a custom fork of `libnx` that adds Bluetooth service wrappers and type definitions.~~ Official libnx master is now used to build Mission Control. At the time of writing, the libnx distributed by devkitPro can be used without the need to build it yourself. This may change if `Atmosphere-libs` updates to use bleeding edge `libnx` commits not present in the official release. In any case, you can build the included `libnx` submodule from source with the following commands.
221234

222235
```
223236
cd lib/libnx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mc_mitm/source/bluetooth_mitm/btdrv_mitm_service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ namespace ams::mitm::bluetooth {
119119

120120
Result BtdrvMitmService::SetTsi(ams::bluetooth::Address address, u8 tsi) {
121121
auto device = controller::LocateHandler(&address);
122-
if (!device || device->IsOfficialController())
122+
if (!device || device->SupportsSetTsiCommand())
123123
return sm::mitm::ResultShouldForwardToSession();
124124

125125
if (hos::GetVersion() < hos::Version_9_0_0) {

mc_mitm/source/controllers/dualshock4_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ namespace ams::controller {
164164
}
165165

166166
Result Dualshock4Controller::PushRumbleLedState(void) {
167-
Dualshock4OutputReport0x11 report = {0xa2, 0x11, 0xc0, 0x20, 0xf3, 0x04, 0x00,
167+
Dualshock4OutputReport0x11 report = {0xa2, 0x11, static_cast<uint8_t>(0xc0 | (m_report_rate & 0xff)), 0x20, 0xf3, 0x04, 0x00,
168168
m_rumble_state.amp_motor_right, m_rumble_state.amp_motor_left,
169169
m_led_colour.r, m_led_colour.g, m_led_colour.b
170170
};

0 commit comments

Comments
 (0)