Merge pull request #395 from RachelBryk/race

Fix a couple race conditions.
This commit is contained in:
Ryan Houdek 2014-06-07 01:10:51 -05:00
commit 7d12a31cc2
3 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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"
@ -85,7 +86,7 @@ protected:
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'."),