static bool d3d_alive(void *data) { gfx_ctx_size_t size_data; unsigned temp_width = 0; unsigned temp_height = 0; bool ret = false; d3d_video_t *d3d = (d3d_video_t*)data; bool quit = false; bool resize = false; size_data.quit = &quit; size_data.resize = &resize; size_data.width = &temp_width; size_data.height = &temp_height; if (video_context_driver_check_window(&size_data)) { if (quit) d3d->quitting = quit; if (resize) { gfx_ctx_mode_t mode; d3d->should_resize = true; mode.width = temp_width; mode.height = temp_height; video_context_driver_set_resize(&mode); d3d_restore(d3d); } ret = !quit; } if (temp_width != 0 && temp_height != 0) video_driver_set_size(&temp_width, &temp_height); return ret; }
static bool gdi_gfx_alive(void *data) { gfx_ctx_size_t size_data; unsigned temp_width = 0; unsigned temp_height = 0; bool quit = false; bool resize = false; /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); size_data.quit = &quit; size_data.resize = &resize; size_data.width = &temp_width; size_data.height = &temp_height; video_context_driver_check_window(&size_data); if (temp_width != 0 && temp_height != 0) video_driver_set_size(&temp_width, &temp_height); return true; }