Fix OS X build.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6951 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-01-28 21:27:49 +00:00
parent f283041970
commit 08b923a163
12 changed files with 47 additions and 52 deletions

View File

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

View File

@ -32,7 +32,6 @@ files = [
"NandPaths.cpp",
"OpenCL.cpp",
"Plugin.cpp",
"PluginDSP.cpp",
"PluginVideo.cpp",
"SDCardUtil.cpp",
"StringUtil.cpp",

View File

@ -128,11 +128,6 @@ union ZeldaUnkPB
u16 raw[16];
};
namespace {
// If this miscompiles, adjust the size of ZeldaVoicePB to 0x180 bytes (0xc0 shorts).
CompileTimeAssert<sizeof(ZeldaVoicePB) == 0x180> volatile ensure_zpb_size_correct;
} // namespace
class CUCode_Zelda : public IUCode
{
public:

View File

@ -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<sizeof(ZeldaVoicePB) == 0x180> ensure_zpb_size_correct;
(void)ensure_zpb_size_correct;
for(int i = 0; i < sizeof(T); i++) {
if((i > 0) && ((i & 1) == 0))
ss << " ";

View File

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

View File

@ -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);
}
}

View File

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

View File

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

View File

@ -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"));

View File

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

View File

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

View File

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