diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2012-05-16 09:27:37 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2012-05-16 09:27:37 +0200 |
| commit | fdff4cb1ffa76e894dd41ca5f97d31f122fd3f86 (patch) | |
| tree | 20059e8c98923d27f235c9f12de31be97e20240f /Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp | |
| parent | 2b77acc705eae11fdb4a25be6d6ea5db1fa52e21 (diff) | |
| parent | 5a8ad9230271a5088b0cf582932959214c6b5527 (diff) | |
Merge branch 'master' into wii-network
Conflicts:
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp
Source/VSProps/Dolphin.Win32.props
Source/VSProps/Dolphin.x64.props
Diffstat (limited to 'Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp b/Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp index a3dd9a9ab8..05915ecd20 100644 --- a/Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp +++ b/Source/Core/DolphinWX/Src/Debugger/CodeWindowFunctions.cpp @@ -187,35 +187,40 @@ void CCodeWindow::CreateMenuSymbols(wxMenuBar *pMenuBar) void CCodeWindow::OnProfilerMenu(wxCommandEvent& event) { - if (Core::GetState() == Core::CORE_RUN) { - event.Skip(); - return; - } switch (event.GetId()) { case IDM_PROFILEBLOCKS: - if (jit != NULL) jit->ClearCache(); + Core::SetState(Core::CORE_PAUSE); + if (jit != NULL) + jit->ClearCache(); Profiler::g_ProfileBlocks = GetMenuBar()->IsChecked(IDM_PROFILEBLOCKS); + Core::SetState(Core::CORE_RUN); break; case IDM_WRITEPROFILE: - if (jit != NULL) - { - std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt"; - File::CreateFullPath(filename); - Profiler::WriteProfileResults(filename.c_str()); + if (Core::GetState() == Core::CORE_RUN) + Core::SetState(Core::CORE_PAUSE); - wxFileType* filetype = NULL; - if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt")))) + if (Core::GetState() == Core::CORE_PAUSE && PowerPC::GetMode() == PowerPC::MODE_JIT) + { + if (jit != NULL) { - // From extension failed, trying with MIME type now - if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain")))) - // MIME type failed, aborting mission - break; + std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt"; + File::CreateFullPath(filename); + Profiler::WriteProfileResults(filename.c_str()); + + wxFileType* filetype = NULL; + if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt")))) + { + // From extension failed, trying with MIME type now + if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain")))) + // MIME type failed, aborting mission + break; + } + wxString OpenCommand; + OpenCommand = filetype->GetOpenCommand(wxString::From8BitData(filename.c_str())); + if(!OpenCommand.IsEmpty()) + wxExecute(OpenCommand, wxEXEC_SYNC); } - wxString OpenCommand; - OpenCommand = filetype->GetOpenCommand(wxString::From8BitData(filename.c_str())); - if(!OpenCommand.IsEmpty()) - wxExecute(OpenCommand, wxEXEC_SYNC); } break; } |
