From 130203c431ad683b404747ff597ab33896a3699b Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 27 Nov 2017 20:49:56 -0500 Subject: [PATCH] gdi: fix closing window via X button --- gfx/drivers/gdi_gfx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 59e18af6b8..b1ded17fdb 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -356,7 +356,8 @@ static bool gdi_gfx_alive(void *data) unsigned temp_height = 0; bool quit = false; bool resize = false; - + bool ret = false; + /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); @@ -365,12 +366,13 @@ static bool gdi_gfx_alive(void *data) size_data.width = &temp_width; size_data.height = &temp_height; - video_context_driver_check_window(&size_data); + if (video_context_driver_check_window(&size_data)) + ret = !quit; if (temp_width != 0 && temp_height != 0) video_driver_set_size(&temp_width, &temp_height); - return true; + return ret; } static bool gdi_gfx_focus(void *data)