aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/Util_ROM.cpp2
-rw-r--r--src/frontend/qt_sdl/main.cpp22
2 files changed, 22 insertions, 2 deletions
diff --git a/src/frontend/Util_ROM.cpp b/src/frontend/Util_ROM.cpp
index b5e8a05..40552e2 100644
--- a/src/frontend/Util_ROM.cpp
+++ b/src/frontend/Util_ROM.cpp
@@ -561,7 +561,7 @@ int Reset()
if (ROMPath[ROMSlot_GBA][0] != '\0')
{
char ext[5] = {0}; int _len = strlen(ROMPath[ROMSlot_GBA]);
- strncpy(ext, ROMPath[ROMSlot_NDS] + _len - 4, 4);
+ strncpy(ext, ROMPath[ROMSlot_GBA] + _len - 4, 4);
if(!strncmp(ext, ".gba", 4))
{
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)