X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=input.c;h=4917094b3cfcbf03617a1271cc098e812c46f758;hb=e38fee1b96c0b904d7f221a349fb2492258d5789;hp=4b908bb2e320efdabbfb2645f81a8336d0763920;hpb=43c24b301dc8c0c5952e1d22bad865f4304d01f8;p=gpsp.git diff --git a/input.c b/input.c index 4b908bb..4917094 100644 --- a/input.c +++ b/input.c @@ -24,7 +24,6 @@ void trigger_key(u32 key) { u32 p1_cnt = io_registers[REG_P1CNT]; - u32 p1; if((p1_cnt >> 14) & 0x01) { @@ -454,7 +453,7 @@ u32 update_input() handled_buttons = (last_buttons ^ buttons) & buttons; last_buttons = buttons; - for(i = 0; i < 16; i++) + for(i = 0; i < PLAT_BUTTON_COUNT; i++) { if(handled_buttons & button_plat_mask_to_config[i]) button_id = gamepad_config_map[i]; @@ -474,7 +473,7 @@ u32 update_input() case BUTTON_ID_LOADSTATE: { - u8 current_savestate_filename[512]; + char current_savestate_filename[512]; get_savestate_filename_noshot(savestate_slot, current_savestate_filename); load_state(current_savestate_filename); @@ -483,7 +482,7 @@ u32 update_input() case BUTTON_ID_SAVESTATE: { - u8 current_savestate_filename[512]; + char current_savestate_filename[512]; u16 *current_screen = copy_screen(); get_savestate_filename_noshot(savestate_slot, current_savestate_filename); @@ -670,6 +669,9 @@ gui_action_type get_gui_input() case SDLK_BACKSPACE: gui_action = CURSOR_BACK; break; + + default: + break; } break; } @@ -742,7 +744,7 @@ u32 update_input() if(event.key.keysym.sym == SDLK_F5) { - u8 current_savestate_filename[512]; + char current_savestate_filename[512]; u16 *current_screen = copy_screen(); get_savestate_filename_noshot(savestate_slot, current_savestate_filename); @@ -753,7 +755,7 @@ u32 update_input() if(event.key.keysym.sym == SDLK_F7) { - u8 current_savestate_filename[512]; + char current_savestate_filename[512]; get_savestate_filename_noshot(savestate_slot, current_savestate_filename); load_state(current_savestate_filename);