mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-05 18:07:01 +00:00
(PS3) Use identical TIMER macros as 360
This commit is contained in:
parent
6e8e5ec89b
commit
ae4b8563c8
18
ps3/menu.c
18
ps3/menu.c
@ -198,7 +198,7 @@ static void set_delay_speed(unsigned delaymode)
|
||||
}
|
||||
|
||||
strlcpy(special_action_msg, "", sizeof(special_action_msg));
|
||||
SET_TIMER_EXPIRATION(g_console.control_timer_expiration_frame_count, speed);
|
||||
SET_TIMER_EXPIRATION(gl, speed);
|
||||
}
|
||||
|
||||
static void browser_update(filebrowser_t * b)
|
||||
@ -210,7 +210,7 @@ static void browser_update(filebrowser_t * b)
|
||||
diff_state = old_state ^ state;
|
||||
button_was_pressed = old_state & diff_state;
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
set_delay = DELAY_NONE;
|
||||
|
||||
@ -889,7 +889,7 @@ static void select_file(uint32_t menu_id)
|
||||
|
||||
browser_update(&tmpBrowser);
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
if (CTRL_START(button_was_pressed))
|
||||
filebrowser_reset_start_directory(&tmpBrowser, "/", extensions);
|
||||
@ -989,7 +989,7 @@ static void select_directory(uint32_t menu_id)
|
||||
|
||||
browser_update(&tmpBrowser);
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
if (CTRL_START(button_was_pressed))
|
||||
filebrowser_reset_start_directory(&tmpBrowser, "/","empty");
|
||||
@ -1836,7 +1836,7 @@ static void select_setting(menu * menu_obj)
|
||||
diff_state = old_state ^ state;
|
||||
button_was_pressed = old_state & diff_state;
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
set_delay = DELAY_NONE;
|
||||
/* back to ROM menu if CIRCLE is pressed */
|
||||
@ -1942,7 +1942,7 @@ static void select_rom(void)
|
||||
|
||||
browser_update(&browser);
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
if (CTRL_SELECT(button_was_pressed))
|
||||
{
|
||||
@ -2054,7 +2054,7 @@ static void ingame_menu(uint32_t menu_id)
|
||||
stuck_in_loop = 1;
|
||||
blocking = 0;
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count) && blocking == false)
|
||||
if(IS_TIMER_EXPIRED(gl) && blocking == false)
|
||||
{
|
||||
set_delay = DELAY_NONE;
|
||||
|
||||
@ -2621,7 +2621,7 @@ void menu_loop(void)
|
||||
}
|
||||
|
||||
|
||||
if(IS_TIMER_EXPIRED(g_console.control_timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
// if we want to force goto the emulation loop, skip this
|
||||
if(g_console.mode_switch != MODE_EMULATION)
|
||||
@ -2650,7 +2650,7 @@ void menu_loop(void)
|
||||
// press and holding L3 + R3 in the emulation loop (lasts for 30 frame ticks)
|
||||
if(g_console.mode_switch == MODE_EMULATION && !g_console.frame_advance_enable)
|
||||
{
|
||||
SET_TIMER_EXPIRATION(g_console.timer_expiration_frame_count, 30);
|
||||
SET_TIMER_EXPIRATION(gl, 30);
|
||||
}
|
||||
|
||||
gfx_ctx_swap_buffers();
|
||||
|
@ -316,18 +316,18 @@ static bool ps3_key_pressed(void *data, int key)
|
||||
case RARCH_REWIND:
|
||||
return CTRL_RSTICK_UP(state[0]) && CTRL_R2(~state[0]);
|
||||
case RARCH_QUIT_KEY:
|
||||
if(IS_TIMER_EXPIRED(g_console.timer_expiration_frame_count))
|
||||
if(IS_TIMER_EXPIRED(gl))
|
||||
{
|
||||
uint32_t r3_pressed = CTRL_R3(state[0]);
|
||||
uint32_t l3_pressed = CTRL_L3(state[0]);
|
||||
bool retval = false;
|
||||
g_console.menu_enable = (r3_pressed && l3_pressed && IS_TIMER_EXPIRED(g_console.timer_expiration_frame_count));
|
||||
g_console.menu_enable = (r3_pressed && l3_pressed && IS_TIMER_EXPIRED(gl));
|
||||
g_console.ingame_menu_enable = r3_pressed && !l3_pressed;
|
||||
|
||||
if(g_console.menu_enable || (g_console.ingame_menu_enable && !g_console.menu_enable))
|
||||
{
|
||||
g_console.mode_switch = MODE_MENU;
|
||||
SET_TIMER_EXPIRATION(g_console.control_timer_expiration_frame_count, 30);
|
||||
SET_TIMER_EXPIRATION(gl, 30);
|
||||
retval = g_console.menu_enable;
|
||||
}
|
||||
|
||||
|
@ -32,10 +32,6 @@ enum
|
||||
#define MIN_SCALING_FACTOR (1.0f)
|
||||
#define MAX_SCALING_FACTOR (4.0f)
|
||||
|
||||
#define IS_TIMER_NOT_EXPIRED(getter) (gl->frame_count < getter)
|
||||
#define IS_TIMER_EXPIRED(getter) (!(IS_TIMER_NOT_EXPIRED(getter)))
|
||||
#define SET_TIMER_EXPIRATION(setter, value) setter = gl->frame_count + value;
|
||||
|
||||
const char * ps3_get_resolution_label(uint32_t resolution);
|
||||
int ps3_check_resolution(uint32_t resolution_id);
|
||||
void ps3_previous_resolution (void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user