diff options
author | Raphaël Zumer <rzumer@tebako.net> | 2019-12-10 19:24:28 -0500 |
---|---|---|
committer | Raphaël Zumer <rzumer@tebako.net> | 2019-12-10 19:24:30 -0500 |
commit | f8e43ac486aa7bbc9ebfdbd23b959f0fa163c51d (patch) | |
tree | 61d3b98ad3cae7ef9adfbd746be77fedc4c6e426 /src | |
parent | f257b007a250e33ecc7a86c7447ccf049964dd8d (diff) |
Display solar sensor level changes on OSD
Diffstat (limited to 'src')
-rw-r--r-- | src/libui_sdl/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index d2a38f2..a96b77a 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -1297,7 +1297,9 @@ int OnAreaKeyEvent(uiAreaHandler* handler, uiArea* area, uiAreaKeyEvent* evt) if (GBACart::CartInserted && GBACart::HasSolarSensor) { if (GBACart_SolarSensor::LightLevel > 0) GBACart_SolarSensor::LightLevel--; - printf("Solar sensor level set to %d\n", GBACart_SolarSensor::LightLevel); + char msg[64]; + sprintf(msg, "Solar sensor level set to %d", GBACart_SolarSensor::LightLevel); + OSD::AddMessage(0, msg); } } else if (evt->Scancode == 0x4D) // Keypad right @@ -1305,7 +1307,9 @@ int OnAreaKeyEvent(uiAreaHandler* handler, uiArea* area, uiAreaKeyEvent* evt) if (GBACart::CartInserted && GBACart::HasSolarSensor) { if (GBACart_SolarSensor::LightLevel < 10) GBACart_SolarSensor::LightLevel++; - printf("Solar sensor level set to %d\n", GBACart_SolarSensor::LightLevel); + char msg[64]; + sprintf(msg, "Solar sensor level set to %d", GBACart_SolarSensor::LightLevel); + OSD::AddMessage(0, msg); } } |