mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
win32: correct usage of GetWindowPlacement per MS docs, fixes game window position on Win95/98
This commit is contained in:
parent
6664f8a772
commit
89bd38918e
@ -43,6 +43,7 @@
|
||||
- WINDOWS/XINPUT: Fix crash that occurs in some situations with Steam running and a Steam Controller plugged in.
|
||||
- WINDOWS: Improve version reporting under System Information.
|
||||
- WINDOWS: Support window transparency.
|
||||
- WINDOWS: Correct usage of GetWindowPlacement per MS docs, fixes game window position on Win95/98.
|
||||
|
||||
# 1.6.9
|
||||
- COMMON: Small memory leak.
|
||||
|
@ -86,8 +86,8 @@ bool g_restore_desktop = false;
|
||||
static bool doubleclick_on_titlebar = false;
|
||||
bool g_inited = false;
|
||||
static bool g_quit = false;
|
||||
static unsigned g_pos_x = CW_USEDEFAULT;
|
||||
static unsigned g_pos_y = CW_USEDEFAULT;
|
||||
static int g_pos_x = CW_USEDEFAULT;
|
||||
static int g_pos_y = CW_USEDEFAULT;
|
||||
static void *curD3D = NULL;
|
||||
|
||||
ui_window_win32_t main_window;
|
||||
@ -513,7 +513,11 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||
case WM_QUIT:
|
||||
{
|
||||
WINDOWPLACEMENT placement;
|
||||
memset(&placement, 0, sizeof(placement));
|
||||
placement.length = sizeof(placement);
|
||||
|
||||
GetWindowPlacement(main_window.hwnd, &placement);
|
||||
|
||||
g_pos_x = placement.rcNormalPosition.left;
|
||||
g_pos_y = placement.rcNormalPosition.top;
|
||||
g_quit = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user