Core: It seems like different settings work on different systems. So I added a Setup.h file to allow local custom compilation settings. I avoided placing this in Common.h to avoid having to rebuild many files when the settings are changed.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2208 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2009-02-10 17:41:38 +00:00
parent 516a14150a
commit 5be14f1b72
3 changed files with 48 additions and 3 deletions

View File

@ -686,6 +686,10 @@
RelativePath=".\Src\SConscript"
>
</File>
<File
RelativePath=".\Src\Setup.h"
>
</File>
<File
RelativePath=".\Src\stdafx.cpp"
>

View File

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

View File

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