mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
Hook up solar sensor control to the UI
It uses hardcoded keypad left and right arrows.
This commit is contained in:
@ -38,6 +38,7 @@
|
||||
#include "DlgWifiSettings.h"
|
||||
|
||||
#include "../NDS.h"
|
||||
#include "../GBACart.h"
|
||||
#include "../GPU.h"
|
||||
#include "../SPU.h"
|
||||
#include "../Wifi.h"
|
||||
@ -1291,6 +1292,20 @@ int OnAreaKeyEvent(uiAreaHandler* handler, uiArea* area, uiAreaKeyEvent* evt)
|
||||
{
|
||||
if (evt->Modifiers == 0x0) UndoStateLoad();
|
||||
}
|
||||
else if (evt->Scancode == 0x4B) // Keypad left
|
||||
{
|
||||
if (GBACart::CartInserted && GBACart::HasSolarSensor)
|
||||
{
|
||||
if (GBACart_SolarSensor::LightLevel > 0) GBACart_SolarSensor::LightLevel--;
|
||||
}
|
||||
}
|
||||
else if (evt->Scancode == 0x4D) // Keypad right
|
||||
{
|
||||
if (GBACart::CartInserted && GBACart::HasSolarSensor)
|
||||
{
|
||||
if (GBACart_SolarSensor::LightLevel < 10) GBACart_SolarSensor::LightLevel++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
if (EventMatchesKey(evt, Config::KeyMapping[i], false))
|
||||
|
Reference in New Issue
Block a user