mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 07:31:21 +02:00
- bug fixes for load saved game (now fixes loading on windows) and corrects memory bug for loading saved games on all platforms.
This commit is contained in:
@@ -448,7 +448,7 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
||||
std::auto_ptr<wchar_t> wstr(Ansi2WideString(appPath.c_str()));
|
||||
|
||||
wstring launchApp = wstring(wstr.get()) + L" \"%1\"";
|
||||
DWORD len = launchApp.length() + 1;
|
||||
DWORD len = (DWORD)launchApp.length() + 1;
|
||||
RegSetValueEx(keyHandle, NULL, 0, REG_SZ, (PBYTE)launchApp.c_str(), len);
|
||||
RegCloseKey(keyHandle);
|
||||
|
||||
@@ -456,7 +456,7 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
||||
RegCreateKeyEx(HKEY_CURRENT_USER,subKey.c_str(),0, NULL, 0, KEY_ALL_ACCESS, NULL, &keyHandle, &dwDisposition);
|
||||
//Set the value.
|
||||
launchApp = L"megaglest.g3d";
|
||||
len = launchApp.length() + 1;
|
||||
len = (DWORD)launchApp.length() + 1;
|
||||
RegSetValueEx(keyHandle, NULL, 0, REG_SZ, (PBYTE)launchApp.c_str(), len);
|
||||
RegCloseKey(keyHandle);
|
||||
|
||||
|
Reference in New Issue
Block a user