From bb99dc4e380210ef31266853732779ba0cf23d3d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Nov 2015 10:16:16 +0100 Subject: [PATCH] Create win32_window_reset --- gfx/common/win32_common.cpp | 6 ++++++ gfx/common/win32_common.h | 2 ++ gfx/drivers_context/wgl_ctx.cpp | 4 +--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 2846a963b1..4a7eb770e9 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -694,6 +694,12 @@ HWND win32_get_window(void) return g_hwnd; } +void win32_window_reset(void) +{ + g_quit = false; + g_restore_desktop = false; +} + void win32_destroy_window(void) { #ifndef _XBOX diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 806daedb40..bb530b726e 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -81,6 +81,8 @@ bool win32_has_focus(void); void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height); +void win32_window_reset(void); + void win32_destroy_window(void); #endif diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 39c062d6a9..43f0800ea3 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -313,9 +313,7 @@ static bool gfx_ctx_wgl_init(void *data) if (g_inited) return false; - g_quit = false; - g_restore_desktop = false; - + win32_window_reset(); win32_monitor_init(); if (!win32_window_init(&wndclass, true)) return false;