mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
(PS3/Core) Make reset into an extern function so it can be called
from port-specific code
This commit is contained in:
parent
a509d40bf6
commit
02c3977e9d
@ -388,6 +388,7 @@ void config_set_defaults(void);
|
||||
bool config_load_file(const char *path);
|
||||
#endif
|
||||
|
||||
void perform_reset(void);
|
||||
void ssnes_main_clear_state(void);
|
||||
int ssnes_main_init(int argc, char *argv[]);
|
||||
bool ssnes_main_iterate(void);
|
||||
|
@ -521,6 +521,7 @@ static void ingame_menu(void)
|
||||
ingame_menu_item = 0;
|
||||
g_console.ingame_menu_enable = false;
|
||||
mode_switch = MODE_EMULATION;
|
||||
perform_reset();
|
||||
}
|
||||
ingame_menu_reset_entry_colors (ingame_menu_item);
|
||||
strcpy(comment, "Press 'CROSS' to reset the game.");
|
||||
|
17
ssnes.c
17
ssnes.c
@ -1847,18 +1847,21 @@ static void check_oneshot(void)
|
||||
old_rewind_state = new_rewind_state;
|
||||
}
|
||||
|
||||
void perform_reset(void)
|
||||
{
|
||||
SSNES_LOG("Resetting game!\n");
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
msg_queue_push(g_extern.msg_queue, "Reset!", 1, 120);
|
||||
psnes_reset();
|
||||
init_controllers(); // bSNES since v073r01 resets controllers to JOYPAD after a reset, so just enforce it here.
|
||||
}
|
||||
|
||||
static void check_reset(void)
|
||||
{
|
||||
static bool old_state = false;
|
||||
bool new_state = driver.input->key_pressed(driver.input_data, SSNES_RESET);
|
||||
if (new_state && !old_state)
|
||||
{
|
||||
SSNES_LOG("Resetting game!\n");
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
msg_queue_push(g_extern.msg_queue, "Reset!", 1, 120);
|
||||
psnes_reset();
|
||||
init_controllers(); // bSNES since v073r01 resets controllers to JOYPAD after a reset, so just enforce it here.
|
||||
}
|
||||
perform_reset();
|
||||
|
||||
old_state = new_state;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user