mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
menu: add reset hotkey
This commit is contained in:
parent
e42a47e208
commit
9db6a54485
6 changed files with 9 additions and 2 deletions
|
@ -417,7 +417,7 @@ static void keys_parse_all(FILE *f)
|
||||||
acts = parse_bind_val(val, &type);
|
acts = parse_bind_val(val, &type);
|
||||||
if (acts == -1) {
|
if (acts == -1) {
|
||||||
lprintf("config: unhandled action \"%s\"\n", val);
|
lprintf("config: unhandled action \"%s\"\n", val);
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
mystrip(var + 5);
|
mystrip(var + 5);
|
||||||
|
|
|
@ -1141,6 +1141,8 @@ static void run_events_ui(unsigned int which)
|
||||||
emu_status_msg("SAVE SLOT %i [%s]", state_slot,
|
emu_status_msg("SAVE SLOT %i [%s]", state_slot,
|
||||||
emu_check_save_file(state_slot, NULL) ? "USED" : "FREE");
|
emu_check_save_file(state_slot, NULL) ? "USED" : "FREE");
|
||||||
}
|
}
|
||||||
|
if (which & PEV_RESET)
|
||||||
|
emu_reset_game();
|
||||||
if (which & PEV_MENU)
|
if (which & PEV_MENU)
|
||||||
engineState = PGS_Menu;
|
engineState = PGS_Menu;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#define PEVB_PICO_PNEXT 21
|
#define PEVB_PICO_PNEXT 21
|
||||||
#define PEVB_PICO_PPREV 20
|
#define PEVB_PICO_PPREV 20
|
||||||
#define PEVB_PICO_SWINP 19
|
#define PEVB_PICO_SWINP 19
|
||||||
|
#define PEVB_RESET 18
|
||||||
|
|
||||||
#define PEV_VOL_DOWN (1 << PEVB_VOL_DOWN)
|
#define PEV_VOL_DOWN (1 << PEVB_VOL_DOWN)
|
||||||
#define PEV_VOL_UP (1 << PEVB_VOL_UP)
|
#define PEV_VOL_UP (1 << PEVB_VOL_UP)
|
||||||
|
@ -41,7 +42,8 @@
|
||||||
#define PEV_PICO_PNEXT (1 << PEVB_PICO_PNEXT)
|
#define PEV_PICO_PNEXT (1 << PEVB_PICO_PNEXT)
|
||||||
#define PEV_PICO_PPREV (1 << PEVB_PICO_PPREV)
|
#define PEV_PICO_PPREV (1 << PEVB_PICO_PPREV)
|
||||||
#define PEV_PICO_SWINP (1 << PEVB_PICO_SWINP)
|
#define PEV_PICO_SWINP (1 << PEVB_PICO_SWINP)
|
||||||
|
#define PEV_RESET (1 << PEVB_RESET)
|
||||||
|
|
||||||
#define PEV_MASK 0x7ff80000
|
#define PEV_MASK 0x7ffc0000
|
||||||
|
|
||||||
#endif /* INCLUDE_c48097f3ff2a6a9af1cce8fd7a9b3f0c */
|
#endif /* INCLUDE_c48097f3ff2a6a9af1cce8fd7a9b3f0c */
|
||||||
|
|
|
@ -312,6 +312,7 @@ me_bind_action emuctrl_actions[] =
|
||||||
{ "Volume Down ", PEV_VOL_DOWN },
|
{ "Volume Down ", PEV_VOL_DOWN },
|
||||||
{ "Volume Up ", PEV_VOL_UP },
|
{ "Volume Up ", PEV_VOL_UP },
|
||||||
{ "Fast forward ", PEV_FF },
|
{ "Fast forward ", PEV_FF },
|
||||||
|
{ "Reset Game ", PEV_RESET },
|
||||||
{ "Enter Menu ", PEV_MENU },
|
{ "Enter Menu ", PEV_MENU },
|
||||||
{ "Pico Next page ", PEV_PICO_PNEXT },
|
{ "Pico Next page ", PEV_PICO_PNEXT },
|
||||||
{ "Pico Prev page ", PEV_PICO_PPREV },
|
{ "Pico Prev page ", PEV_PICO_PPREV },
|
||||||
|
|
|
@ -35,6 +35,7 @@ const struct in_default_bind in_sdl_defbinds[] __attribute__((weak)) = {
|
||||||
{ SDLK_RETURN, IN_BINDTYPE_PLAYER12, GBTN_START },
|
{ SDLK_RETURN, IN_BINDTYPE_PLAYER12, GBTN_START },
|
||||||
{ SDLK_f, IN_BINDTYPE_PLAYER12, GBTN_MODE },
|
{ SDLK_f, IN_BINDTYPE_PLAYER12, GBTN_MODE },
|
||||||
{ SDLK_ESCAPE, IN_BINDTYPE_EMU, PEVB_MENU },
|
{ SDLK_ESCAPE, IN_BINDTYPE_EMU, PEVB_MENU },
|
||||||
|
{ SDLK_TAB, IN_BINDTYPE_EMU, PEVB_RESET },
|
||||||
{ SDLK_F1, IN_BINDTYPE_EMU, PEVB_STATE_SAVE },
|
{ SDLK_F1, IN_BINDTYPE_EMU, PEVB_STATE_SAVE },
|
||||||
{ SDLK_F2, IN_BINDTYPE_EMU, PEVB_STATE_LOAD },
|
{ SDLK_F2, IN_BINDTYPE_EMU, PEVB_STATE_LOAD },
|
||||||
{ SDLK_F3, IN_BINDTYPE_EMU, PEVB_SSLOT_PREV },
|
{ SDLK_F3, IN_BINDTYPE_EMU, PEVB_SSLOT_PREV },
|
||||||
|
|
|
@ -74,6 +74,7 @@ static struct in_default_bind in_evdev_defbinds[] =
|
||||||
{ KEY_S, IN_BINDTYPE_PLAYER12, GBTN_B },
|
{ KEY_S, IN_BINDTYPE_PLAYER12, GBTN_B },
|
||||||
{ KEY_D, IN_BINDTYPE_PLAYER12, GBTN_C },
|
{ KEY_D, IN_BINDTYPE_PLAYER12, GBTN_C },
|
||||||
{ KEY_ENTER, IN_BINDTYPE_PLAYER12, GBTN_START },
|
{ KEY_ENTER, IN_BINDTYPE_PLAYER12, GBTN_START },
|
||||||
|
{ KEY_R, IN_BINDTYPE_EMU, PEVB_RESET },
|
||||||
{ KEY_F, IN_BINDTYPE_EMU, PEVB_FF },
|
{ KEY_F, IN_BINDTYPE_EMU, PEVB_FF },
|
||||||
{ KEY_BACKSPACE,IN_BINDTYPE_EMU, PEVB_FF },
|
{ KEY_BACKSPACE,IN_BINDTYPE_EMU, PEVB_FF },
|
||||||
{ KEY_BACKSLASH,IN_BINDTYPE_EMU, PEVB_MENU },
|
{ KEY_BACKSLASH,IN_BINDTYPE_EMU, PEVB_MENU },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue