diff options
author | Arisotura <thetotalworm@gmail.com> | 2021-04-25 00:48:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 00:48:02 +0200 |
commit | 1846a712659ed31357e8ae795055dace0bdd951d (patch) | |
tree | a11c1bf2c0b61ee787dac81eec6d7f35fbcace63 /src/frontend/qt_sdl/main.cpp | |
parent | ede6e832d84b9d4b1117ee480122480a7c540509 (diff) |
Cart refactor (#1073)
complete cart-interface refactor, will make this code a lot easier to deal with
Diffstat (limited to 'src/frontend/qt_sdl/main.cpp')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 16399d3..9046d3d 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -382,7 +382,7 @@ void EmuThread::run() if (Input::HotkeyPressed(HK_SwapScreens)) emit swapScreensToggle(); - if (GBACart::CartInserted && GBACart::HasSolarSensor) + /*if (GBACart::CartInserted && GBACart::HasSolarSensor) { if (Input::HotkeyPressed(HK_SolarSensorDecrease)) { @@ -398,6 +398,26 @@ void EmuThread::run() sprintf(msg, "Solar sensor level set to %d", GBACart_SolarSensor::LightLevel); OSD::AddMessage(0, msg); } + }*/ + if (Input::HotkeyPressed(HK_SolarSensorDecrease)) + { + int level = GBACart::SetInput(GBACart::Input_SolarSensorDown, true); + if (level != -1) + { + char msg[64]; + sprintf(msg, "Solar sensor level: %d", level); + OSD::AddMessage(0, msg); + } + } + if (Input::HotkeyPressed(HK_SolarSensorIncrease)) + { + int level = GBACart::SetInput(GBACart::Input_SolarSensorUp, true); + if (level != -1) + { + char msg[64]; + sprintf(msg, "Solar sensor level: %d", level); + OSD::AddMessage(0, msg); + } } if (EmuRunning == 1) |