mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-06 08:48:20 +00:00
(PS3) Don't use global g_quitting anymore
This commit is contained in:
parent
9e50b0a8bb
commit
87e850ea08
@ -43,3 +43,21 @@ void gfx_ctx_set_swap_interval(unsigned interval, bool inited)
|
||||
if (!success)
|
||||
RARCH_WARN("Failed to set swap interval.\n");
|
||||
}
|
||||
|
||||
void gfx_ctx_check_window(bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
|
||||
{
|
||||
*quit = false;
|
||||
*resize = false;
|
||||
gl_t *gl = driver.video_data;
|
||||
|
||||
#ifdef HAVE_SYSUTILS
|
||||
cellSysutilCheckCallback();
|
||||
#endif
|
||||
|
||||
if(gl->quitting)
|
||||
*quit = true;
|
||||
|
||||
if(gl->should_resize)
|
||||
*resize = true;
|
||||
}
|
||||
|
@ -320,12 +320,13 @@ static void callback_sysutil_exit(uint64_t status, uint64_t param, void *userdat
|
||||
{
|
||||
(void) param;
|
||||
(void) userdata;
|
||||
gl_t *gl = driver.video_data;
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case CELL_SYSUTIL_REQUEST_EXITGAME:
|
||||
g_console.menu_enable = false;
|
||||
g_quitting = true;
|
||||
gl->quitting = true;
|
||||
g_console.ingame_menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
break;
|
||||
|
@ -110,7 +110,6 @@ struct {
|
||||
CellVideoOutState g_video_state;
|
||||
} ps3_gl;
|
||||
|
||||
bool g_quitting;
|
||||
unsigned g_frame_count;
|
||||
void *g_gl;
|
||||
|
||||
@ -621,6 +620,20 @@ static inline void set_texture_coords(GLfloat *coords, GLfloat xamt, GLfloat yam
|
||||
coords[7] = yamt;
|
||||
}
|
||||
|
||||
static void check_window(gl_t *gl)
|
||||
{
|
||||
bool quit, resize;
|
||||
|
||||
gfx_ctx_check_window(&quit,
|
||||
&resize, &gl->win_width, &gl->win_height,
|
||||
gl->frame_count);
|
||||
|
||||
if (quit)
|
||||
gl->quitting = true;
|
||||
else if (resize)
|
||||
gl->should_resize = true;
|
||||
}
|
||||
|
||||
void gl_frame_menu (void)
|
||||
{
|
||||
gl_t *gl = g_gl;
|
||||
@ -1102,11 +1115,9 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
|
||||
static bool gl_alive(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#ifdef HAVE_SYSUTILS
|
||||
cellSysutilCheckCallback();
|
||||
#endif
|
||||
return !g_quitting;
|
||||
gl_t *gl = (gl_t*)data;
|
||||
check_window(gl);
|
||||
return !gl->quitting;
|
||||
}
|
||||
|
||||
static bool gl_focus(void *data)
|
||||
|
@ -74,7 +74,6 @@ enum {
|
||||
#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_XMB+1
|
||||
|
||||
extern unsigned g_frame_count;
|
||||
extern bool g_quitting;
|
||||
|
||||
extern char contentInfoPath[MAX_PATH_LENGTH];
|
||||
extern char usrDirPath[MAX_PATH_LENGTH];
|
||||
|
Loading…
Reference in New Issue
Block a user