[PATCH 18/20] Silence compiler warnings in joystick.c |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- Subject: [PATCH 18/20] Silence compiler warnings in joystick.c
- From: Thomas Huth <huth@xxxxxxxxxxxxx>
- Date: Sat, 3 Feb 2024 18:44:29 +0100
---
src/jaguar/joystick.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/jaguar/joystick.c b/src/jaguar/joystick.c
index ee9abbda..d3eb2118 100644
--- a/src/jaguar/joystick.c
+++ b/src/jaguar/joystick.c
@@ -85,7 +85,7 @@ void JoystickInit(void)
void JoystickExec(void)
{
- uint8 * keystate = SDL_GetKeyboardState(NULL);
+ const uint8 * keystate = SDL_GetKeyboardState(NULL);
memset(joypad_0_buttons, 0, sizeof(joypad_0_buttons));
memset(joypad_1_buttons, 0, sizeof(joypad_1_buttons));
@@ -196,21 +196,12 @@ void JoystickExec(void)
joypad_0_buttons[BUTTON_d] = 0x01;
#endif
-#warning "!!! FIX !!! (debounceRunKey)"
-// extern bool debounceRunKey;
- bool debounceRunKey;
if (keystate[SDL_SCANCODE_ESCAPE])
- {
- if (!debounceRunKey)
- bQuitProgram = true;
- }
- else
- debounceRunKey = false;
+ bQuitProgram = true;
if (keystate[SDL_SCANCODE_TAB])
{
if (!GUIKeyHeld)
-#warning "!!! FIX !!! (showGUI = !showGUI, ...)"
;// showGUI = !showGUI, GUIKeyHeld = true;
}
else
@@ -349,7 +340,7 @@ void JoystickDone(void)
uint8 JoystickReadByte(uint32 offset)
{
-#warning "No bounds checking done in JoystickReadByte!"
+ // TODO: No bounds checking done in JoystickReadByte!
// extern bool hardwareTypeNTSC;
offset &= 0x03;
@@ -442,7 +433,7 @@ void JoystickWriteByte(uint32 offset, uint8 data)
void JoystickWriteWord(uint32 offset, uint16 data)
{
-#warning "No bounds checking done for JoystickWriteWord!"
+ // TODO: No bounds checking done for JoystickWriteWord!
offset &= 0x03;
joystick_ram[offset + 0] = (data >> 8) & 0xFF;
joystick_ram[offset + 1] = data & 0xFF;
--
2.48.1
--MP_/VkVZp1l8MIESxWVe2vPSxV2
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=0019-Silence-compiler-warnings.patch