mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
Flash netplay window when someone joins if the window doesn't have focus.
This commit is contained in:
parent
b58753bd69
commit
cd299f0703
@ -545,6 +545,17 @@ void NetPlayDiag::OnThread(wxCommandEvent& event)
|
|||||||
|
|
||||||
m_player_lbox->SetSelection(selection);
|
m_player_lbox->SetSelection(selection);
|
||||||
|
|
||||||
|
// flash window in taskbar when someone joins if window isn't active
|
||||||
|
static u8 numPlayers = 1;
|
||||||
|
bool focus = (wxWindow::FindFocus() == this || (wxWindow::FindFocus() != nullptr && wxWindow::FindFocus()->GetParent() == this) ||
|
||||||
|
(wxWindow::FindFocus() != nullptr && wxWindow::FindFocus()->GetParent() != nullptr
|
||||||
|
&& wxWindow::FindFocus()->GetParent()->GetParent() == this));
|
||||||
|
if (netplay_server != nullptr && numPlayers < m_playerids.size() && !focus)
|
||||||
|
{
|
||||||
|
RequestUserAttention();
|
||||||
|
}
|
||||||
|
numPlayers = m_playerids.size();
|
||||||
|
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
case NP_GUI_EVT_CHANGE_GAME :
|
case NP_GUI_EVT_CHANGE_GAME :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user