mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-26 10:29:23 +01:00
don't save windowPos if it's -32000
This commit is contained in:
parent
5114d902da
commit
25627134e7
@ -6,8 +6,7 @@
|
|||||||
#include "opengl.h"
|
#include "opengl.h"
|
||||||
#include "render_d3d9.h"
|
#include "render_d3d9.h"
|
||||||
|
|
||||||
char SettingsIniPath[MAX_PATH];
|
static char SettingsIniPath[MAX_PATH];
|
||||||
|
|
||||||
static char ProcessFileName[96];
|
static char ProcessFileName[96];
|
||||||
|
|
||||||
static BOOL GetBool(LPCSTR key, BOOL defaultValue);
|
static BOOL GetBool(LPCSTR key, BOOL defaultValue);
|
||||||
@ -122,12 +121,19 @@ void Settings_Load()
|
|||||||
void Settings_SaveWindowPos(int x, int y)
|
void Settings_SaveWindowPos(int x, int y)
|
||||||
{
|
{
|
||||||
char buf[16];
|
char buf[16];
|
||||||
|
|
||||||
|
if (x != -32000)
|
||||||
|
{
|
||||||
sprintf(buf, "%d", x);
|
sprintf(buf, "%d", x);
|
||||||
WritePrivateProfileString(ProcessFileName, "posX", buf, SettingsIniPath);
|
WritePrivateProfileString(ProcessFileName, "posX", buf, SettingsIniPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (y != -32000)
|
||||||
|
{
|
||||||
sprintf(buf, "%d", y);
|
sprintf(buf, "%d", y);
|
||||||
WritePrivateProfileString(ProcessFileName, "posY", buf, SettingsIniPath);
|
WritePrivateProfileString(ProcessFileName, "posY", buf, SettingsIniPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void CreateSettingsIni()
|
static void CreateSettingsIni()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user