correctly pause sound when resizing window

This commit is contained in:
spacy51 2007-12-16 02:18:26 +00:00
parent 7bf80601a1
commit 06abf42d45
2 changed files with 12 additions and 3 deletions

View File

@ -148,7 +148,9 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN800X600, OnOptionsVideoFullscreen800x600)
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN, OnOptionsVideoFullscreen)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN, OnUpdateOptionsVideoFullscreen)
ON_WM_MOVING()
ON_WM_MOVE()
ON_WM_SIZING()
ON_WM_SIZE()
ON_COMMAND(ID_OPTIONS_VIDEO_DISABLESFX, OnOptionsVideoDisablesfx)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_DISABLESFX, OnUpdateOptionsVideoDisablesfx)
@ -445,8 +447,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_FILTER_LCDCOLORS, OnUpdateOptionsFilterLcdcolors)
ON_COMMAND_EX_RANGE(ID_OPTIONS_SOUND_PCMINTERPOLATION_NONE, ID_OPTIONS_SOUND_PCMINTERPOLATION_LIBRESAMPLE, OnOptionsSoundPcminterpolation)
ON_UPDATE_COMMAND_UI_RANGE(ID_OPTIONS_SOUND_PCMINTERPOLATION_NONE, ID_OPTIONS_SOUND_PCMINTERPOLATION_LIBRESAMPLE, OnUpdateOptionsSoundPcminterpolation)
ON_WM_SETFOCUS()
ON_WM_KILLFOCUS()
ON_COMMAND(ID_SKIN_USE, &MainWnd::OnSkinUse)
ON_UPDATE_COMMAND_UI(ID_SKIN_USE, &MainWnd::OnUpdateSkinUse)
ON_COMMAND(ID_SKIN_SELECT, &MainWnd::OnSkinSelect)
@ -457,7 +457,6 @@ 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()
@ -776,6 +775,15 @@ void MainWnd::OnMove(int x, int y)
}
}
void MainWnd::OnSizing(UINT fwSide, LPRECT pRect)
{
CWnd::OnSizing(fwSide, pRect);
if( emulating ) {
soundPause();
}
}
void MainWnd::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);

View File

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