Allow building with wxgtk 2.9.2 in Externals.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7155 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-02-12 22:31:57 +00:00
parent 8b166a3c6a
commit 5b75a59d2a
8 changed files with 3209 additions and 390 deletions

View File

@ -11,9 +11,10 @@ env['HAVE_WX'] = 1
wxenv = env.Clone()
wxenv['CCFLAGS'] += ['-Wno-deprecated-declarations', '-Wno-shadow']
wxenv['CCFLAGS'] += ['-Wno-shadow', '-Wno-sign-compare']
wxenv['CPPDEFINES'] += ['WXBUILDING']
if sys.platform == 'darwin':
wxenv['CCFLAGS'] += ['-Wno-deprecated-declarations']
wxenv['CPPDEFINES'] += ['__WXMAC__', '__WXOSX__'] # ['__WXOSX_COCOA__']
# gtk, msw, osx and shared files as of r66858
@ -287,8 +288,6 @@ expat = [
generic = [
'src/generic/aboutdlgg.cpp',
#'src/generic/accel.cpp',
'src/generic/animateg.cpp',
'src/generic/bmpcboxg.cpp',
'src/generic/busyinfo.cpp',
'src/generic/buttonbar.cpp',
@ -296,10 +295,7 @@ generic = [
'src/generic/caret.cpp',
'src/generic/choicbkg.cpp',
'src/generic/choicdgg.cpp',
'src/generic/clrpickerg.cpp',
'src/generic/collpaneg.cpp',
#'src/generic/colour.cpp',
'src/generic/colrdlgg.cpp',
'src/generic/combog.cpp',
'src/generic/commandlinkbuttong.cpp',
'src/generic/datavgen.cpp',
@ -307,15 +303,12 @@ generic = [
'src/generic/dbgrptg.cpp',
'src/generic/dcpsg.cpp',
'src/generic/dirctrlg.cpp',
'src/generic/dirdlgg.cpp',
'src/generic/dragimgg.cpp',
'src/generic/editlbox.cpp',
'src/generic/fdrepdlg.cpp',
'src/generic/filectrlg.cpp',
'src/generic/filedlgg.cpp',
'src/generic/filepickerg.cpp',
'src/generic/fontdlgg.cpp',
'src/generic/fontpickerg.cpp',
'src/generic/fswatcherg.cpp',
'src/generic/graphicc.cpp',
'src/generic/grid.cpp',
@ -326,8 +319,6 @@ generic = [
'src/generic/helpext.cpp',
'src/generic/htmllbox.cpp',
'src/generic/hyperlinkg.cpp',
#'src/generic/icon.cpp',
#'src/generic/imaglist.cpp',
'src/generic/infobar.cpp',
'src/generic/laywin.cpp',
'src/generic/listbkg.cpp',
@ -340,7 +331,6 @@ generic = [
'src/generic/notifmsgg.cpp',
'src/generic/numdlgg.cpp',
'src/generic/odcombo.cpp',
#'src/generic/paletteg.cpp',
'src/generic/panelg.cpp',
'src/generic/printps.cpp',
'src/generic/prntdlgg.cpp',
@ -373,6 +363,23 @@ generic = [
'src/generic/wizard.cpp',
]
genericgtk = [
'src/generic/accel.cpp',
'src/generic/icon.cpp',
'src/generic/imaglist.cpp',
'src/generic/paletteg.cpp',
]
genericosx = [
'src/generic/animateg.cpp',
'src/generic/clrpickerg.cpp',
'src/generic/collpaneg.cpp',
'src/generic/colrdlgg.cpp',
'src/generic/dirdlgg.cpp',
'src/generic/filedlgg.cpp',
'src/generic/fontpickerg.cpp',
]
gtk = [
'src/gtk/aboutdlg.cpp',
'src/gtk/animate.cpp',
@ -432,7 +439,7 @@ gtk = [
'src/gtk/notebook.cpp',
'src/gtk/pen.cpp',
'src/gtk/popupwin.cpp',
'src/gtk/print.cpp',
#'src/gtk/print.cpp',
'src/gtk/private.cpp',
'src/gtk/radiobox.cpp',
'src/gtk/radiobut.cpp',
@ -471,7 +478,7 @@ html = [
'src/html/helpfrm.cpp',
'src/html/helpwnd.cpp',
'src/html/htmlcell.cpp',
'src/html/htmlctrl/webkit/webkit.mm',
#'src/html/htmlctrl/webkit/webkit.mm',
'src/html/htmlfilt.cpp',
'src/html/htmlpars.cpp',
'src/html/htmltag.cpp',
@ -544,162 +551,162 @@ jpeg = [
]
msw = [
#'src/msw/aboutdlg.cpp',
#'src/msw/accel.cpp',
#'src/msw/app.cpp',
#'src/msw/artmsw.cpp',
#'src/msw/basemsw.cpp',
#'src/msw/bitmap.cpp',
#'src/msw/bmpbuttn.cpp',
#'src/msw/bmpcbox.cpp',
#'src/msw/brush.cpp',
#'src/msw/button.cpp',
#'src/msw/calctrl.cpp',
#'src/msw/caret.cpp',
#'src/msw/checkbox.cpp',
#'src/msw/checklst.cpp',
#'src/msw/choice.cpp',
#'src/msw/clipbrd.cpp',
#'src/msw/colordlg.cpp',
#'src/msw/colour.cpp',
#'src/msw/combo.cpp',
#'src/msw/combobox.cpp',
#'src/msw/commandlinkbutton.cpp',
#'src/msw/control.cpp',
#'src/msw/crashrpt.cpp',
#'src/msw/cursor.cpp',
#'src/msw/data.cpp',
#'src/msw/datecontrols.cpp',
#'src/msw/datectrl.cpp',
#'src/msw/dc.cpp',
#'src/msw/dcclient.cpp',
#'src/msw/dcmemory.cpp',
#'src/msw/dcprint.cpp',
#'src/msw/dcscreen.cpp',
#'src/msw/dde.cpp',
#'src/msw/debughlp.cpp',
#'src/msw/dialog.cpp',
#'src/msw/dialup.cpp',
#'src/msw/dib.cpp',
#'src/msw/dir.cpp',
#'src/msw/dirdlg.cpp',
#'src/msw/display.cpp',
#'src/msw/dlmsw.cpp',
#'src/msw/dragimag.cpp',
#'src/msw/enhmeta.cpp',
#'src/msw/evtloop.cpp',
#'src/msw/fdrepdlg.cpp',
#'src/msw/filedlg.cpp',
#'src/msw/font.cpp',
#'src/msw/fontdlg.cpp',
#'src/msw/fontenum.cpp',
#'src/msw/fontutil.cpp',
#'src/msw/frame.cpp',
#'src/msw/fswatcher.cpp',
#'src/msw/gauge.cpp',
#'src/msw/gdiimage.cpp',
#'src/msw/gdiobj.cpp',
#'src/msw/gdiplus.cpp',
#'src/msw/glcanvas.cpp',
#'src/msw/graphics.cpp',
#'src/msw/headerctrl.cpp',
#'src/msw/helpbest.cpp',
#'src/msw/helpchm.cpp',
#'src/msw/helpwin.cpp',
#'src/msw/hyperlink.cpp',
#'src/msw/icon.cpp',
#'src/msw/imaglist.cpp',
#'src/msw/iniconf.cpp',
#'src/msw/joystick.cpp',
#'src/msw/listbox.cpp',
#'src/msw/listctrl.cpp',
#'src/msw/main.cpp',
#'src/msw/mdi.cpp',
#'src/msw/mediactrl_am.cpp',
#'src/msw/mediactrl_qt.cpp',
#'src/msw/mediactrl_wmp10.cpp',
#'src/msw/menu.cpp',
#'src/msw/menuitem.cpp',
#'src/msw/metafile.cpp',
#'src/msw/microwin.c',
#'src/msw/mimetype.cpp',
#'src/msw/minifram.cpp',
#'src/msw/msgdlg.cpp',
#'src/msw/mslu.cpp',
#'src/msw/nativdlg.cpp',
#'src/msw/nativewin.cpp',
#'src/msw/notebook.cpp',
#'src/msw/notifmsg.cpp',
#'src/msw/ole/access.cpp',
#'src/msw/ole/activex.cpp',
#'src/msw/ole/automtn.cpp',
#'src/msw/ole/dataobj.cpp',
#'src/msw/ole/dropsrc.cpp',
#'src/msw/ole/droptgt.cpp',
#'src/msw/ole/oleutils.cpp',
#'src/msw/ole/uuid.cpp',
#'src/msw/ownerdrw.cpp',
#'src/msw/palette.cpp',
#'src/msw/pen.cpp',
#'src/msw/penwin.cpp',
#'src/msw/popupwin.cpp',
#'src/msw/power.cpp',
#'src/msw/printdlg.cpp',
#'src/msw/printwin.cpp',
#'src/msw/progdlg.cpp',
#'src/msw/radiobox.cpp',
#'src/msw/radiobut.cpp',
#'src/msw/regconf.cpp',
#'src/msw/region.cpp',
#'src/msw/registry.cpp',
#'src/msw/renderer.cpp',
#'src/msw/richmsgdlg.cpp',
#'src/msw/scrolbar.cpp',
#'src/msw/settings.cpp',
#'src/msw/slider.cpp',
#'src/msw/snglinst.cpp',
#'src/msw/sockmsw.cpp',
#'src/msw/sound.cpp',
#'src/msw/spinbutt.cpp',
#'src/msw/spinctrl.cpp',
#'src/msw/stackwalk.cpp',
#'src/msw/statbmp.cpp',
#'src/msw/statbox.cpp',
#'src/msw/statline.cpp',
#'src/msw/stattext.cpp',
#'src/msw/statusbar.cpp',
#'src/msw/stdpaths.cpp',
#'src/msw/taskbar.cpp',
#'src/msw/textctrl.cpp',
#'src/msw/textentry.cpp',
#'src/msw/tglbtn.cpp',
#'src/msw/thread.cpp',
#'src/msw/timer.cpp',
#'src/msw/toolbar.cpp',
#'src/msw/tooltip.cpp',
#'src/msw/toplevel.cpp',
#'src/msw/treectrl.cpp',
#'src/msw/uiaction.cpp',
#'src/msw/urlmsw.cpp',
#'src/msw/utils.cpp',
#'src/msw/utilsexc.cpp',
#'src/msw/utilsgui.cpp',
#'src/msw/uxtheme.cpp',
#'src/msw/version.rc',
#'src/msw/volume.cpp',
#'src/msw/wince/checklst.cpp',
#'src/msw/wince/choicece.cpp',
#'src/msw/wince/crt.cpp',
#'src/msw/wince/filedlgwce.cpp',
#'src/msw/wince/filefnwce.cpp',
#'src/msw/wince/helpwce.cpp',
#'src/msw/wince/menuce.cpp',
#'src/msw/wince/net.cpp',
#'src/msw/wince/tbarwce.cpp',
#'src/msw/wince/textctrlce.cpp',
#'src/msw/wince/time.cpp',
#'src/msw/window.cpp',
#'src/msw/winestub.c',
'src/msw/aboutdlg.cpp',
'src/msw/accel.cpp',
'src/msw/app.cpp',
'src/msw/artmsw.cpp',
'src/msw/basemsw.cpp',
'src/msw/bitmap.cpp',
'src/msw/bmpbuttn.cpp',
'src/msw/bmpcbox.cpp',
'src/msw/brush.cpp',
'src/msw/button.cpp',
'src/msw/calctrl.cpp',
'src/msw/caret.cpp',
'src/msw/checkbox.cpp',
'src/msw/checklst.cpp',
'src/msw/choice.cpp',
'src/msw/clipbrd.cpp',
'src/msw/colordlg.cpp',
'src/msw/colour.cpp',
'src/msw/combo.cpp',
'src/msw/combobox.cpp',
'src/msw/commandlinkbutton.cpp',
'src/msw/control.cpp',
'src/msw/crashrpt.cpp',
'src/msw/cursor.cpp',
'src/msw/data.cpp',
'src/msw/datecontrols.cpp',
'src/msw/datectrl.cpp',
'src/msw/dc.cpp',
'src/msw/dcclient.cpp',
'src/msw/dcmemory.cpp',
'src/msw/dcprint.cpp',
'src/msw/dcscreen.cpp',
'src/msw/dde.cpp',
'src/msw/debughlp.cpp',
'src/msw/dialog.cpp',
'src/msw/dialup.cpp',
'src/msw/dib.cpp',
'src/msw/dir.cpp',
'src/msw/dirdlg.cpp',
'src/msw/display.cpp',
'src/msw/dlmsw.cpp',
'src/msw/dragimag.cpp',
'src/msw/enhmeta.cpp',
'src/msw/evtloop.cpp',
'src/msw/fdrepdlg.cpp',
'src/msw/filedlg.cpp',
'src/msw/font.cpp',
'src/msw/fontdlg.cpp',
'src/msw/fontenum.cpp',
'src/msw/fontutil.cpp',
'src/msw/frame.cpp',
'src/msw/fswatcher.cpp',
'src/msw/gauge.cpp',
'src/msw/gdiimage.cpp',
'src/msw/gdiobj.cpp',
'src/msw/gdiplus.cpp',
'src/msw/glcanvas.cpp',
'src/msw/graphics.cpp',
'src/msw/headerctrl.cpp',
'src/msw/helpbest.cpp',
'src/msw/helpchm.cpp',
'src/msw/helpwin.cpp',
'src/msw/hyperlink.cpp',
'src/msw/icon.cpp',
'src/msw/imaglist.cpp',
'src/msw/iniconf.cpp',
'src/msw/joystick.cpp',
'src/msw/listbox.cpp',
'src/msw/listctrl.cpp',
'src/msw/main.cpp',
'src/msw/mdi.cpp',
'src/msw/mediactrl_am.cpp',
'src/msw/mediactrl_qt.cpp',
'src/msw/mediactrl_wmp10.cpp',
'src/msw/menu.cpp',
'src/msw/menuitem.cpp',
'src/msw/metafile.cpp',
'src/msw/microwin.c',
'src/msw/mimetype.cpp',
'src/msw/minifram.cpp',
'src/msw/msgdlg.cpp',
'src/msw/mslu.cpp',
'src/msw/nativdlg.cpp',
'src/msw/nativewin.cpp',
'src/msw/notebook.cpp',
'src/msw/notifmsg.cpp',
'src/msw/ole/access.cpp',
'src/msw/ole/activex.cpp',
'src/msw/ole/automtn.cpp',
'src/msw/ole/dataobj.cpp',
'src/msw/ole/dropsrc.cpp',
'src/msw/ole/droptgt.cpp',
'src/msw/ole/oleutils.cpp',
'src/msw/ole/uuid.cpp',
'src/msw/ownerdrw.cpp',
'src/msw/palette.cpp',
'src/msw/pen.cpp',
'src/msw/penwin.cpp',
'src/msw/popupwin.cpp',
'src/msw/power.cpp',
'src/msw/printdlg.cpp',
'src/msw/printwin.cpp',
'src/msw/progdlg.cpp',
'src/msw/radiobox.cpp',
'src/msw/radiobut.cpp',
'src/msw/regconf.cpp',
'src/msw/region.cpp',
'src/msw/registry.cpp',
'src/msw/renderer.cpp',
'src/msw/richmsgdlg.cpp',
'src/msw/scrolbar.cpp',
'src/msw/settings.cpp',
'src/msw/slider.cpp',
'src/msw/snglinst.cpp',
'src/msw/sockmsw.cpp',
'src/msw/sound.cpp',
'src/msw/spinbutt.cpp',
'src/msw/spinctrl.cpp',
'src/msw/stackwalk.cpp',
'src/msw/statbmp.cpp',
'src/msw/statbox.cpp',
'src/msw/statline.cpp',
'src/msw/stattext.cpp',
'src/msw/statusbar.cpp',
'src/msw/stdpaths.cpp',
'src/msw/taskbar.cpp',
'src/msw/textctrl.cpp',
'src/msw/textentry.cpp',
'src/msw/tglbtn.cpp',
'src/msw/thread.cpp',
'src/msw/timer.cpp',
'src/msw/toolbar.cpp',
'src/msw/tooltip.cpp',
'src/msw/toplevel.cpp',
'src/msw/treectrl.cpp',
'src/msw/uiaction.cpp',
'src/msw/urlmsw.cpp',
'src/msw/utils.cpp',
'src/msw/utilsexc.cpp',
'src/msw/utilsgui.cpp',
'src/msw/uxtheme.cpp',
'src/msw/version.rc',
'src/msw/volume.cpp',
'src/msw/wince/checklst.cpp',
'src/msw/wince/choicece.cpp',
'src/msw/wince/crt.cpp',
'src/msw/wince/filedlgwce.cpp',
'src/msw/wince/filefnwce.cpp',
'src/msw/wince/helpwce.cpp',
'src/msw/wince/menuce.cpp',
'src/msw/wince/net.cpp',
'src/msw/wince/tbarwce.cpp',
'src/msw/wince/textctrlce.cpp',
'src/msw/wince/time.cpp',
'src/msw/window.cpp',
'src/msw/winestub.c',
]
osx = [
@ -1122,34 +1129,37 @@ tiff = [
unix = [
'src/unix/apptraits.cpp',
'src/unix/appunix.cpp',
#'src/unix/dialup.cpp',
'src/unix/dir.cpp',
#'src/unix/displayx11.cpp',
'src/unix/dlunix.cpp',
'src/unix/epolldispatcher.cpp',
'src/unix/evtloopunix.cpp',
'src/unix/fdiounix.cpp',
#'src/unix/fontenum.cpp',
#'src/unix/fontutil.cpp',
#'src/unix/fswatcher_inotify.cpp',
'src/unix/fswatcher_kqueue.cpp',
#'src/unix/glx11.cpp',
#'src/unix/joystick.cpp',
#'src/unix/mediactrl.cpp',
#'src/unix/mimetype.cpp',
#'src/unix/net.cpp',
'src/unix/snglinst.cpp',
'src/unix/sockunix.cpp',
#'src/unix/sound.cpp',
#'src/unix/sound_sdl.cpp',
'src/unix/stackwalk.cpp',
'src/unix/stdpaths.cpp',
#'src/unix/taskbarx11.cpp',
'src/unix/threadpsx.cpp',
'src/unix/timerunx.cpp',
#'src/unix/uiactionx11.cpp',
'src/unix/utilsunx.cpp',
#'src/unix/utilsx11.cpp',
]
unixgtk = [
'src/unix/dialup.cpp',
'src/unix/displayx11.cpp',
'src/unix/fontenum.cpp',
'src/unix/fontutil.cpp',
'src/unix/fswatcher_inotify.cpp',
'src/unix/glx11.cpp',
'src/unix/joystick.cpp',
'src/unix/mediactrl.cpp',
'src/unix/mimetype.cpp',
'src/unix/sound.cpp',
'src/unix/sound_sdl.cpp',
'src/unix/taskbarx11.cpp',
'src/unix/uiactionx11.cpp',
'src/unix/utilsx11.cpp',
]
xrc = [
@ -1235,15 +1245,22 @@ zlib = [
'src/zlib/zutil.c',
]
if sys.platform == 'darwin':
env['LIBS'] += wxenv.StaticObject(osx)
env['LIBS'] += wxenv.StaticObject(unix)
else:
env['LIBS'] += wxenv.StaticObject(gtk)
env['LIBS'] += wxenv.StaticObject(unix)
env['LIBS'] += wxenv.StaticObject(aui)
env['LIBS'] += wxenv.StaticObject(common)
env['LIBS'] += wxenv.StaticObject(generic)
if sys.platform == 'darwin':
env['LIBS'] += wxenv.StaticObject(genericosx)
env['LIBS'] += wxenv.StaticObject(osx)
env['LIBS'] += wxenv.StaticObject(unix)
elif sys.platform == 'win32':
env['LIBS'] += wxenv.StaticObject(msw)
else:
env['LIBS'] += wxenv.StaticObject(genericgtk)
env['LIBS'] += wxenv.StaticObject(gtk)
env['LIBS'] += wxenv.StaticObject(unix)
env['LIBS'] += wxenv.StaticObject(unixgtk)
#env['LIBS'] += wxenv.StaticObject(html)
#env['LIBS'] += wxenv.StaticObject(propgrid)
#env['LIBS'] += wxenv.StaticObject(ribbon)

7
Externals/wxWidgets3/wx/setup.h vendored Normal file
View File

@ -0,0 +1,7 @@
#ifdef __APPLE__
#include "wx/wxcocoa.h"
#elif defined _WIN32
#include "wx/wxmsw.h"
#else
#include "wx/wxgtk.h"
#endif

1250
Externals/wxWidgets3/wx/wxgtk.h vendored Normal file

File diff suppressed because it is too large Load Diff

1541
Externals/wxWidgets3/wx/wxmsw.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -226,13 +226,18 @@ else:
if env['nowx']:
env['HAVE_WX'] = 0
else:
if not conf.CheckPKG('gtk+-2.0'):
print "gtk+-2.0 developement headers not detected"
print "gtk+-2.0 is required to build the WX GUI"
Exit(1)
env['CPPDEFINES'] += ['__WXGTK__']
conf.Define('HAVE_WX', 1)
env['HAVE_WX'] = conf.CheckWXConfig(2.8, 'aui adv core base'.split(),
env['flavor'] == 'debug')
conf.Define('HAVE_WX', env['HAVE_WX'])
wxconfig.ParseWXConfig(env)
if not env['HAVE_WX']:
if env['HAVE_WX']:
wxconfig.ParseWXConfig(env)
else:
print "wxWidgets not found - see config.log"
Exit(1)
env['HAVE_BLUEZ'] = conf.CheckPKG('bluez')
conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
@ -253,11 +258,6 @@ else:
conf.Define('HAVE_XRANDR', env['HAVE_XRANDR'])
conf.Define('HAVE_X11', env['HAVE_X11'])
if env['HAVE_WX'] and not conf.CheckPKG('gtk+-2.0'):
print "gtk+-2.0 developement headers not detected"
print "gtk+-2.0 is required to build the WX GUI"
Exit(1)
if not conf.CheckPKG('GL'):
print "Must have OpenGL to build"
Exit(1)

View File

@ -1,159 +1,159 @@
// Copyright (C) 2003 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
// -------------
// Purpose of this file: Collect boot settings for Core::Init()
// Call sequence: This file has one of the first function called when a game is booted,
// the boot sequence in the code is:
// DolphinWX: GameListCtrl.cpp OnActivated
// BootManager.cpp BootCore
// Core Core.cpp Init Thread creation
// EmuThread Calls CBoot::BootUp
// Boot.cpp CBoot::BootUp()
// CBoot::EmulatedBS2_Wii() / GC() or Load_BS2()
// Includes
// ----------------
#include <string>
#include <vector>
#include "Common.h"
#include "IniFile.h"
#include "BootManager.h"
#include "Volume.h"
#include "VolumeCreator.h"
#include "ConfigManager.h"
#include "SysConf.h"
#include "Core.h"
#include "Host.h"
namespace BootManager
{
// TODO this is an ugly hack which allows us to restore values trampled by per-game settings
// Apply fire liberally
struct ConfigCache
{
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE;
int iTLBHack;
};
static ConfigCache config_cache;
// Boot the ISO or file
bool BootCore(const std::string& _rFilename)
{
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
// Use custom settings for debugging mode
Host_SetStartupDebuggingParameters();
StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO;
StartUp.m_strFilename = _rFilename;
SConfig::GetInstance().m_LastFilename = _rFilename;
StartUp.bRunCompareClient = false;
StartUp.bRunCompareServer = false;
StartUp.hInstance = Host_GetInstance();
#if defined(_WIN32) && defined(_M_X64)
StartUp.bUseFastMem = true;
#endif
// If for example the ISO file is bad we return here
if (!StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT)) return false;
// Load game specific settings
IniFile game_ini;
std::string unique_id = StartUp.GetUniqueID();
StartUp.m_strGameIni = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + unique_id + ".ini";
if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str()))
{
config_cache.valid = true;
config_cache.bCPUThread = StartUp.bCPUThread;
config_cache.bSkipIdle = StartUp.bSkipIdle;
config_cache.bEnableFPRF = StartUp.bEnableFPRF;
config_cache.bMMU = StartUp.bMMU;
config_cache.bMMUBAT = StartUp.bMMUBAT;
config_cache.iTLBHack = StartUp.iTLBHack;
config_cache.bVBeam = StartUp.bVBeam;
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
config_cache.bMergeBlocks = StartUp.bMergeBlocks;
config_cache.bDSPHLE = StartUp.bDSPHLE;
// General settings
game_ini.Get("Core", "CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU);
game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT);
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam);
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
game_ini.Get("Core", "DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
// Wii settings
if (StartUp.bWii)
{
// Flush possible changes to SYSCONF to file
SConfig::GetInstance().m_SYSCONF->Save();
}
}
// Run the game
StartUp.hMainWindow = Host_GetRenderHandle();
// Init the core
if (!Core::Init())
{
PanicAlertT("Couldn't init the core.\nCheck your configuration.");
return false;
}
// Boot to pause or not
Core::SetState(StartUp.bBootToPause ? Core::CORE_PAUSE : Core::CORE_RUN);
return true;
}
void Stop()
{
Core::Stop();
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
if (config_cache.valid)
{
config_cache.valid = false;
StartUp.bCPUThread = config_cache.bCPUThread;
StartUp.bSkipIdle = config_cache.bSkipIdle;
StartUp.bEnableFPRF = config_cache.bEnableFPRF;
StartUp.bMMU = config_cache.bMMU;
StartUp.bMMUBAT = config_cache.bMMUBAT;
StartUp.iTLBHack = config_cache.iTLBHack;
StartUp.bVBeam = config_cache.bVBeam;
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
StartUp.bMergeBlocks = config_cache.bMergeBlocks;
StartUp.bDSPHLE = config_cache.bDSPHLE;
}
}
} // namespace
// Copyright (C) 2003 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
// -------------
// Purpose of this file: Collect boot settings for Core::Init()
// Call sequence: This file has one of the first function called when a game is booted,
// the boot sequence in the code is:
// DolphinWX: GameListCtrl.cpp OnActivated
// BootManager.cpp BootCore
// Core Core.cpp Init Thread creation
// EmuThread Calls CBoot::BootUp
// Boot.cpp CBoot::BootUp()
// CBoot::EmulatedBS2_Wii() / GC() or Load_BS2()
// Includes
// ----------------
#include <string>
#include <vector>
#include "Common.h"
#include "IniFile.h"
#include "BootManager.h"
#include "Volume.h"
#include "VolumeCreator.h"
#include "ConfigManager.h"
#include "SysConf.h"
#include "Core.h"
#include "Host.h"
namespace BootManager
{
// TODO this is an ugly hack which allows us to restore values trampled by per-game settings
// Apply fire liberally
struct ConfigCache
{
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE;
int iTLBHack;
};
static ConfigCache config_cache;
// Boot the ISO or file
bool BootCore(const std::string& _rFilename)
{
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
// Use custom settings for debugging mode
Host_SetStartupDebuggingParameters();
StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO;
StartUp.m_strFilename = _rFilename;
SConfig::GetInstance().m_LastFilename = _rFilename;
StartUp.bRunCompareClient = false;
StartUp.bRunCompareServer = false;
StartUp.hInstance = Host_GetInstance();
#if defined(_WIN32) && defined(_M_X64)
StartUp.bUseFastMem = true;
#endif
// If for example the ISO file is bad we return here
if (!StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT)) return false;
// Load game specific settings
IniFile game_ini;
std::string unique_id = StartUp.GetUniqueID();
StartUp.m_strGameIni = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + unique_id + ".ini";
if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str()))
{
config_cache.valid = true;
config_cache.bCPUThread = StartUp.bCPUThread;
config_cache.bSkipIdle = StartUp.bSkipIdle;
config_cache.bEnableFPRF = StartUp.bEnableFPRF;
config_cache.bMMU = StartUp.bMMU;
config_cache.bMMUBAT = StartUp.bMMUBAT;
config_cache.iTLBHack = StartUp.iTLBHack;
config_cache.bVBeam = StartUp.bVBeam;
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
config_cache.bMergeBlocks = StartUp.bMergeBlocks;
config_cache.bDSPHLE = StartUp.bDSPHLE;
// General settings
game_ini.Get("Core", "CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU);
game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT);
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam);
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
game_ini.Get("Core", "DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
// Wii settings
if (StartUp.bWii)
{
// Flush possible changes to SYSCONF to file
SConfig::GetInstance().m_SYSCONF->Save();
}
}
// Run the game
StartUp.hMainWindow = Host_GetRenderHandle();
// Init the core
if (!Core::Init())
{
PanicAlertT("Couldn't init the core.\nCheck your configuration.");
return false;
}
// Boot to pause or not
Core::SetState(StartUp.bBootToPause ? Core::CORE_PAUSE : Core::CORE_RUN);
return true;
}
void Stop()
{
Core::Stop();
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
if (config_cache.valid)
{
config_cache.valid = false;
StartUp.bCPUThread = config_cache.bCPUThread;
StartUp.bSkipIdle = config_cache.bSkipIdle;
StartUp.bEnableFPRF = config_cache.bEnableFPRF;
StartUp.bMMU = config_cache.bMMU;
StartUp.bMMUBAT = config_cache.bMMUBAT;
StartUp.iTLBHack = config_cache.iTLBHack;
StartUp.bVBeam = config_cache.bVBeam;
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
StartUp.bMergeBlocks = config_cache.bMergeBlocks;
StartUp.bDSPHLE = config_cache.bDSPHLE;
}
}
} // namespace

View File

@ -1,32 +1,32 @@
// Copyright (C) 2003 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/
#ifndef _BOOTMANAGER_H
#define _BOOTMANAGER_H
#include <string>
class GameListItem;
namespace BootManager
{
bool BootCore(const std::string& _rFilename);
void Stop();
};
#endif
// Copyright (C) 2003 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/
#ifndef _BOOTMANAGER_H
#define _BOOTMANAGER_H
#include <string>
class GameListItem;
namespace BootManager
{
bool BootCore(const std::string& _rFilename);
void Stop();
};
#endif

View File

@ -699,7 +699,11 @@ const GameListItem *CGameListCtrl::GetISO(int index) const
}
CGameListCtrl *caller;
#if wxCHECK_VERSION(2, 9, 0)
int wxCALLBACK wxListCompare(long item1, long item2, wxIntPtr sortData)
#else
int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
#endif
{
// return 1 if item1 > item2
// return -1 if item1 < item2