pause sound while moving window

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@208 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2007-12-15 19:41:01 +00:00
parent 86320355b8
commit 7a87270133
2 changed files with 14 additions and 5 deletions

View File

@ -457,6 +457,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OPENAL, &MainWnd::OnUpdateOutputapiOpenal)
ON_COMMAND(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnOutputapiOalconfiguration)
ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnUpdateOutputapiOalconfiguration)
ON_WM_MOVING()
END_MESSAGE_MAP()
@ -746,6 +747,15 @@ void MainWnd::OnInitMenuPopup(CMenu* pMenu, UINT nIndex, BOOL bSysMenu)
}
}
void MainWnd::OnMoving(UINT fwSide, LPRECT pRect)
{
CWnd::OnMoving(fwSide, pRect);
if( emulating ) {
soundPause();
}
}
void MainWnd::OnMove(int x, int y)
{
CWnd::OnMove(x, y);
@ -1262,10 +1272,8 @@ void MainWnd::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
if(a && theApp.input) {
theApp.active = a;
theApp.input->activate();
if(!theApp.paused) {
if(emulating) {
soundResume();
}
if(!theApp.paused && emulating) {
soundResume();
}
} else {
theApp.wasPaused = true;

View File

@ -451,6 +451,7 @@ public:
afx_msg void OnUpdateOutputapiOpenal(CCmdUI *pCmdUI);
afx_msg void OnOutputapiOalconfiguration();
afx_msg void OnUpdateOutputapiOalconfiguration(CCmdUI *pCmdUI);
afx_msg void OnMoving(UINT fwSide, LPRECT pRect);
};
/////////////////////////////////////////////////////////////////////////////