mirror of https://github.com/bsnes-emu/bsnes.git
That code made very little sense
This commit is contained in:
parent
fcbbecea17
commit
75d3470d55
14
SDL/gui.c
14
SDL/gui.c
|
@ -921,10 +921,7 @@ static const struct menu_item controls_menu[] = {
|
||||||
|
|
||||||
static const char *key_name(unsigned index)
|
static const char *key_name(unsigned index)
|
||||||
{
|
{
|
||||||
if (index >= 8) {
|
if (index > 8) {
|
||||||
if (index == 8) {
|
|
||||||
return SDL_GetScancodeName(configuration.keys[8]);
|
|
||||||
}
|
|
||||||
return SDL_GetScancodeName(configuration.keys_2[index - 9]);
|
return SDL_GetScancodeName(configuration.keys_2[index - 9]);
|
||||||
}
|
}
|
||||||
return SDL_GetScancodeName(configuration.keys[index]);
|
return SDL_GetScancodeName(configuration.keys[index]);
|
||||||
|
@ -1376,13 +1373,8 @@ void run_gui(bool is_running)
|
||||||
|
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
if (gui_state == WAITING_FOR_KEY) {
|
if (gui_state == WAITING_FOR_KEY) {
|
||||||
if (current_selection >= 8) {
|
if (current_selection > 8) {
|
||||||
if (current_selection == 8) {
|
configuration.keys_2[current_selection - 9] = event.key.keysym.scancode;
|
||||||
configuration.keys[8] = event.key.keysym.scancode;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
configuration.keys_2[current_selection - 9] = event.key.keysym.scancode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
configuration.keys[current_selection] = event.key.keysym.scancode;
|
configuration.keys[current_selection] = event.key.keysym.scancode;
|
||||||
|
|
Loading…
Reference in New Issue