mirror of
https://github.com/libretro/RetroArch
synced 2025-04-25 00:02:31 +00:00
Remove video_context_driver_check_window
This commit is contained in:
parent
d58dc3186d
commit
2edd03361c
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "../../driver.h"
|
#include "../../driver.h"
|
||||||
#include "../../configuration.h"
|
#include "../../configuration.h"
|
||||||
|
#include "../../retroarch.h"
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
#include "../../frontend/frontend_driver.h"
|
#include "../../frontend/frontend_driver.h"
|
||||||
#include "../common/gdi_common.h"
|
#include "../common/gdi_common.h"
|
||||||
@ -360,22 +361,20 @@ static void gdi_gfx_set_nonblock_state(void *data, bool toggle)
|
|||||||
|
|
||||||
static bool gdi_gfx_alive(void *data)
|
static bool gdi_gfx_alive(void *data)
|
||||||
{
|
{
|
||||||
gfx_ctx_size_t size_data;
|
|
||||||
unsigned temp_width = 0;
|
unsigned temp_width = 0;
|
||||||
unsigned temp_height = 0;
|
unsigned temp_height = 0;
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
bool resize = false;
|
bool resize = false;
|
||||||
bool ret = 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 */
|
/* Needed because some context drivers don't track their sizes */
|
||||||
video_driver_get_size(&temp_width, &temp_height);
|
video_driver_get_size(&temp_width, &temp_height);
|
||||||
|
|
||||||
size_data.quit = &quit;
|
gdi->ctx_driver->check_window(gdi->ctx_data,
|
||||||
size_data.resize = &resize;
|
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||||
size_data.width = &temp_width;
|
|
||||||
size_data.height = &temp_height;
|
|
||||||
|
|
||||||
if (video_context_driver_check_window(&size_data))
|
|
||||||
ret = !quit;
|
ret = !quit;
|
||||||
|
|
||||||
if (temp_width != 0 && temp_height != 0)
|
if (temp_width != 0 && temp_height != 0)
|
||||||
|
@ -439,16 +439,14 @@ static bool sixel_gfx_alive(void *data)
|
|||||||
unsigned temp_height = 0;
|
unsigned temp_height = 0;
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
bool resize = 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 */
|
/* Needed because some context drivers don't track their sizes */
|
||||||
video_driver_get_size(&temp_width, &temp_height);
|
video_driver_get_size(&temp_width, &temp_height);
|
||||||
|
|
||||||
size_data.quit = &quit;
|
sixel->ctx_driver->check_window(sixel->ctx_data,
|
||||||
size_data.resize = &resize;
|
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||||
size_data.width = &temp_width;
|
|
||||||
size_data.height = &temp_height;
|
|
||||||
|
|
||||||
video_context_driver_check_window(&size_data);
|
|
||||||
|
|
||||||
if (temp_width != 0 && temp_height != 0)
|
if (temp_width != 0 && temp_height != 0)
|
||||||
video_driver_set_size(&temp_width, &temp_height);
|
video_driver_set_size(&temp_width, &temp_height);
|
||||||
|
@ -441,18 +441,14 @@ static bool vg_frame(void *data, const void *frame,
|
|||||||
|
|
||||||
static bool vg_alive(void *data)
|
static bool vg_alive(void *data)
|
||||||
{
|
{
|
||||||
gfx_ctx_size_t size_data;
|
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
unsigned temp_width = 0;
|
unsigned temp_width = 0;
|
||||||
unsigned temp_height = 0;
|
unsigned temp_height = 0;
|
||||||
vg_t *vg = (vg_t*)data;
|
vg_t *vg = (vg_t*)data;
|
||||||
|
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||||
|
|
||||||
size_data.quit = &quit;
|
vg->ctx_driver->check_window(vg->ctx_data,
|
||||||
size_data.resize = &vg->should_resize;
|
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||||
size_data.width = &temp_width;
|
|
||||||
size_data.height = &temp_height;
|
|
||||||
|
|
||||||
video_context_driver_check_window(&size_data);
|
|
||||||
|
|
||||||
if (temp_width != 0 && temp_height != 0)
|
if (temp_width != 0 && temp_height != 0)
|
||||||
video_driver_set_size(&temp_width, &temp_height);
|
video_driver_set_size(&temp_width, &temp_height);
|
||||||
|
@ -1286,30 +1286,25 @@ static void vulkan_set_nonblock_state(void *data, bool state)
|
|||||||
|
|
||||||
static bool vulkan_alive(void *data)
|
static bool vulkan_alive(void *data)
|
||||||
{
|
{
|
||||||
gfx_ctx_size_t size_data;
|
|
||||||
unsigned temp_width = 0;
|
unsigned temp_width = 0;
|
||||||
unsigned temp_height = 0;
|
unsigned temp_height = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
bool resize = false;
|
bool resize = false;
|
||||||
vk_t *vk = (vk_t*)data;
|
vk_t *vk = (vk_t*)data;
|
||||||
|
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||||
|
|
||||||
video_driver_get_size(&temp_width, &temp_height);
|
video_driver_get_size(&temp_width, &temp_height);
|
||||||
|
|
||||||
size_data.quit = &quit;
|
vk->ctx_driver->check_window(vk->ctx_data,
|
||||||
size_data.resize = &resize;
|
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||||
size_data.width = &temp_width;
|
|
||||||
size_data.height = &temp_height;
|
|
||||||
|
|
||||||
if (video_context_driver_check_window(&size_data))
|
|
||||||
{
|
|
||||||
if (quit)
|
if (quit)
|
||||||
vk->quitting = true;
|
vk->quitting = true;
|
||||||
else if (resize)
|
else if (resize)
|
||||||
vk->should_resize = true;
|
vk->should_resize = true;
|
||||||
|
|
||||||
ret = !vk->quitting;
|
ret = !vk->quitting;
|
||||||
}
|
|
||||||
|
|
||||||
if (temp_width != 0 && temp_height != 0)
|
if (temp_width != 0 && temp_height != 0)
|
||||||
video_driver_set_size(&temp_width, &temp_height);
|
video_driver_set_size(&temp_width, &temp_height);
|
||||||
|
@ -3082,24 +3082,6 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool video_context_driver_check_window(gfx_ctx_size_t *size_data)
|
|
||||||
{
|
|
||||||
if ( video_context_data
|
|
||||||
&& current_video_context.check_window)
|
|
||||||
{
|
|
||||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
|
||||||
current_video_context.check_window(video_context_data,
|
|
||||||
size_data->quit,
|
|
||||||
size_data->resize,
|
|
||||||
size_data->width,
|
|
||||||
size_data->height,
|
|
||||||
is_shutdown);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool video_context_driver_init_image_buffer(const video_info_t *data)
|
bool video_context_driver_init_image_buffer(const video_info_t *data)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
|
@ -1145,8 +1145,6 @@ const gfx_ctx_driver_t *video_context_driver_init_first(
|
|||||||
enum gfx_ctx_api api, unsigned major, unsigned minor,
|
enum gfx_ctx_api api, unsigned major, unsigned minor,
|
||||||
bool hw_render_ctx, void **ctx_data);
|
bool hw_render_ctx, void **ctx_data);
|
||||||
|
|
||||||
bool video_context_driver_check_window(gfx_ctx_size_t *size_data);
|
|
||||||
|
|
||||||
bool video_context_driver_find_prev_driver(void);
|
bool video_context_driver_find_prev_driver(void);
|
||||||
|
|
||||||
bool video_context_driver_find_next_driver(void);
|
bool video_context_driver_find_next_driver(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user