diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index b0993ec1a6..2cac5e54ac 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -686,6 +686,10 @@ RelativePath=".\Src\SConscript" > + + diff --git a/Source/Core/Common/Src/Setup.h b/Source/Core/Common/Src/Setup.h new file mode 100644 index 0000000000..29dd1e89b1 --- /dev/null +++ b/Source/Core/Common/Src/Setup.h @@ -0,0 +1,40 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + + +//////////////////////////////////////////////////////////////////////////////////////// +// File description +/* ŻŻŻŻŻŻŻŻŻ + + Compilation settings. This file can be kept on the ignore list in your SVN program. It + allows local optional settings depending on what works on your computer. + +////////////////////////*/ + + + +//////////////////////////////////////////////////////////////////////////////////////// +// Settings +// ŻŻŻŻŻŻŻŻŻ + +// This may fix a problem with Stop and Start that I described in the comments to revision 2,139 +//#define SETUP_FREE_PLUGIN_ON_BOOT + +// This may fix a semi-frequent hanging that occured when I used single core and render to main frame +//#define SETUP_AVOID_SINGLE_CORE_HANG_ON_STOP + +////////////////////////// \ No newline at end of file diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 58213faf20..6293490eee 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -25,6 +25,7 @@ #endif #include "Thread.h" // Common +#include "Setup.h" #include "Timer.h" #include "Common.h" #include "ConsoleWindow.h" @@ -321,7 +322,7 @@ THREAD_RETURN EmuThread(void *pArg) VideoInitialize.bWii = _CoreParameter.bWii; VideoInitialize.bUseDualCore = _CoreParameter.bUseDualCore; // Needed for Stop and Start - #ifdef _WIN32 + #ifdef SETUP_FREE_PLUGIN_ON_BOOT Plugins.FreeVideo(); #endif Plugins.GetVideo()->Initialize(&VideoInitialize); // Call the dll @@ -345,7 +346,7 @@ THREAD_RETURN EmuThread(void *pArg) dspInit.pEmulatorState = (int *)&PowerPC::state; dspInit.bWii = _CoreParameter.bWii; // Needed for Stop and Start - #ifdef _WIN32 + #ifdef SETUP_FREE_PLUGIN_ON_BOOT Plugins.FreeDSP(); #endif Plugins.GetDSP()->Initialize((void *)&dspInit); @@ -455,7 +456,7 @@ THREAD_RETURN EmuThread(void *pArg) thread right? So how can WaitForSingleObject() hang in it? */ bool bRenderToMainSingleCore = false; - #ifdef _WIN32 + #ifdef SETUP_AVOID_SINGLE_CORE_HANG_ON_STOP if (GetParent((HWND)g_pWindowHandle) == NULL || _CoreParameter.bUseDualCore) bRenderToMainSingleCore = true; #endif