(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)
|
if (!success)
|
||||||
RARCH_WARN("Failed to set swap interval.\n");
|
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) param;
|
||||||
(void) userdata;
|
(void) userdata;
|
||||||
|
gl_t *gl = driver.video_data;
|
||||||
|
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case CELL_SYSUTIL_REQUEST_EXITGAME:
|
case CELL_SYSUTIL_REQUEST_EXITGAME:
|
||||||
g_console.menu_enable = false;
|
g_console.menu_enable = false;
|
||||||
g_quitting = true;
|
gl->quitting = true;
|
||||||
g_console.ingame_menu_enable = false;
|
g_console.ingame_menu_enable = false;
|
||||||
g_console.mode_switch = MODE_EXIT;
|
g_console.mode_switch = MODE_EXIT;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -110,7 +110,6 @@ struct {
|
||||||
CellVideoOutState g_video_state;
|
CellVideoOutState g_video_state;
|
||||||
} ps3_gl;
|
} ps3_gl;
|
||||||
|
|
||||||
bool g_quitting;
|
|
||||||
unsigned g_frame_count;
|
unsigned g_frame_count;
|
||||||
void *g_gl;
|
void *g_gl;
|
||||||
|
|
||||||
|
@ -621,6 +620,20 @@ static inline void set_texture_coords(GLfloat *coords, GLfloat xamt, GLfloat yam
|
||||||
coords[7] = yamt;
|
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)
|
void gl_frame_menu (void)
|
||||||
{
|
{
|
||||||
gl_t *gl = g_gl;
|
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)
|
static bool gl_alive(void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
gl_t *gl = (gl_t*)data;
|
||||||
#ifdef HAVE_SYSUTILS
|
check_window(gl);
|
||||||
cellSysutilCheckCallback();
|
return !gl->quitting;
|
||||||
#endif
|
|
||||||
return !g_quitting;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gl_focus(void *data)
|
static bool gl_focus(void *data)
|
||||||
|
|
|
@ -74,7 +74,6 @@ enum {
|
||||||
#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_XMB+1
|
#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_XMB+1
|
||||||
|
|
||||||
extern unsigned g_frame_count;
|
extern unsigned g_frame_count;
|
||||||
extern bool g_quitting;
|
|
||||||
|
|
||||||
extern char contentInfoPath[MAX_PATH_LENGTH];
|
extern char contentInfoPath[MAX_PATH_LENGTH];
|
||||||
extern char usrDirPath[MAX_PATH_LENGTH];
|
extern char usrDirPath[MAX_PATH_LENGTH];
|
||||||
|
|
Loading…
Reference in New Issue