mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 00:32:49 +00:00
(PS3) Frame advance implemented
This commit is contained in:
parent
2148ce9dec
commit
ffc0c1d77e
@ -173,6 +173,7 @@ struct console_settings
|
|||||||
bool block_config_read;
|
bool block_config_read;
|
||||||
bool default_sram_dir_enable;
|
bool default_sram_dir_enable;
|
||||||
bool default_savestate_dir_enable;
|
bool default_savestate_dir_enable;
|
||||||
|
bool frame_advance_enable;
|
||||||
bool initialize_ssnes_enable;
|
bool initialize_ssnes_enable;
|
||||||
bool ingame_menu_enable;
|
bool ingame_menu_enable;
|
||||||
bool menu_enable;
|
bool menu_enable;
|
||||||
|
10
ps3/main.c
10
ps3/main.c
@ -62,7 +62,6 @@ char DEFAULT_SHADER_FILE[MAX_PATH_LENGTH];
|
|||||||
char DEFAULT_MENU_SHADER_FILE[MAX_PATH_LENGTH];
|
char DEFAULT_MENU_SHADER_FILE[MAX_PATH_LENGTH];
|
||||||
char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
|
char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
|
||||||
char MULTIMAN_GAME_TO_BOOT[MAX_PATH_LENGTH];
|
char MULTIMAN_GAME_TO_BOOT[MAX_PATH_LENGTH];
|
||||||
static bool frame_advance_disabled = true;
|
|
||||||
|
|
||||||
int ssnes_main(int argc, char *argv[]);
|
int ssnes_main(int argc, char *argv[]);
|
||||||
|
|
||||||
@ -148,6 +147,7 @@ static void set_default_settings(void)
|
|||||||
|
|
||||||
// g_console
|
// g_console
|
||||||
g_console.block_config_read = true;
|
g_console.block_config_read = true;
|
||||||
|
g_console.frame_advance_enable = false;
|
||||||
g_console.emulator_initialized = 0;
|
g_console.emulator_initialized = 0;
|
||||||
g_console.screenshots_enable = false;
|
g_console.screenshots_enable = false;
|
||||||
g_console.throttle_enable = true;
|
g_console.throttle_enable = true;
|
||||||
@ -384,7 +384,7 @@ static void ingame_menu(void)
|
|||||||
{
|
{
|
||||||
if(CTRL_CIRCLE(state))
|
if(CTRL_CIRCLE(state))
|
||||||
{
|
{
|
||||||
frame_advance_disabled = true;
|
g_console.frame_advance_enable = false;
|
||||||
ingame_menu_item = 0;
|
ingame_menu_item = 0;
|
||||||
g_console.ingame_menu_enable = false;
|
g_console.ingame_menu_enable = false;
|
||||||
g_console.mode_switch = MODE_EMULATION;
|
g_console.mode_switch = MODE_EMULATION;
|
||||||
@ -554,7 +554,7 @@ static void ingame_menu(void)
|
|||||||
case MENU_ITEM_FRAME_ADVANCE:
|
case MENU_ITEM_FRAME_ADVANCE:
|
||||||
if(CTRL_CROSS(state) || CTRL_R2(state) || CTRL_L2(state))
|
if(CTRL_CROSS(state) || CTRL_R2(state) || CTRL_L2(state))
|
||||||
{
|
{
|
||||||
frame_advance_disabled = false;
|
g_console.frame_advance_enable = true;
|
||||||
ingame_menu_item = MENU_ITEM_FRAME_ADVANCE;
|
ingame_menu_item = MENU_ITEM_FRAME_ADVANCE;
|
||||||
g_console.ingame_menu_enable = false;
|
g_console.ingame_menu_enable = false;
|
||||||
g_console.mode_switch = MODE_EMULATION;
|
g_console.mode_switch = MODE_EMULATION;
|
||||||
@ -580,7 +580,7 @@ static void ingame_menu(void)
|
|||||||
case MENU_ITEM_RETURN_TO_GAME:
|
case MENU_ITEM_RETURN_TO_GAME:
|
||||||
if(CTRL_CROSS(button_was_pressed))
|
if(CTRL_CROSS(button_was_pressed))
|
||||||
{
|
{
|
||||||
frame_advance_disabled = true;
|
g_console.frame_advance_enable = false;
|
||||||
ingame_menu_item = 0;
|
ingame_menu_item = 0;
|
||||||
g_console.ingame_menu_enable = false;
|
g_console.ingame_menu_enable = false;
|
||||||
g_console.mode_switch = MODE_EMULATION;
|
g_console.mode_switch = MODE_EMULATION;
|
||||||
@ -791,7 +791,7 @@ begin_loop:
|
|||||||
|
|
||||||
do{
|
do{
|
||||||
repeat = ssnes_main_iterate();
|
repeat = ssnes_main_iterate();
|
||||||
}while(repeat && frame_advance_disabled);
|
}while(repeat && !g_console.frame_advance_enable);
|
||||||
|
|
||||||
g_extern.is_paused = true;
|
g_extern.is_paused = true;
|
||||||
if(g_console.ingame_menu_enable)
|
if(g_console.ingame_menu_enable)
|
||||||
|
@ -100,6 +100,14 @@ static bool ps3_key_pressed(void *data, int key)
|
|||||||
return (CTRL_RSTICK_RIGHT(state[0]) && CTRL_R2(state[0]));
|
return (CTRL_RSTICK_RIGHT(state[0]) && CTRL_R2(state[0]));
|
||||||
case SSNES_STATE_SLOT_MINUS:
|
case SSNES_STATE_SLOT_MINUS:
|
||||||
return (CTRL_RSTICK_LEFT(state[0]) && CTRL_R2(state[0]));
|
return (CTRL_RSTICK_LEFT(state[0]) && CTRL_R2(state[0]));
|
||||||
|
case SSNES_FRAMEADVANCE:
|
||||||
|
if(g_console.frame_advance_enable)
|
||||||
|
{
|
||||||
|
g_console.menu_enable = false;
|
||||||
|
g_console.ingame_menu_enable = true;
|
||||||
|
g_console.mode_switch = MODE_EMULATION;
|
||||||
|
}
|
||||||
|
return g_console.frame_advance_enable;
|
||||||
case SSNES_REWIND:
|
case SSNES_REWIND:
|
||||||
return CTRL_RSTICK_UP(state[0]) && CTRL_R2(~state[0]);
|
return CTRL_RSTICK_UP(state[0]) && CTRL_R2(~state[0]);
|
||||||
case SSNES_QUIT_KEY:
|
case SSNES_QUIT_KEY:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user