Mercurial > mm7
changeset 2414:0673a59ec9e5
Слияние
author | Ritor1 |
---|---|
date | Wed, 16 Jul 2014 18:28:23 +0600 |
parents | e2d352b3a0a5 (current diff) e7a551f458e1 (diff) |
children | f4af3b203f65 |
files | |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/AudioPlayer.cpp Wed Jul 16 18:28:14 2014 +0600 +++ b/AudioPlayer.cpp Wed Jul 16 18:28:23 2014 +0600 @@ -85,8 +85,7 @@ pSoundDesc = &pSoundList->pSL_Sounds[i]; if ( pSoundList->pSL_Sounds[i].eType != SOUND_DESC_SYSTEM ) continue; - sprintf(pSoundName, "%s", pSL_Sounds[i].pSoundName); - pSoundList->pSL_Sounds[i].pSoundData[0] = ::LoadSound(pSoundName, (SoundData *)-1, pSL_Sounds[i].uSoundID); + pSoundList->pSL_Sounds[i].pSoundData[0] = ::LoadSound(pSoundName, (SoundData *)-1, pSL_Sounds[i].uSoundID); // Ritor result crash exe file if ( !pAudioPlayer->b3DSoundInitialized ) continue; pSoundDesc = &pSoundList->pSL_Sounds[i];
--- a/OSAPI.cpp Wed Jul 16 18:28:14 2014 +0600 +++ b/OSAPI.cpp Wed Jul 16 18:28:23 2014 +0600 @@ -16,15 +16,17 @@ Log::Initialize(); //if (HWND hMM7Window = FindWindowW(L"MM7", 0)) - if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0)) + if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))//check whether the window is open( ) { if (IsIconic(hMM7Window)) ShowWindow(hMM7Window, SW_RESTORE); SetForegroundWindow(GetLastActivePopup(hMM7Window)); return 0; } - + //GetActiveWindow() (p ). + // , , , 0. HWND hPrevWindow = GetActiveWindow(); + if (!hPrevWindow) { Log::Warning(L"OS init: ok"); extern bool MM_Main(const wchar_t *pCmdLine);