Skip to content

Commit

Permalink
Merge pull request #395 from RachelBryk/race
Browse files Browse the repository at this point in the history
Fix a couple race conditions.
  • Loading branch information
Sonicadvance1 committed Jun 7, 2014
2 parents b591184 + e6684d1 commit 7d12a31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Source/Core/DolphinWX/ConfigMain.cpp
Expand Up @@ -882,6 +882,8 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
{
// Core - Basic
case ID_CPUTHREAD:
if (Core::GetState() != Core::CORE_UNINITIALIZED)
return;
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = CPUThread->IsChecked();
break;
case ID_IDLESKIP:
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinWX/FrameTools.cpp
Expand Up @@ -908,6 +908,8 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
// Prepare the GUI to start the game.
void CFrame::StartGame(const std::string& filename)
{
if (m_bGameLoading)
return;
m_bGameLoading = true;

if (m_ToolBar)
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinWX/VideoConfigDiag.h
Expand Up @@ -20,6 +20,7 @@
#include "Common/CommonTypes.h"
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/WxUtils.h"
#include "VideoCommon/VideoBackendBase.h"
Expand Down Expand Up @@ -85,7 +86,7 @@ class VideoConfigDiag : public wxDialog
VideoBackend* new_backend = g_available_video_backends[ev.GetInt()];
if (g_video_backend != new_backend)
{
bool do_switch = true;
bool do_switch = Core::GetState() == Core::CORE_UNINITIALIZED;
if (new_backend->GetName() == "Software Renderer")
{
do_switch = (wxYES == wxMessageBox(_("Software rendering is an order of magnitude slower than using the other backends.\nIt's only useful for debugging purposes.\nDo you really want to enable software rendering? If unsure, select 'No'."),
Expand Down

0 comments on commit 7d12a31

Please sign in to comment.