Windows: Reduce focus juggling on game start.

Previously, we would activate the debugger (if enabled), and then
reactivate the main window.  This meant if you switched to something,
PPSSPP would demand focus once the game loaded.
This commit is contained in:
Unknown W. Brackets committed 2021-04-24 23:53:16 -07:00
1 parent 8d0ca1e4f1
commit 5f9dfeea86
5 files changed
+13 -10

No files matched your search

+8 -3
View File
@@ -30,11 +30,16 @@ void Dialog::Destroy()
DestroyWindow(m_hDlg);
}
void Dialog::Show(bool _bShow)
void Dialog::Show(bool _bShow, bool includeToTop)
{
m_bShowState = _bShow ? SW_NORMAL : SW_HIDE;
if (_bShow && includeToTop)
m_bShowState = SW_SHOWNORMAL;
else if (_bShow)
m_bShowState = SW_SHOWNOACTIVATE;
else
m_bShowState = SW_HIDE;
ShowWindow(m_hDlg, m_bShowState);
if (_bShow)
if (_bShow && includeToTop)
BringWindowToTop(m_hDlg);
}