0
|
1 #include "OSAPI.h"
|
|
2 #include "OSInfo.h"
|
|
3 #include "Log.h"
|
|
4
|
|
5
|
|
6 OSVersion *pVersion = nullptr;
|
|
7
|
|
8 //----- (00462C94) --------------------------------------------------------
|
|
9 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
|
|
10 {
|
|
11 Log::Initialize();
|
50
|
12
|
|
13 //if (HWND hMM7Window = FindWindowW(L"MM7", 0))
|
|
14 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))
|
0
|
15 {
|
|
16 if (IsIconic(hMM7Window))
|
|
17 ShowWindow(hMM7Window, SW_RESTORE);
|
|
18 SetForegroundWindow(GetLastActivePopup(hMM7Window));
|
|
19 return 0;
|
|
20 }
|
|
21 HWND hPrevWindow = GetActiveWindow();
|
|
22
|
|
23 pVersion = new OSVersion;
|
|
24 {
|
23
|
25 Log::Warning(L"OS init: ok");
|
|
26
|
0
|
27 extern bool MM_Main(const wchar_t *pCmdLine);
|
|
28 MM_Main(lpCmdLine);
|
|
29 }
|
|
30 delete pVersion;
|
|
31 pVersion = nullptr;
|
|
32
|
|
33 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
|
|
34 if (hPrevWindow)
|
|
35 SetActiveWindow(hPrevWindow);
|
|
36
|
|
37 __debugbreak();
|
|
38 return 0;
|
|
39 }
|