Fix a couple race conditions.
Checks if another game is already starting to boot before starting to boot a new one, and only change video backend, and dual core if a game is actually not running.
This commit is contained in:
parent
b58753bd69
commit
e6684d17c1
|
@ -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:
|
||||
|
|
|
@ -888,6 +888,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)
|
||||
|
|
|
@ -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'."),
|
||||
|
|
Loading…
Reference in New Issue