diff --git a/src/memgzio.h b/src/memgzio.h index 9489f993..f39273b5 100644 --- a/src/memgzio.h +++ b/src/memgzio.h @@ -9,11 +9,7 @@ * Adapted from original gzio.c from zlib library by Forgotten */ -#if defined(HAVE_ZUTIL_H) || defined(_MSC_VER) -# include -#else #include -#endif gzFile ZEXPORT memgzopen(char *memory, int, const char *); int ZEXPORT memgzread(gzFile, voidp, unsigned); diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 602e5f9f..91387111 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -440,6 +440,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd) ON_UPDATE_COMMAND_UI(ID_LOADGAME_DONOTCHANGEBATTERYSAVE, &MainWnd::OnUpdateLoadgameDonotchangebatterysave) ON_COMMAND(ID_OUTPUTAPI_XAUDIO2CONFIG, &MainWnd::OnOutputapiXaudio2config) ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_XAUDIO2CONFIG, &MainWnd::OnUpdateOutputapiXaudio2config) + ON_WM_ENTERSIZEMOVE() END_MESSAGE_MAP() @@ -1326,3 +1327,16 @@ void MainWnd::OnNcRButtonDown(UINT nHitTest, CPoint point) CWnd::OnNcRButtonDown(nHitTest, point); } + +void MainWnd::OnEnterSizeMove() +{ + // The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. + // Causes the emulator to stop when moving or resizing the window. + + if( emulating ) { + // pause sound before entering DefWindowProc + soundPause(); + } + + CWnd::OnEnterSizeMove(); +} diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index f8092f7d..84dbe486 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -405,4 +405,5 @@ public: afx_msg void OnUpdateLoadgameDonotchangebatterysave(CCmdUI *pCmdUI); DECLARE_MESSAGE_MAP() + afx_msg void OnEnterSizeMove(); }; diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index b042ed30..ef8815b4 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -564,13 +564,6 @@ BOOL VBA::InitInstance() trapPointers[2] = &VBA::updateRenderMethod; trapPointers[5] = &VBA::updateRenderMethod0; -#if _MSC_VER < 1400 -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif -#endif securityCheck = doProtection(); securityCheck2 = ((double)securityCheck < -0.987) ? 1 : securityCheck; mainTrapPointer = &trapPointers[(securityCheck2+1)<<1];