static bool d3d_alive(void *data) { unsigned temp_width = 0, temp_height = 0; bool ret = false; d3d_video_t *d3d = (d3d_video_t*)data; bool quit = false; bool resize = false; if (gfx_ctx_check_window(&quit, &resize, &temp_width, &temp_height)) { if (quit) d3d->quitting = quit; if (resize) { d3d->should_resize = true; gfx_ctx_set_resize(temp_width, temp_height); d3d_restore(d3d); } ret = !quit; } if (temp_width != 0 && temp_height != 0) video_driver_set_size(&temp_width, &temp_height); return ret; }
static void check_window(xdk_d3d_video_t *d3d) { bool quit, resize; gfx_ctx_check_window(&quit, &resize, NULL, NULL, d3d->frame_count); if (quit) d3d->quitting = true; else if (resize) d3d->should_resize = true; }
static bool vg_alive(void *data) { bool quit; unsigned temp_width = 0, temp_height = 0; vg_t *vg = (vg_t*)data; gfx_ctx_check_window(&quit, &vg->should_resize, &temp_width, &temp_height); if (temp_width != 0 && temp_height != 0) video_driver_set_size(&temp_width, &temp_height); return !quit; }
static bool gl_alive(void *data) { gl_t *gl = (gl_t*)data; 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; return !gl->quitting; }