Don't need 'frame_count' variable for check_window

This commit is contained in:
twinaphex 2017-01-18 21:47:12 +01:00
parent dc19649802
commit 34da27c36b
23 changed files with 29 additions and 49 deletions

View File

@ -633,7 +633,7 @@ bool x11_alive(void *data)
}
void x11_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width = *width;
unsigned new_height = *height;

View File

@ -72,7 +72,7 @@ bool x11_get_metrics(void *data,
enum display_metric_types type, float *value);
void x11_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count);
bool *resize, unsigned *width, unsigned *height);
void x11_get_video_size(void *data, unsigned *width, unsigned *height);

View File

@ -230,14 +230,12 @@ 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, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width = 0;
unsigned new_height = 0;
android_ctx_data_t *and = (android_ctx_data_t*)data;
(void)frame_count;
*quit = false;
switch (android_api)

View File

@ -77,11 +77,10 @@ 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, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width, new_height;
(void)frame_count;
unsigned new_width = 0;
unsigned new_height = 0;
*quit = false;

View File

@ -116,7 +116,7 @@ static void gfx_ctx_d3d_show_mouse(void *data, bool state)
static void gfx_ctx_d3d_check_window(void *data, bool *quit,
bool *resize, unsigned *width,
unsigned *height, unsigned frame_count)
unsigned *height)
{
win32_check_window(quit, resize, width, height);
}

View File

@ -137,10 +137,9 @@ static void gfx_ctx_drm_swap_interval(void *data, unsigned interval)
}
static void gfx_ctx_drm_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
(void)data;
(void)frame_count;
(void)width;
(void)height;

View File

@ -52,7 +52,7 @@ static void gfx_ctx_emscripten_swap_interval(void *data, unsigned interval)
}
static void gfx_ctx_emscripten_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
int input_width;
int input_height;
@ -60,7 +60,6 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit,
emscripten_ctx_data_t *emscripten = (emscripten_ctx_data_t*)data;
(void)data;
(void)frame_count;
emscripten_get_canvas_size(&input_width, &input_height, &is_fullscreen);
*width = (unsigned)input_width;

View File

@ -64,7 +64,7 @@ static void setup_gdi_pixel_format(HDC hdc)
}
static void gfx_ctx_gdi_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
win32_check_window(quit, resize, width, height);
}

View File

@ -25,9 +25,8 @@ static void gfx_ctx_null_swap_interval(void *data, unsigned interval)
}
static void gfx_ctx_null_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
(void)frame_count;
(void)data;
(void)quit;
(void)width;

View File

@ -74,10 +74,9 @@ error:
}
static void gfx_ctx_khr_display_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data;
(void)frame_count;
*resize = khr->vk.need_new_swapchain;

View File

@ -131,12 +131,10 @@ error:
}
static void gfx_ctx_mali_fbdev_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width, new_height;
(void)frame_count;
gfx_ctx_mali_fbdev_get_video_size(data, &new_width, &new_height);
if (new_width != *width || new_height != *height)

View File

@ -112,7 +112,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, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width, new_height;
opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data;

View File

@ -54,7 +54,6 @@ typedef struct gfx_osmesa_ctx_data
int height;
int pixsize;
int frame_count;
OSMesaContext ctx;
int socket;
int client;
@ -310,8 +309,9 @@ static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info)
{
}
static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width,
unsigned *height, unsigned frame_count)
static void osmesa_ctx_check_window(void *data, bool *quit,
bool *resize,unsigned *width,
unsigned *height)
{
gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data;
@ -319,7 +319,6 @@ static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigne
*height = osmesa->height;
*resize = false;
*quit = false;
osmesa->frame_count = frame_count;
}
static bool osmesa_ctx_set_resize(void *data, unsigned width, unsigned height)

View File

@ -148,7 +148,7 @@ static void gfx_ctx_ps3_set_swap_interval(void *data, unsigned interval)
}
static void gfx_ctx_ps3_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
gl_t *gl = data;

View File

@ -284,14 +284,11 @@ 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, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width, new_height;
qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data;
(void)data;
(void)frame_count;
*quit = false;
#ifdef HAVE_EGL

View File

@ -41,7 +41,6 @@ typedef struct gfx_ctx_sdl_data
bool g_full;
bool g_resized;
int g_frame_count;
#ifdef HAVE_SDL2
SDL_Window *g_win;
SDL_GLContext g_ctx;
@ -282,7 +281,7 @@ static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info)
}
static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width,
unsigned *height, unsigned frame_count)
unsigned *height)
{
SDL_Event event;
gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data;
@ -330,8 +329,6 @@ static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *
*resize = true;
sdl->g_resized = false;
}
sdl->g_frame_count = frame_count;
}
static bool sdl_ctx_set_resize(void *data, unsigned width, unsigned height)

View File

@ -86,10 +86,9 @@ 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, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
(void)data;
(void)frame_count;
(void)width;
(void)height;

View File

@ -116,7 +116,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, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width, new_height;
vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data;

View File

@ -643,14 +643,11 @@ static void flush_wayland_fd(gfx_ctx_wayland_data_t *wl)
}
static void gfx_ctx_wl_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height,
unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
unsigned new_width, new_height;
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
(void)frame_count;
flush_wayland_fd(wl);
new_width = *width;

View File

@ -311,7 +311,7 @@ static void gfx_ctx_wgl_swap_interval(void *data, unsigned interval)
}
static void gfx_ctx_wgl_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
win32_check_window(quit, resize, width, height);

View File

@ -347,9 +347,9 @@ static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info)
}
static void gfx_ctx_x_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
bool *resize, unsigned *width, unsigned *height)
{
x11_check_window(data, quit, resize, width, height, frame_count);
x11_check_window(data, quit, resize, width, height);
switch (x_api)
{
@ -789,7 +789,7 @@ static bool gfx_ctx_x_set_video_mode(void *data,
{
bool quit, resize;
unsigned width = 0, height = 0;
x11_check_window(x, &quit, &resize, &width, &height, 0);
x11_check_window(x, &quit, &resize, &width, &height);
/* Use XCB surface since it's the most supported WSI.
* We can obtain the XCB connection directly from X11. */

View File

@ -282,7 +282,7 @@ bool video_context_driver_check_window(gfx_ctx_size_t *size_data)
size_data->quit,
size_data->resize,
size_data->width,
size_data->height, (unsigned int)video_driver_get_frame_count());
size_data->height);
return true;
}

View File

@ -106,7 +106,7 @@ typedef struct gfx_ctx_driver
/* Queries for resize and quit events.
* Also processes events. */
void (*check_window)(void*, bool*, bool*,
unsigned*, unsigned*, unsigned);
unsigned*, unsigned*);
/* Acknowledge a resize event. This is needed for some APIs.
* Most backends will ignore this. */