summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Frame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index 5284eefd57..1807c5e53b 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -425,6 +425,7 @@ CFrame::CFrame(wxFrame* parent,
Movie::SetInputManip(TASManipFunction);
State::SetOnAfterLoadCallback(OnAfterLoadCallback);
+ Core::SetOnStoppedCallback(OnStoppedCallback);
// Setup perspectives
if (g_pCodeWindow)
@@ -692,6 +693,10 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
case WM_USER_STOP:
DoStop();
break;
+
+ case IDM_STOPPED:
+ OnStopped();
+ break;
}
}
@@ -904,6 +909,16 @@ void OnAfterLoadCallback()
}
}
+void OnStoppedCallback()
+{
+ // warning: this gets called from the EmuThread, so we should only queue things to do on the proper thread
+ if (main_frame)
+ {
+ wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_STOPPED);
+ main_frame->GetEventHandler()->AddPendingEvent(event);
+ }
+}
+
void TASManipFunction(SPADStatus *PadStatus, int controllerID)
{
if (main_frame)