annotate OSAPI.cpp @ 1147:9ba9fd8e6d68

sub_451007_scale_image_bicubic cleanup - some more code shuffling
author Grumpy7
date Sun, 02 Jun 2013 03:59:13 +0200
parents 39f42990698f
children c4ab816fcc5e
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
1038
39f42990698f Cleanings
Nomad
parents: 28
diff changeset
9
0
Ritor1
parents:
diff changeset
10 //----- (00462C94) --------------------------------------------------------
Ritor1
parents:
diff changeset
11 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
Ritor1
parents:
diff changeset
12 {
Ritor1
parents:
diff changeset
13 Log::Initialize();
Ritor1
parents:
diff changeset
14
Ritor1
parents:
diff changeset
15 //if (HWND hMM7Window = FindWindowW(L"MM7", 0))
Ritor1
parents:
diff changeset
16 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))
Ritor1
parents:
diff changeset
17 {
Ritor1
parents:
diff changeset
18 if (IsIconic(hMM7Window))
Ritor1
parents:
diff changeset
19 ShowWindow(hMM7Window, SW_RESTORE);
Ritor1
parents:
diff changeset
20 SetForegroundWindow(GetLastActivePopup(hMM7Window));
Ritor1
parents:
diff changeset
21 return 0;
Ritor1
parents:
diff changeset
22 }
Ritor1
parents:
diff changeset
23 HWND hPrevWindow = GetActiveWindow();
Ritor1
parents:
diff changeset
24
Ritor1
parents:
diff changeset
25 pVersion = new OSVersion;
Ritor1
parents:
diff changeset
26 {
Ritor1
parents:
diff changeset
27 Log::Warning(L"OS init: ok");
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29 extern bool MM_Main(const wchar_t *pCmdLine);
Ritor1
parents:
diff changeset
30 MM_Main(lpCmdLine);
Ritor1
parents:
diff changeset
31 }
Ritor1
parents:
diff changeset
32 delete pVersion;
Ritor1
parents:
diff changeset
33 pVersion = nullptr;
Ritor1
parents:
diff changeset
34
Ritor1
parents:
diff changeset
35 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
Ritor1
parents:
diff changeset
36 if (hPrevWindow)
Ritor1
parents:
diff changeset
37 SetActiveWindow(hPrevWindow);
Ritor1
parents:
diff changeset
38
28
739d8f3b50f9 ReleaseSoundData fix
zipi@zipi-PC
parents: 0
diff changeset
39 //__debugbreak();
0
Ritor1
parents:
diff changeset
40 return 0;
Ritor1
parents:
diff changeset
41 }