DSi power button and volume switch support (#1630)

* Add proper BPTWL interrupts

* Added DSi power button and volume switch hotkeys

* Added hardware reset workaround

* Adjusted syntax to follow guidelines

* Added DSi output volume synchronization

* Fix trivial member function error
This commit is contained in:
Ed_IT
2023-04-04 12:31:58 +02:00
committed by GitHub
parent 350292fb3c
commit 613280d3b4
12 changed files with 534 additions and 22 deletions

View File

@ -118,6 +118,7 @@ bool SavestateRelocSRAM;
int AudioInterp;
int AudioBitrate;
int AudioVolume;
bool DSiVolumeSync;
int MicInputType;
std::string MicWavPath;
@ -187,6 +188,9 @@ ConfigEntry ConfigFile[] =
{"HKKey_SolarSensorDecrease", 0, &HKKeyMapping[HK_SolarSensorDecrease], -1, true},
{"HKKey_SolarSensorIncrease", 0, &HKKeyMapping[HK_SolarSensorIncrease], -1, true},
{"HKKey_FrameStep", 0, &HKKeyMapping[HK_FrameStep], -1, true},
{"HKKey_PowerButton", 0, &HKKeyMapping[HK_PowerButton], -1, true},
{"HKKey_VolumeUp", 0, &HKKeyMapping[HK_VolumeUp], -1, true},
{"HKKey_VolumeDown", 0, &HKKeyMapping[HK_VolumeDown], -1, true},
{"HKJoy_Lid", 0, &HKJoyMapping[HK_Lid], -1, true},
{"HKJoy_Mic", 0, &HKJoyMapping[HK_Mic], -1, true},
@ -200,6 +204,9 @@ ConfigEntry ConfigFile[] =
{"HKJoy_SolarSensorDecrease", 0, &HKJoyMapping[HK_SolarSensorDecrease], -1, true},
{"HKJoy_SolarSensorIncrease", 0, &HKJoyMapping[HK_SolarSensorIncrease], -1, true},
{"HKJoy_FrameStep", 0, &HKJoyMapping[HK_FrameStep], -1, true},
{"HKJoy_PowerButton", 0, &HKJoyMapping[HK_PowerButton], -1, true},
{"HKJoy_VolumeUp", 0, &HKJoyMapping[HK_VolumeUp], -1, true},
{"HKJoy_VolumeDown", 0, &HKJoyMapping[HK_VolumeDown], -1, true},
{"JoystickID", 0, &JoystickID, 0, true},
@ -291,6 +298,7 @@ ConfigEntry ConfigFile[] =
{"AudioInterp", 0, &AudioInterp, 0, false},
{"AudioBitrate", 0, &AudioBitrate, 0, false},
{"AudioVolume", 0, &AudioVolume, 256, true},
{"DSiVolumeSync", 0, &DSiVolumeSync, 0, true},
{"MicInputType", 0, &MicInputType, 1, false},
{"MicWavPath", 2, &MicWavPath, (std::string)"", false},