From ead076d335a88f4fccb520a00f9d618b72f28826 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Feb 2017 14:48:09 -0500 Subject: NetWindow: Get rid of direct use of the main_window global Utilizes the event system (which is what should have been done here initially), in order to prevent coupling between two different window frames. This also makes booting games more versatile using the UI event system, as the event can just act as a carrier for the filename, making directly calling boot functions unnecessary. All that's needed is for the event to propagate to the frame. --- Source/Core/DolphinWX/FrameTools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DolphinWX/FrameTools.cpp') diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index fb69f6ac0c..c40e6d0916 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -501,7 +501,7 @@ void CFrame::OnRecordExport(wxCommandEvent& WXUNUSED(event)) DoRecordingSave(); } -void CFrame::OnPlay(wxCommandEvent& WXUNUSED(event)) +void CFrame::OnPlay(wxCommandEvent& event) { if (Core::IsRunning()) { @@ -526,7 +526,7 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED(event)) else { // Core is uninitialized, start the game - BootGame(""); + BootGame(WxStrToStr(event.GetString())); } } -- cgit v1.2.3