Found the original Config.cpp variable names
Thank you, Mac port...
This commit is contained in:
parent
6e3d90d3d1
commit
b8c0581ee4
1 changed files with 4 additions and 4 deletions
|
@ -7,8 +7,8 @@
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "Main.h"
|
#include "Main.h"
|
||||||
|
|
||||||
static const char* const config_filename = "Config.dat"; // Not the original name
|
static const char* const gConfigName = "Config.dat";
|
||||||
static const char* const config_magic = "DOUKUTSU20041206"; // Not the original name
|
static const char* const gProof = "DOUKUTSU20041206";
|
||||||
|
|
||||||
BOOL LoadConfigData(CONFIG *conf)
|
BOOL LoadConfigData(CONFIG *conf)
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ BOOL LoadConfigData(CONFIG *conf)
|
||||||
|
|
||||||
// Get path
|
// Get path
|
||||||
char path[MAX_PATH];
|
char path[MAX_PATH];
|
||||||
sprintf(path, "%s\\%s", gModulePath, config_filename);
|
sprintf(path, "%s\\%s", gModulePath, gConfigName);
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
FILE *fp = fopen(path, "rb");
|
FILE *fp = fopen(path, "rb");
|
||||||
|
@ -31,7 +31,7 @@ BOOL LoadConfigData(CONFIG *conf)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
// Check if version is not correct, and return if it failed
|
// Check if version is not correct, and return if it failed
|
||||||
if (fread_result != 1 || strcmp(conf->proof, config_magic))
|
if (fread_result != 1 || strcmp(conf->proof, gProof))
|
||||||
{
|
{
|
||||||
memset(conf, 0, sizeof(CONFIG));
|
memset(conf, 0, sizeof(CONFIG));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue