pause sound when interacting with non-client area
This commit is contained in:
parent
444976b1be
commit
37f8f36407
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue