From 08b923a1639e5545a700e5cf231c362ae9906d9d Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Fri, 28 Jan 2011 21:27:49 +0000 Subject: [PATCH] Fix OS X build. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6951 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 4 -- Source/Core/Common/Src/SConscript | 1 - .../Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h | 5 -- .../HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp | 6 ++ .../Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h | 2 +- Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp | 60 +++++++++---------- Source/Core/Core/Src/SConscript | 3 +- Source/Core/DebuggerWX/Src/SConscript | 6 +- Source/Core/DolphinWX/Src/ConfigMain.cpp | 2 +- Source/Core/DolphinWX/Src/SConscript | 4 +- .../ControllerInterface.cpp | 2 +- .../Src/ControllerInterface/OSX/NamedKeys.h | 4 +- 12 files changed, 47 insertions(+), 52 deletions(-) diff --git a/SConstruct b/SConstruct index a939276265..1b33b89194 100644 --- a/SConstruct +++ b/SConstruct @@ -361,10 +361,6 @@ dirs = [ 'Source/Core/VideoCommon/Src', 'Source/Core/VideoUICommon/Src', 'Source/DSPTool/Src', - 'Source/Plugins/Plugin_DSP_HLE/Src', - 'Source/Plugins/Plugin_DSP_LLE/Src', - #'Source/Plugins/Plugin_VideoDX11/Src', - #'Source/Plugins/Plugin_VideoDX9/Src', 'Source/Plugins/Plugin_VideoOGL/Src', 'Source/Plugins/Plugin_VideoSoftware/Src', 'Source/UnitTests', diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript index be35941ac6..3b16635440 100644 --- a/Source/Core/Common/Src/SConscript +++ b/Source/Core/Common/Src/SConscript @@ -32,7 +32,6 @@ files = [ "NandPaths.cpp", "OpenCL.cpp", "Plugin.cpp", - "PluginDSP.cpp", "PluginVideo.cpp", "SDCardUtil.cpp", "StringUtil.cpp", diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h index 01068debb7..3abe711c5b 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.h @@ -128,11 +128,6 @@ union ZeldaUnkPB u16 raw[16]; }; -namespace { - // If this miscompiles, adjust the size of ZeldaVoicePB to 0x180 bytes (0xc0 shorts). - CompileTimeAssert volatile ensure_zpb_size_correct; -} // namespace - class CUCode_Zelda : public IUCode { public: diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp index 2f47aec983..61d87ce5fb 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp @@ -231,6 +231,12 @@ void PrintObject(const T &Obj) char byte[2] = {0}; std::stringstream ss; u8 *o = (u8 *)&Obj; + + // If this miscompiles, adjust the size of + // ZeldaVoicePB to 0x180 bytes (0xc0 shorts). + CompileTimeAssert ensure_zpb_size_correct; + (void)ensure_zpb_size_correct; + for(int i = 0; i < sizeof(T); i++) { if((i > 0) && ((i & 1) == 0)) ss << " "; diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h index 7208f86ec9..360ca9f8f9 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h @@ -35,10 +35,10 @@ public: IUCode(DSPHLE *dsphle) : m_rMailHandler(dsphle->AccessMailHandler()) , m_UploadSetupInProgress(false) + , m_DSPHLE(dsphle) , m_NextUCode() , m_NextUCode_steps(0) , m_NeedsResumeMail(false) - , m_DSPHLE(dsphle) {} virtual ~IUCode() diff --git a/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp index 301b974110..6e608f2224 100644 --- a/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp +++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp @@ -43,9 +43,9 @@ DSPLLE::DSPLLE() { soundStream = NULL; - g_InitMixer = false; - bIsRunning = false; - cycle_count = 0; + m_InitMixer = false; + m_bIsRunning = false; + m_cycle_count = 0; } DSPLLE::~DSPLLE() { @@ -53,7 +53,7 @@ DSPLLE::~DSPLLE() { void DSPLLE::DoState(PointerWrap &p) { - p.Do(g_InitMixer); + p.Do(m_InitMixer); p.Do(g_dsp.r); p.Do(g_dsp.pc); @@ -77,7 +77,7 @@ void DSPLLE::DoState(PointerWrap &p) WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false); p.DoArray(g_dsp.dram, DSP_DRAM_SIZE); p.Do(cyclesLeft); - p.Do(cycle_count); + p.Do(m_cycle_count); } void DSPLLE::EmuStateChange(PLUGIN_EMUSTATE newState) @@ -102,16 +102,16 @@ void *DllDebugger(void *_hParent, bool Show) void DSPLLE::dsp_thread(DSPLLE *lpParameter) { DSPLLE *dsp_lle = (DSPLLE *)lpParameter; - while (dsp_lle->bIsRunning) + while (dsp_lle->m_bIsRunning) { - int cycles = (int)dsp_lle->cycle_count; + int cycles = (int)dsp_lle->m_cycle_count; if (cycles > 0) { if (dspjit) DSPCore_RunCycles(cycles); else DSPInterpreter::RunCycles(cycles); - Common::AtomicAdd(dsp_lle->cycle_count, -cycles); + Common::AtomicAdd(dsp_lle->m_cycle_count, -cycles); } // yield? } @@ -129,10 +129,10 @@ void DSPLLE::DSP_DebugBreak() void DSPLLE::Initialize(void *hWnd, bool bWii, bool bDSPThread) { - this->hWnd = hWnd; - this->bWii = bWii; - this->bDSPThread = bDSPThread; - g_InitMixer = false; + m_hWnd = hWnd; + m_bWii = bWii; + m_bDSPThread = bDSPThread; + m_InitMixer = false; bool bCanWork = true; char irom_file[MAX_PATH]; char coef_file[MAX_PATH]; @@ -160,14 +160,14 @@ void DSPLLE::Initialize(void *hWnd, bool bWii, bool bDSPThread) return; } - bIsRunning = true; + m_bIsRunning = true; InitInstructionTable(); - if (bDSPThread) + if (m_bDSPThread) { -// g_hDSPThread = new Common::Thread(dsp_thread, (void *)this); - g_hDSPThread = std::thread(dsp_thread, this); +// m_hDSPThread = new Common::Thread(dsp_thread, (void *)this); + m_hDSPThread = std::thread(dsp_thread, this); } /* ECTORTODO @@ -181,10 +181,10 @@ ECTORTODO void DSPLLE::DSP_StopSoundStream() { DSPInterpreter::Stop(); - bIsRunning = false; - if (bDSPThread) + m_bIsRunning = false; + if (m_bDSPThread) { - g_hDSPThread.join(); + m_hDSPThread.join(); } } @@ -197,16 +197,16 @@ void DSPLLE::Shutdown() u16 DSPLLE::DSP_WriteControlRegister(u16 _uFlag) { UDSPControl Temp(_uFlag); - if (!g_InitMixer) + if (!m_InitMixer) { if (!Temp.DSPHalt && Temp.DSPInit) { unsigned int AISampleRate, DACSampleRate; AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate); - soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate), hWnd); + soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate), m_hWnd); if(!soundStream) PanicAlert("Error starting up sound stream"); // Mixer is initialized - g_InitMixer = true; + m_InitMixer = true; } } DSPInterpreter::WriteCR(_uFlag); @@ -215,7 +215,7 @@ u16 DSPLLE::DSP_WriteControlRegister(u16 _uFlag) // and immediately process it, if it has. if (_uFlag & 2) { - if (!bDSPThread) + if (!m_bDSPThread) { DSPCore_CheckExternalInterrupt(); DSPCore_CheckExceptions(); @@ -301,16 +301,16 @@ void DSPLLE::DSP_Update(int cycles) else cycles_between_ss_update = 81000000 / 200; - cycle_count += cycles; - if (cycle_count > cycles_between_ss_update) + m_cycle_count += cycles; + if (m_cycle_count > cycles_between_ss_update) { - while (cycle_count > cycles_between_ss_update) - cycle_count -= cycles_between_ss_update; + while (m_cycle_count > cycles_between_ss_update) + m_cycle_count -= cycles_between_ss_update; soundStream->Update(); } */ // If we're not on a thread, run cycles here. - if (!bDSPThread) + if (!m_bDSPThread) { // ~1/6th as many cycles as the period PPC-side. DSPCore_RunCycles(dsp_cycles); @@ -318,9 +318,9 @@ void DSPLLE::DSP_Update(int cycles) else { // Wait for dsp thread to catch up reasonably. Note: this logic should be thought through. - while (cycle_count > dsp_cycles) + while (m_cycle_count > dsp_cycles) ; - Common::AtomicAdd(cycle_count, dsp_cycles); + Common::AtomicAdd(m_cycle_count, dsp_cycles); } } diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript index a749390f00..727e97338a 100644 --- a/Source/Core/Core/Src/SConscript +++ b/Source/Core/Core/Src/SConscript @@ -47,9 +47,8 @@ files = [ "HW/DSPHLE/UCodes/UCode_GBA.cpp", "HW/DSPHLE/UCodes/UCode_Zelda.cpp", "HW/DSPHLE/UCodes/UCode_Zelda_ADPCM.cpp", + "HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp", "HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp", - "HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp",) - "HW/DSPHLE/DSPHandler.cpp", "HW/DSPHLE/HLEMixer.cpp", "HW/DSPHLE/MailHandler.cpp", "HW/DSPHLE/DSPHLE.cpp", diff --git a/Source/Core/DebuggerWX/Src/SConscript b/Source/Core/DebuggerWX/Src/SConscript index e1419aac81..4b1b2a8761 100644 --- a/Source/Core/DebuggerWX/Src/SConscript +++ b/Source/Core/DebuggerWX/Src/SConscript @@ -11,10 +11,8 @@ files = [ "BreakpointWindow.cpp", "CodeWindow.cpp", "CodeWindowFunctions.cpp", - "Src/DSPDebugWindow.cpp", - "Src/DSPDebugWindow.h", - "Src/DSPRegisterView.cpp", - "Src/DSPRegisterView.h", + "DSPDebugWindow.cpp", + "DSPRegisterView.cpp", "MemoryCheckDlg.cpp", "MemoryWindow.cpp", "RegisterWindow.cpp", diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 4b1e85a698..675271f4fe 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -459,7 +459,7 @@ void CConfigMain::CreateGUIControls() Notebook->AddPage(GeneralPage, _("General")); Notebook->AddPage(DisplayPage, _("Display")); Notebook->AddPage(AudioPage, _("Audio")); - Notebook->AddPage(GamecubePage, _("Gamecube")); + Notebook->AddPage(GamecubePage, _("GC")); Notebook->AddPage(WiiPage, _("Wii")); Notebook->AddPage(PathsPage, _("Paths")); Notebook->AddPage(PluginsPage, _("Plugins")); diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index b93d8d530c..cb79f3a0c7 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -10,7 +10,7 @@ files = [ ] libs = [ - 'core', 'lzo2', 'discio', 'bdisasm', + 'audiocommon', 'core', 'dspcore', 'lzo2', 'discio', 'bdisasm', 'inputcommon', 'common', 'lua', 'z', 'sfml-network', ] @@ -24,6 +24,8 @@ if env['HAVE_WX']: 'ARCodeAddEdit.cpp', 'GeckoCodeDiag.cpp', 'ConfigMain.cpp', + 'DSPHLEConfigDlg.cpp', + 'DSPLLEConfigDlg.cpp', 'Frame.cpp', 'FrameAui.cpp', 'FrameTools.cpp', diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index 69e340d4f5..26c2d34474 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -470,7 +470,7 @@ void ControllerInterface::UpdateReference(ControllerInterface::ControlReference* else if ('`' == c) { // different device - if (false == std::getline(ss, dev_str, '`')) + if (false == /*XXX*/(bool)std::getline(ss, dev_str, '`')) break; } else diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h b/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h index ecb637cc07..40d16b1d92 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/NamedKeys.h @@ -166,9 +166,9 @@ { kHIDUsage_KeyboardLeftControl, "Left Control" }, { kHIDUsage_KeyboardLeftShift, "Left Shift" }, { kHIDUsage_KeyboardLeftAlt, "Left Alt" }, -{ kHIDUsage_KeyboardLeftGUI, "Left GUI" }, +{ kHIDUsage_KeyboardLeftGUI, "Left Command" }, { kHIDUsage_KeyboardRightControl, "Right Control" }, { kHIDUsage_KeyboardRightShift, "Right Shift" }, { kHIDUsage_KeyboardRightAlt, "Right Alt" }, -{ kHIDUsage_KeyboardRightGUI, "Right GUI" }, +{ kHIDUsage_KeyboardRightGUI, "Right Command" }, /* 0x4E - 0xFFFF Reserved */