mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 03:32:35 +01:00
Fixed registry issue discovered by Carl the Great related to file associations to g3d
This commit is contained in:
parent
edd9ae1fca
commit
b4a13ae903
@ -455,7 +455,6 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
||||
auto_ptr<wchar_t> wstr(Ansi2WideString(appPath.c_str()));
|
||||
|
||||
wstring launchApp = wstring(wstr.get()) + L" \"%1\"";
|
||||
//DWORD len = (DWORD)launchApp.length() + 1;
|
||||
DWORD len = (launchApp.size() + 1) * sizeof(wchar_t);
|
||||
RegSetValueEx(keyHandle, NULL, 0, REG_SZ, (PBYTE)launchApp.c_str(), len);
|
||||
RegCloseKey(keyHandle);
|
||||
@ -464,7 +463,6 @@ 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 = (DWORD)launchApp.length() + 1;
|
||||
len = (launchApp.size() + 1) * sizeof(wchar_t);
|
||||
RegSetValueEx(keyHandle, NULL, 0, REG_SZ, (PBYTE)launchApp.c_str(), len);
|
||||
RegCloseKey(keyHandle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user