annotate OSAPI.cpp @ 1030:7735bdb3c30f

Doors and other bmodel triggers are now clickable.
author Nomad
date Tue, 21 May 2013 12:52:38 +0200
parents 739d8f3b50f9
children 39f42990698f
rev   line source
0
Ritor1
parents:
diff changeset
1 #include "OSAPI.h"
Ritor1
parents:
diff changeset
2 #include "OSInfo.h"
Ritor1
parents:
diff changeset
3 #include "Log.h"
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6 OSVersion *pVersion = nullptr;
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8
Ritor1
parents:
diff changeset
9 //----- (00462C94) --------------------------------------------------------
Ritor1
parents:
diff changeset
10 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
Ritor1
parents:
diff changeset
11 {
Ritor1
parents:
diff changeset
12 Log::Initialize();
Ritor1
parents:
diff changeset
13
Ritor1
parents:
diff changeset
14 //if (HWND hMM7Window = FindWindowW(L"MM7", 0))
Ritor1
parents:
diff changeset
15 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))
Ritor1
parents:
diff changeset
16 {
Ritor1
parents:
diff changeset
17 if (IsIconic(hMM7Window))
Ritor1
parents:
diff changeset
18 ShowWindow(hMM7Window, SW_RESTORE);
Ritor1
parents:
diff changeset
19 SetForegroundWindow(GetLastActivePopup(hMM7Window));
Ritor1
parents:
diff changeset
20 return 0;
Ritor1
parents:
diff changeset
21 }
Ritor1
parents:
diff changeset
22 HWND hPrevWindow = GetActiveWindow();
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24 pVersion = new OSVersion;
Ritor1
parents:
diff changeset
25 {
Ritor1
parents:
diff changeset
26 Log::Warning(L"OS init: ok");
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28 extern bool MM_Main(const wchar_t *pCmdLine);
Ritor1
parents:
diff changeset
29 MM_Main(lpCmdLine);
Ritor1
parents:
diff changeset
30 }
Ritor1
parents:
diff changeset
31 delete pVersion;
Ritor1
parents:
diff changeset
32 pVersion = nullptr;
Ritor1
parents:
diff changeset
33
Ritor1
parents:
diff changeset
34 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
Ritor1
parents:
diff changeset
35 if (hPrevWindow)
Ritor1
parents:
diff changeset
36 SetActiveWindow(hPrevWindow);
Ritor1
parents:
diff changeset
37
28
739d8f3b50f9 ReleaseSoundData fix
zipi@zipi-PC
parents: 0
diff changeset
38 //__debugbreak();
0
Ritor1
parents:
diff changeset
39 return 0;
Ritor1
parents:
diff changeset
40 }