Browse Source

Add support for general.ini settings file.

Joseph Davies 14 years ago
parent
commit
8f8fbb9dac
  1. 16
      Sources/Plasma/Apps/plClient/winmain.cpp

16
Sources/Plasma/Apps/plClient/winmain.cpp

@ -1603,6 +1603,18 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
#endif #endif
plLocalization::SetDefaultLanguage(); 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 // If another instance is running, exit. We'll automatically release our
// lock on the mutex when our process exits // lock on the mutex when our process exits
HANDLE hOneInstance = CreateMutex(nil, FALSE, "UruExplorer"); HANDLE hOneInstance = CreateMutex(nil, FALSE, "UruExplorer");
@ -1616,13 +1628,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
case plLocalization::kGerman: case plLocalization::kGerman:
hsMessageBox("URU wird bereits in einer anderen Instanz ausgeführt", "Fehler", hsMessageBoxNormal); hsMessageBox("URU wird bereits in einer anderen Instanz ausgeführt", "Fehler", hsMessageBoxNormal);
break; break;
/* case plLocalization::kSpanish: case plLocalization::kSpanish:
hsMessageBox("En estos momentos se está ejecutando otra copia de URU", "Error", hsMessageBoxNormal); hsMessageBox("En estos momentos se está ejecutando otra copia de URU", "Error", hsMessageBoxNormal);
break; break;
case plLocalization::kItalian: case plLocalization::kItalian:
hsMessageBox("Un'altra copia di URU è già aperta", "Errore", hsMessageBoxNormal); hsMessageBox("Un'altra copia di URU è già aperta", "Errore", hsMessageBoxNormal);
break; break;
*/ // default is English // default is English
default: default:
hsMessageBox("Another copy of URU is already running", "Error", hsMessageBoxNormal); hsMessageBox("Another copy of URU is already running", "Error", hsMessageBoxNormal);
break; break;

Loading…
Cancel
Save