diff options
author | neonloop | 2021-03-11 00:59:41 +0000 |
---|---|---|
committer | neonloop | 2021-03-11 00:59:41 +0000 |
commit | 0858fb319e54923deb611536cb6c5ad89a6fc70d (patch) | |
tree | 301faf731f4620d8379a4db65ab29fe7e8499f25 | |
parent | adaecd14d484d309e4d9ba2353ae843ab5213aec (diff) | |
download | snesemu-0858fb319e54923deb611536cb6c5ad89a6fc70d.tar.gz snesemu-0858fb319e54923deb611536cb6c5ad89a6fc70d.tar.bz2 snesemu-0858fb319e54923deb611536cb6c5ad89a6fc70d.zip |
Fixes menu remapping code
-rw-r--r-- | shell/audio/sdl/sound_output.c | 2 | ||||
-rw-r--r-- | shell/menu/menu.c | 34 |
2 files changed, 18 insertions, 18 deletions
diff --git a/shell/audio/sdl/sound_output.c b/shell/audio/sdl/sound_output.c index ae1ab83..0758718 100644 --- a/shell/audio/sdl/sound_output.c +++ b/shell/audio/sdl/sound_output.c @@ -46,7 +46,7 @@ static void sdl_write_buffer(uint8_t* data, int32_t len) SDL_UnlockAudio(); usleep(1000); SDL_LockAudio(); - } + } *(int32_t*)((char*)(buffer + buf_write_pos)) = *(int32_t*)((char*)(data + i)); //memcpy(buffer + buf_write_pos, data + i, 4); buf_write_pos = (buf_write_pos + 4) % BUFFSIZE; diff --git a/shell/menu/menu.c b/shell/menu/menu.c index a23ff59..2ea1636 100644 --- a/shell/menu/menu.c +++ b/shell/menu/menu.c @@ -115,67 +115,67 @@ static const char* Return_Text_Button(uint32_t button) switch(button) { /* UP button */ - case 273: + case SDLK_UP: return "DPAD UP"; break; /* DOWN button */ - case 274: + case SDLK_DOWN: return "DPAD DOWN"; break; /* LEFT button */ - case 276: + case SDLK_LEFT: return "DPAD LEFT"; break; /* RIGHT button */ - case 275: + case SDLK_RIGHT: return "DPAD RIGHT"; break; /* A button */ - case 306: + case SDLK_SPACE: return "A"; break; /* B button */ - case 308: + case SDLK_LCTRL: return "B"; break; /* X button */ - case 304: + case SDLK_LSHIFT: return "X"; break; /* Y button */ - case 32: + case SDLK_LALT: return "Y"; break; /* L button */ - case 9: + case SDLK_TAB: return "L"; break; /* R button */ - case 8: + case SDLK_BACKSPACE: return "R"; break; /* Power button */ - case 279: + case SDLK_END: return "L2"; break; /* Brightness */ - case 51: + case SDLK_3: return "R2"; break; /* Volume - */ - case 38: + case SDLK_AMPERSAND: return "Volume -"; break; /* Volume + */ - case 233: + case SDLK_WORLD_73: return "Volume +"; break; /* Start */ - case 13: + case SDLK_RETURN: return "Start"; break; /* Select */ - case 27: + case SDLK_RCTRL: return "Select"; break; default: @@ -265,7 +265,7 @@ static void Input_Remapping() { if (Event.type == SDL_KEYDOWN) { - if (Event.key.keysym.sym != SDLK_RCTRL) + if (Event.key.keysym.sym != SDLK_ESCAPE) { option.config_buttons[controls_chosen][currentselection - 1] = Event.key.keysym.sym; exit_map = 1; |