Mercurial > might-and-magic-trilogy
view OSAPI.cpp @ 38:431e26f265a0
Слияние
author | Ritor1 |
---|---|
date | Thu, 18 Oct 2012 09:11:23 +0600 |
parents | 509744251c8e |
children | fde5c5acb66e |
line wrap: on
line source
#include "OSAPI.h" #include "OSInfo.h" #include "Log.h" OSVersion *pVersion = nullptr; //----- (00462C94) -------------------------------------------------------- int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd) { Log::Initialize(); if (HWND hMM7Window = FindWindowW(L"MM7", 0)) { if (IsIconic(hMM7Window)) ShowWindow(hMM7Window, SW_RESTORE); SetForegroundWindow(GetLastActivePopup(hMM7Window)); return 0; } HWND hPrevWindow = GetActiveWindow(); pVersion = new OSVersion; { Log::Warning(L"OS init: ok"); extern bool MM_Main(const wchar_t *pCmdLine); MM_Main(lpCmdLine); } delete pVersion; pVersion = nullptr; SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); if (hPrevWindow) SetActiveWindow(hPrevWindow); __debugbreak(); return 0; }