2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 14:37:41 +00:00

Add support for general.ini settings file.

This commit is contained in:
2011-07-14 13:50:42 -07:00
parent a65d085ae9
commit 8f8fbb9dac

View File

@ -1603,6 +1603,18 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
#endif
plLocalization::SetDefaultLanguage();
// Load an optional general.ini
wchar gipath[MAX_PATH];
PathGetInitDirectory(gipath, arrsize(gipath));
PathAddFilename(gipath, gipath, L"general.ini", arrsize(gipath));
FILE *generalini = _wfopen(gipath, L"rb");
if (generalini)
{
fclose(generalini);
pfConsoleEngine tempConsole;
tempConsole.ExecuteFile(gipath);
}
// If another instance is running, exit. We'll automatically release our
// lock on the mutex when our process exits
HANDLE hOneInstance = CreateMutex(nil, FALSE, "UruExplorer");
@ -1616,13 +1628,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
case plLocalization::kGerman:
hsMessageBox("URU wird bereits in einer anderen Instanz ausgef<65>hrt", "Fehler", hsMessageBoxNormal);
break;
/* case plLocalization::kSpanish:
case plLocalization::kSpanish:
hsMessageBox("En estos momentos se est<73> ejecutando otra copia de URU", "Error", hsMessageBoxNormal);
break;
case plLocalization::kItalian:
hsMessageBox("Un'altra copia di URU <20> gi<67> aperta", "Errore", hsMessageBoxNormal);
break;
*/ // default is English
// default is English
default:
hsMessageBox("Another copy of URU is already running", "Error", hsMessageBoxNormal);
break;