Initialize COM early as we call SHGetKnownFolderPath as part of crash reporter setup
This commit is contained in:
parent
8c1351a363
commit
c66b809d4e
1 changed files with 3 additions and 3 deletions
|
|
@ -229,9 +229,6 @@ int DoMain (HINSTANCE hInstance)
|
|||
WinWidth = cRect.right;
|
||||
WinHeight = cRect.bottom;
|
||||
|
||||
if (SUCCEEDED(CoInitialize(nullptr)))
|
||||
atexit ([](){ CoUninitialize(); }); // beware of calling convention.
|
||||
|
||||
int ret = GameMain ();
|
||||
|
||||
if (mainwindow.CheckForRestart())
|
||||
|
|
@ -296,6 +293,9 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE nothing, LPWSTR cmdline, int
|
|||
|
||||
InitCommonControls();
|
||||
|
||||
if (SUCCEEDED(CoInitialize(nullptr)))
|
||||
atexit([]() { CoUninitialize(); }); // beware of calling convention.
|
||||
|
||||
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||
// Uncomment this line to make the Visual C++ CRT check the heap before
|
||||
// every allocation and deallocation. This will be slow, but it can be a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue