don't save windowPos if it's -32000
This commit is contained in:
parent
5114d902da
commit
25627134e7
1 changed files with 13 additions and 7 deletions
|
@ -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,11 +121,18 @@ 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…
Add table
Add a link
Reference in a new issue