mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 19:00:33 +02:00
Fix compilation issues on Windows with Window Position Loader
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#ifdef WIN
|
#ifdef WIN
|
||||||
|
#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions
|
||||||
#include "SDL_syswm.h"
|
#include "SDL_syswm.h"
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -612,8 +613,8 @@ bool SaveWindowPosition()
|
|||||||
placement.length = sizeof(placement);
|
placement.length = sizeof(placement);
|
||||||
GetWindowPlacement(sysInfo.window, &placement);
|
GetWindowPlacement(sysInfo.window, &placement);
|
||||||
|
|
||||||
Client::Ref().SetPref("WindowX", placement.rcNormalPosition.left);
|
Client::Ref().SetPref("WindowX", (int)placement.rcNormalPosition.left);
|
||||||
Client::Ref().SetPref("WindowY", placement.rcNormalPosition.top);
|
Client::Ref().SetPref("WindowY", (int)placement.rcNormalPosition.top);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user