From b94a3928e46d0efa95510ea017297077b823ed70 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 7 Jul 2020 21:04:45 +0200 Subject: [PATCH] (MSVC) Buildfix --- gfx/common/win32_common.c | 76 ++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index f1abece965..2aa89f129c 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -230,43 +230,6 @@ typedef struct DISPLAYCONFIG_PATH_INFO_CUSTOM typedef LONG (WINAPI *QUERYDISPLAYCONFIG)(UINT32, UINT32*, DISPLAYCONFIG_PATH_INFO_CUSTOM*, UINT32*, DISPLAYCONFIG_MODE_INFO_CUSTOM*, UINT32*); typedef LONG (WINAPI *GETDISPLAYCONFIGBUFFERSIZES)(UINT32, UINT32*, UINT32*); -/* TODO/FIXME - globals */ -bool g_win32_restore_desktop = false; -static bool taskbar_is_created = false; -bool g_win32_inited = false; - -unsigned g_win32_resize_width = 0; -unsigned g_win32_resize_height = 0; - -ui_window_win32_t main_window; - -static HMONITOR win32_monitor_last; -static HMONITOR win32_monitor_all[MAX_MONITORS]; - -typedef struct win32_common_state -{ - int pos_x; - int pos_y; - unsigned pos_width; - unsigned pos_height; - unsigned taskbar_message; - bool quit; - unsigned monitor_count; - bool resized; -} win32_common_state_t; - -static win32_common_state_t win32_st = -{ - CW_USEDEFAULT, /* pos_x */ - CW_USEDEFAULT, /* pos_y */ - 0, /* pos_width */ - 0, /* pos_height */ - 0, /* taskbar_message */ - false, /* quit */ - 0, /* monitor_count */ - false /* resized */ -}; - /* Power Request APIs */ #if !defined(_XBOX) && (_MSC_VER == 1310) @@ -314,6 +277,45 @@ typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_ #define INT_PTR_COMPAT INT_PTR #endif + +/* TODO/FIXME - globals */ +bool g_win32_restore_desktop = false; +static bool taskbar_is_created = false; +bool g_win32_inited = false; + +unsigned g_win32_resize_width = 0; +unsigned g_win32_resize_height = 0; + +ui_window_win32_t main_window; + +static HMONITOR win32_monitor_last; +static HMONITOR win32_monitor_all[MAX_MONITORS]; + +typedef struct win32_common_state +{ + int pos_x; + int pos_y; + unsigned pos_width; + unsigned pos_height; + unsigned taskbar_message; + bool quit; + unsigned monitor_count; + bool resized; +} win32_common_state_t; + +static win32_common_state_t win32_st = +{ + CW_USEDEFAULT, /* pos_x */ + CW_USEDEFAULT, /* pos_y */ + 0, /* pos_width */ + 0, /* pos_height */ + 0, /* taskbar_message */ + false, /* quit */ + 0, /* monitor_count */ + false /* resized */ +}; + + bool win32_taskbar_is_created(void) { return taskbar_is_created;