mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Remove is_shutdown from check_window
This commit is contained in:
parent
3de0bf27d2
commit
4aae293e3d
@ -598,8 +598,7 @@ bool x11_alive(void *data)
|
||||
}
|
||||
|
||||
void x11_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width = *width;
|
||||
unsigned new_height = *height;
|
||||
|
@ -380,14 +380,13 @@ static bool gdi_gfx_alive(void *data)
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
bool ret = false;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
gdi_t *gdi = (gdi_t*)data;
|
||||
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
gdi->ctx_driver->check_window(gdi->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
ret = !quit;
|
||||
|
||||
|
@ -3946,12 +3946,11 @@ static bool gl2_alive(void *data)
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
gl_t *gl = (gl_t*)data;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
unsigned temp_width = gl->video_width;
|
||||
unsigned temp_height = gl->video_height;
|
||||
|
||||
gl->ctx_driver->check_window(gl->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (quit)
|
||||
gl->quitting = true;
|
||||
|
@ -964,14 +964,13 @@ static bool gl1_gfx_alive(void *data)
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
bool ret = false;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
gl1_t *gl1 = (gl1_t*)data;
|
||||
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
gl1->ctx_driver->check_window(gl1->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (resize)
|
||||
gl1->should_resize = true;
|
||||
|
@ -1549,12 +1549,11 @@ static bool gl_core_alive(void *data)
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
gl_core_t *gl = (gl_core_t*)data;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
unsigned temp_width = gl->video_width;
|
||||
unsigned temp_height = gl->video_height;
|
||||
|
||||
gl->ctx_driver->check_window(gl->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (quit)
|
||||
gl->quitting = true;
|
||||
|
@ -337,14 +337,13 @@ static bool network_gfx_alive(void *data)
|
||||
unsigned temp_height = 0;
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
network_video_t *network = (network_video_t*)data;
|
||||
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
network->ctx_driver->check_window(network->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(temp_width, temp_height);
|
||||
|
@ -439,14 +439,13 @@ static bool sixel_gfx_alive(void *data)
|
||||
unsigned temp_height = 0;
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
sixel_t *sixel = (sixel_t*)data;
|
||||
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
sixel->ctx_driver->check_window(sixel->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(temp_width, temp_height);
|
||||
|
@ -467,10 +467,9 @@ static bool vg_alive(void *data)
|
||||
unsigned temp_width = 0;
|
||||
unsigned temp_height = 0;
|
||||
vg_t *vg = (vg_t*)data;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
|
||||
vg->ctx_driver->check_window(vg->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(temp_width, temp_height);
|
||||
|
@ -1342,12 +1342,11 @@ static bool vulkan_alive(void *data)
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
vk_t *vk = (vk_t*)data;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
unsigned temp_width = vk->video_width;
|
||||
unsigned temp_height = vk->video_height;
|
||||
|
||||
vk->ctx_driver->check_window(vk->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (quit)
|
||||
vk->quitting = true;
|
||||
|
@ -215,8 +215,7 @@ static void android_gfx_ctx_get_video_size(void *data,
|
||||
}
|
||||
|
||||
static void android_gfx_ctx_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
#ifdef HAVE_VULKAN
|
||||
struct android_app *android_app = (struct android_app*)g_android;
|
||||
@ -265,10 +264,6 @@ static void android_gfx_ctx_check_window(void *data, bool *quit,
|
||||
*height = new_height;
|
||||
*resize = true;
|
||||
}
|
||||
|
||||
/* Check if we are exiting. */
|
||||
if (is_shutdown)
|
||||
*quit = true;
|
||||
}
|
||||
|
||||
static bool android_gfx_ctx_set_resize(void *data,
|
||||
|
@ -81,7 +81,7 @@ static void gfx_ctx_cgl_get_video_size(void *data, unsigned *width, unsigned *he
|
||||
}
|
||||
|
||||
static void gfx_ctx_cgl_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width = 0;
|
||||
unsigned new_height = 0;
|
||||
|
@ -545,7 +545,7 @@ static void cocoagl_gfx_ctx_bind_hw_render(void *data, bool enable)
|
||||
}
|
||||
|
||||
static void cocoagl_gfx_ctx_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
#ifdef HAVE_VULKAN
|
||||
|
@ -234,7 +234,7 @@ static void gfx_ctx_drm_swap_interval(void *data, int interval)
|
||||
}
|
||||
|
||||
static void gfx_ctx_drm_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
(void)width;
|
||||
|
@ -91,7 +91,7 @@ static void gfx_ctx_emscripten_get_canvas_size(int *width, int *height)
|
||||
}
|
||||
|
||||
static void gfx_ctx_emscripten_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
EMSCRIPTEN_RESULT r;
|
||||
int input_width;
|
||||
|
@ -36,7 +36,7 @@ static unsigned g_resize_width = FB_WIDTH;
|
||||
static unsigned g_resize_height = FB_HEIGHT;
|
||||
|
||||
static void gfx_ctx_fpga_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ typedef struct gfx_ctx_gdi_data
|
||||
void *dinput_gdi;
|
||||
|
||||
static void gfx_ctx_gdi_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
win32_check_window(quit, resize, width, height);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ static void gfx_ctx_null_swap_interval(void *data, int interval)
|
||||
}
|
||||
|
||||
static void gfx_ctx_null_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
(void)quit;
|
||||
|
@ -81,7 +81,7 @@ error:
|
||||
}
|
||||
|
||||
static void gfx_ctx_khr_display_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data;
|
||||
|
||||
@ -94,7 +94,7 @@ static void gfx_ctx_khr_display_check_window(void *data, bool *quit,
|
||||
*resize = true;
|
||||
}
|
||||
|
||||
if (is_shutdown || (bool)frontend_driver_get_signal_handler_state())
|
||||
if ((bool)frontend_driver_get_signal_handler_state())
|
||||
*quit = true;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ error:
|
||||
}
|
||||
|
||||
static void gfx_ctx_mali_fbdev_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
static enum gfx_ctx_api network_ctx_api = GFX_CTX_NONE;
|
||||
|
||||
static void gfx_ctx_network_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ static void gfx_ctx_opendingux_get_video_size(void *data,
|
||||
}
|
||||
|
||||
static void gfx_ctx_opendingux_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data;
|
||||
|
@ -124,7 +124,7 @@ error:
|
||||
}
|
||||
|
||||
static void orbis_ctx_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
|
||||
|
@ -317,7 +317,7 @@ static void osmesa_ctx_get_video_size(void *data,
|
||||
|
||||
static void osmesa_ctx_check_window(void *data, bool *quit,
|
||||
bool *resize,unsigned *width,
|
||||
unsigned *height, bool is_shutdown)
|
||||
unsigned *height)
|
||||
{
|
||||
gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data;
|
||||
|
||||
|
@ -149,8 +149,7 @@ static void gfx_ctx_ps3_set_swap_interval(void *data, int interval)
|
||||
}
|
||||
|
||||
static void gfx_ctx_ps3_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
gl_t *gl = data;
|
||||
|
||||
|
@ -278,8 +278,7 @@ static void gfx_ctx_qnx_get_video_size(void *data,
|
||||
}
|
||||
|
||||
static void gfx_ctx_qnx_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data;
|
||||
@ -296,10 +295,6 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit,
|
||||
*height = new_height;
|
||||
*resize = true;
|
||||
}
|
||||
|
||||
/* Check if we are exiting. */
|
||||
if (is_shutdown)
|
||||
*quit = true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_qnx_set_video_mode(void *data,
|
||||
|
@ -304,8 +304,7 @@ static void sdl_ctx_update_title(void *data, void *data2)
|
||||
|
||||
static void sdl_ctx_check_window(void *data, bool *quit,
|
||||
bool *resize,unsigned *width,
|
||||
unsigned *height,
|
||||
bool is_shutdown)
|
||||
unsigned *height)
|
||||
{
|
||||
SDL_Event event;
|
||||
gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data;
|
||||
|
@ -34,7 +34,7 @@
|
||||
static enum gfx_ctx_api sixel_ctx_api = GFX_CTX_NONE;
|
||||
|
||||
static void gfx_ctx_sixel_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ error:
|
||||
}
|
||||
|
||||
static void switch_ctx_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
|
||||
|
@ -138,8 +138,7 @@ static void gfx_ctx_uwp_swap_interval(void *data, int interval)
|
||||
}
|
||||
|
||||
static void gfx_ctx_uwp_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
win32_check_window(quit, resize, width, height);
|
||||
}
|
||||
|
@ -91,13 +91,8 @@ static INLINE bool gfx_ctx_vc_egl_query_extension(vc_ctx_data_t *vc, const char
|
||||
}
|
||||
|
||||
static void gfx_ctx_vc_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
(void)width;
|
||||
(void)height;
|
||||
|
||||
*resize = false;
|
||||
*quit = (bool)frontend_driver_get_signal_handler_state();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ static void vita_get_video_size(void *data, unsigned *width, unsigned *height)
|
||||
}
|
||||
|
||||
static void vita_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
|
||||
|
@ -118,8 +118,7 @@ static void gfx_ctx_vivante_get_video_size(void *data,
|
||||
}
|
||||
|
||||
static void gfx_ctx_vivante_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data;
|
||||
|
@ -1068,8 +1068,7 @@ void flush_wayland_fd(void *data)
|
||||
}
|
||||
|
||||
static void gfx_ctx_wl_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
/* this function works with SCALED sizes, it's used from the renderer */
|
||||
unsigned new_width, new_height;
|
||||
|
@ -517,8 +517,7 @@ static void gfx_ctx_wgl_swap_interval(void *data, int interval)
|
||||
}
|
||||
|
||||
static void gfx_ctx_wgl_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
win32_check_window(quit, resize, width, height);
|
||||
|
||||
|
@ -399,11 +399,9 @@ static void gfx_ctx_x_swap_buffers(void *data, void *data2)
|
||||
}
|
||||
|
||||
static void gfx_ctx_x_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height,
|
||||
bool is_shutdown)
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
x11_check_window(data, quit, resize, width, height,
|
||||
is_shutdown);
|
||||
x11_check_window(data, quit, resize, width, height);
|
||||
|
||||
switch (x_api)
|
||||
{
|
||||
@ -1019,10 +1017,8 @@ static bool gfx_ctx_x_set_video_mode(void *data,
|
||||
#ifdef HAVE_VULKAN
|
||||
{
|
||||
bool quit, resize;
|
||||
bool shutdown = false;
|
||||
unsigned width = 0, height = 0;
|
||||
x11_check_window(x, &quit, &resize, &width, &height,
|
||||
shutdown);
|
||||
x11_check_window(x, &quit, &resize, &width, &height);
|
||||
|
||||
/* FIXME/TODO - threading error here */
|
||||
|
||||
|
@ -1252,7 +1252,7 @@ typedef struct gfx_ctx_driver
|
||||
/* Queries for resize and quit events.
|
||||
* Also processes events. */
|
||||
void (*check_window)(void*, bool*, bool*,
|
||||
unsigned*, unsigned*, bool);
|
||||
unsigned*, unsigned*);
|
||||
|
||||
/* Acknowledge a resize event. This is needed for some APIs.
|
||||
* Most backends will ignore this. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user