diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 4bda38f1..ce126b6b 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -452,6 +452,8 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd) ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnUpdateOutputapiOalconfiguration) ON_COMMAND(ID_RENDERAPI_D3DMOTIONBLUR, &MainWnd::OnRenderapiD3dmotionblur) ON_UPDATE_COMMAND_UI(ID_RENDERAPI_D3DMOTIONBLUR, &MainWnd::OnUpdateRenderapiD3dmotionblur) + ON_WM_NCLBUTTONDOWN() + ON_WM_WINDOWPOSCHANGING() END_MESSAGE_MAP() @@ -1329,3 +1331,23 @@ LRESULT MainWnd::OnMySysCommand(WPARAM wParam, LPARAM lParam) } return Default(); } + +void MainWnd::OnNcLButtonDown(UINT nHitTest, CPoint point) +{ + // pause sound before process is halted + if( emulating ) { + soundPause(); + } + + CWnd::OnNcLButtonDown(nHitTest, point); +} + +void MainWnd::OnWindowPosChanging(WINDOWPOS* lpwndpos) +{ + CWnd::OnWindowPosChanging(lpwndpos); + + // pause sound before changing window position/size + if( emulating ) { + soundPause(); + } +} diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index b093a27b..00013a3a 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -445,6 +445,8 @@ public: afx_msg void OnSizing(UINT fwSide, LPRECT pRect); afx_msg void OnRenderapiD3dmotionblur(); afx_msg void OnUpdateRenderapiD3dmotionblur(CCmdUI *pCmdUI); + afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point); + afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos); }; /////////////////////////////////////////////////////////////////////////////