summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJohn Peterson <jpeterson57@gmail.com>2009-11-12 19:26:25 +0000
committerJohn Peterson <jpeterson57@gmail.com>2009-11-12 19:26:25 +0000
commit013a27b13b05e3af4cdf0781b755d1bddbb606f5 (patch)
treeab0a95b1492c2f4b4d251363de3b3be07eb4e11b /Source/Core
parent088440ab126f4029d31ce6137d0752ea4fd9a9ee (diff)
Externals > Fixed SDL include
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4538 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/Src/Frame.cpp19
-rw-r--r--Source/Core/DolphinWX/Src/FrameTools.cpp2
2 files changed, 21 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp
index 4c7bd0afec..818b5cf55a 100644
--- a/Source/Core/DolphinWX/Src/Frame.cpp
+++ b/Source/Core/DolphinWX/Src/Frame.cpp
@@ -232,6 +232,7 @@ EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow)
EVT_MENU(IDM_INFO, CFrame::OnShow_InfoWindow)
+EVT_MENU(IDM_RESTART, CFrame::OnRestart)
EVT_MENU(IDM_CHANGEDISC, CFrame::OnChangeDisc)
EVT_MENU(IDM_LOAD_WII_MENU, CFrame::OnLoadWiiMenu)
EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen)
@@ -494,6 +495,24 @@ void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event))
Close(true);
}
+void CFrame::OnRestart(wxCommandEvent& WXUNUSED (event))
+{
+ if (Core::GetState() != Core::CORE_UNINITIALIZED)
+ {
+ wxMessageBox(wxT("Please stop the current game before restarting."), wxT("Notice"), wxOK, this);
+ return;
+ }
+ // Get exe path and restart
+ #ifdef _WIN32
+ char Str[MAX_PATH + 1];
+ DWORD Size = sizeof(Str)/sizeof(char);
+ DWORD n = GetModuleFileNameA(NULL, Str, Size);
+ ShellExecuteA(NULL, "open", Str, g_pCodeWindow ? "" : "-d", NULL, SW_SHOW);
+ #endif
+
+ Close(true);
+}
+
// --------
// Events
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index 970888c825..ff4c19a731 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -121,6 +121,8 @@ void CFrame::CreateMenu()
fileMenu->AppendSeparator();
fileMenu->Append(IDM_BROWSE, _T("&Browse for ISOs..."));
fileMenu->AppendSeparator();
+ fileMenu->Append(IDM_RESTART, g_pCodeWindow ? _T("Restart in regular mode") : _T("Restart in debugging mode"));
+ fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt+F4"));
m_MenuBar->Append(fileMenu, _T("&File"));