Some more work on renaming variables and files to reflect that the plugins are no longer plugins.

Fix another minor issue with frame dumping.
Add the graphics config dialog button back to the main config.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7041 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-02-02 16:34:12 +00:00
parent 6f93d77106
commit 5a800b765a
33 changed files with 161 additions and 164 deletions

View File

@ -29,8 +29,8 @@ Usage: Dolphin [-h] [-d] [-l] [-e <str>] [-b] [-V <str>] [-A <str>]
-l, --logger Opens the logger -l, --logger Opens the logger
-e, --exec=<str> Loads the specified file (DOL, ELF, WAD, GCM, ISO) -e, --exec=<str> Loads the specified file (DOL, ELF, WAD, GCM, ISO)
-b, --batch Exit Dolphin with emulator -b, --batch Exit Dolphin with emulator
-V, --video_plugin=<str> Specify a video plugin -V, --video_backend=<str> Specify a video plugin
-A, --audio_plugin=<str> Specify an audio plugin -A, --audio_emulation=<str> Specify low level (LLE) or high level (HLE) audio emulation
[Libraries] [Libraries]
Cg: Cg Shading API (http://developer.nvidia.com/object/cg_toolkit.html) Cg: Cg Shading API (http://developer.nvidia.com/object/cg_toolkit.html)
@ -40,10 +40,10 @@ Cg: Cg Shading API (http://developer.nvidia.com/object/cg_toolkit.html)
Plugin_DSP_HLE: High Level DSP Emulation Plugin_DSP_HLE: High Level DSP Emulation
Plugin_DSP_LLE: Low Level DSP Emulation Plugin_DSP_LLE: Low Level DSP Emulation
[Video Plugins] [Video Backends]
Plugin_VideoDX9: Render with Direct3D 9 Direct3D9: Render with Direct3D 9
Plugin_VideoDX11: Render with Direct3D 11 Direct3D11: Render with Direct3D 11
Plugin_VideoOGL: Render with OpenGL + Cg Shader Language OpenGL: Render with OpenGL + Cg Shader Language
[Sys Files] [Sys Files]
totaldb.dsy: Database of symbols (for devs only) totaldb.dsy: Database of symbols (for devs only)

View File

@ -6,13 +6,13 @@ set(SRCS Src/ActionReplay.cpp
Src/CoreParameter.cpp Src/CoreParameter.cpp
Src/CoreRerecording.cpp Src/CoreRerecording.cpp
Src/CoreTiming.cpp Src/CoreTiming.cpp
Src/DSPEmulator.cpp
Src/GeckoCodeConfig.cpp Src/GeckoCodeConfig.cpp
Src/GeckoCode.cpp Src/GeckoCode.cpp
Src/LuaInterface.cpp Src/LuaInterface.cpp
Src/MemTools.cpp Src/MemTools.cpp
Src/OnFrame.cpp Src/OnFrame.cpp
Src/PatchEngine.cpp Src/PatchEngine.cpp
Src/PluginDSP.cpp
Src/State.cpp Src/State.cpp
Src/stdafx.cpp Src/stdafx.cpp
Src/Tracer.cpp Src/Tracer.cpp

View File

@ -1974,11 +1974,11 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\PluginDSP.cpp" RelativePath=".\Src\DSPEmulator.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Src\PluginDSP.h" RelativePath=".\Src\DSPEmulator.h"
> >
</File> </File>
<File <File

View File

@ -393,7 +393,7 @@
<ClCompile Include="Src\MemTools.cpp" /> <ClCompile Include="Src\MemTools.cpp" />
<ClCompile Include="Src\OnFrame.cpp" /> <ClCompile Include="Src\OnFrame.cpp" />
<ClCompile Include="Src\PatchEngine.cpp" /> <ClCompile Include="Src\PatchEngine.cpp" />
<ClCompile Include="Src\PluginDSP.cpp" /> <ClCompile Include="Src\DSPEmulator.cpp" />
<ClCompile Include="Src\PowerPC\Interpreter\Interpreter.cpp" /> <ClCompile Include="Src\PowerPC\Interpreter\Interpreter.cpp" />
<ClCompile Include="Src\PowerPC\Interpreter\Interpreter_Branch.cpp" /> <ClCompile Include="Src\PowerPC\Interpreter\Interpreter_Branch.cpp" />
<ClCompile Include="Src\PowerPC\Interpreter\Interpreter_FloatingPoint.cpp" /> <ClCompile Include="Src\PowerPC\Interpreter\Interpreter_FloatingPoint.cpp" />
@ -584,7 +584,7 @@
<ClInclude Include="Src\MemTools.h" /> <ClInclude Include="Src\MemTools.h" />
<ClInclude Include="Src\OnFrame.h" /> <ClInclude Include="Src\OnFrame.h" />
<ClInclude Include="Src\PatchEngine.h" /> <ClInclude Include="Src\PatchEngine.h" />
<ClInclude Include="Src\PluginDSP.h" /> <ClInclude Include="Src\DSPEmulator.h" />
<ClInclude Include="Src\PowerPC\CPUCoreBase.h" /> <ClInclude Include="Src\PowerPC\CPUCoreBase.h" />
<ClInclude Include="Src\PowerPC\Gekko.h" /> <ClInclude Include="Src\PowerPC\Gekko.h" />
<ClInclude Include="Src\PowerPC\Interpreter\Interpreter.h" /> <ClInclude Include="Src\PowerPC\Interpreter\Interpreter.h" />

View File

@ -10,7 +10,7 @@
<ClCompile Include="Src\MemTools.cpp" /> <ClCompile Include="Src\MemTools.cpp" />
<ClCompile Include="Src\OnFrame.cpp" /> <ClCompile Include="Src\OnFrame.cpp" />
<ClCompile Include="Src\PatchEngine.cpp" /> <ClCompile Include="Src\PatchEngine.cpp" />
<ClCompile Include="Src\PluginDSP.cpp" /> <ClCompile Include="Src\DSPEmulator.cpp" />
<ClCompile Include="Src\State.cpp" /> <ClCompile Include="Src\State.cpp" />
<ClCompile Include="Src\stdafx.cpp" /> <ClCompile Include="Src\stdafx.cpp" />
<ClCompile Include="Src\Tracer.cpp" /> <ClCompile Include="Src\Tracer.cpp" />
@ -539,7 +539,7 @@
<ClInclude Include="Src\MemTools.h" /> <ClInclude Include="Src\MemTools.h" />
<ClInclude Include="Src\OnFrame.h" /> <ClInclude Include="Src\OnFrame.h" />
<ClInclude Include="Src\PatchEngine.h" /> <ClInclude Include="Src\PatchEngine.h" />
<ClInclude Include="Src\PluginDSP.h" /> <ClInclude Include="Src\DSPEmulator.h" />
<ClInclude Include="Src\State.h" /> <ClInclude Include="Src\State.h" />
<ClInclude Include="Src\stdafx.h" /> <ClInclude Include="Src\stdafx.h" />
<ClInclude Include="Src\Tracer.h" /> <ClInclude Include="Src\Tracer.h" />
@ -1119,4 +1119,4 @@
<UniqueIdentifier>{1c21a3e1-b791-4a23-b0d5-ed2b2c34007f}</UniqueIdentifier> <UniqueIdentifier>{1c21a3e1-b791-4a23-b0d5-ed2b2c34007f}</UniqueIdentifier>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -182,9 +182,8 @@ void SConfig::SaveSettings()
ini.Set("Core", "FrameLimit", m_Framelimit); ini.Set("Core", "FrameLimit", m_Framelimit);
ini.Set("Core", "UseFPS", b_UseFPS); ini.Set("Core", "UseFPS", b_UseFPS);
// Plugins // GFX Backend
// TODO: change key name, it's no longer a plugin ini.Set("Core", "GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX)); ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
m_SYSCONF->Save(); m_SYSCONF->Save();
@ -313,9 +312,8 @@ void SConfig::LoadSettings()
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default
// Plugins // GFX Backend
// TODO: change key name, it's no longer a plugin ini.Get("Core", "GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, "");
} }
m_SYSCONF = new SysConf(); m_SYSCONF = new SysConf();

View File

@ -34,10 +34,6 @@ struct SConfig : NonCopyable
bool m_WiiAutoReconnect[4]; bool m_WiiAutoReconnect[4];
bool m_WiiAutoUnpair; bool m_WiiAutoUnpair;
// hard coded default plugins ...
std::string m_DefaultGFXPlugin;
std::string m_DefaultDSPPlugin;
// name of the last used filename // name of the last used filename
std::string m_LastFilename; std::string m_LastFilename;

View File

@ -54,7 +54,7 @@
#include "PowerPC/PowerPC.h" #include "PowerPC/PowerPC.h"
#include "PowerPC/JitCommon/JitBase.h" #include "PowerPC/JitCommon/JitBase.h"
#include "PluginDSP.h" #include "DSPEmulator.h"
#include "ConfigManager.h" #include "ConfigManager.h"
#include "VideoBackendBase.h" #include "VideoBackendBase.h"
@ -314,7 +314,7 @@ void EmuThread()
g_video_backend->Initialize(); g_video_backend->Initialize();
g_pWindowHandle = _CoreParameter.hMainWindow; g_pWindowHandle = _CoreParameter.hMainWindow;
DSP::GetPlugin()->Initialize(g_pWindowHandle, _CoreParameter.bWii, _CoreParameter.bDSPThread); DSP::GetDSPEmulator()->Initialize(g_pWindowHandle, _CoreParameter.bWii, _CoreParameter.bDSPThread);
Pad::Initialize(g_pWindowHandle); Pad::Initialize(g_pWindowHandle);
@ -411,7 +411,7 @@ void EmuThread()
// Stop audio thread - Actually this does nothing on HLE plugin. // Stop audio thread - Actually this does nothing on HLE plugin.
// But stops the DSP Interpreter on LLE plugin. // But stops the DSP Interpreter on LLE plugin.
DSP::GetPlugin()->DSP_StopSoundStream(); DSP::GetDSPEmulator()->DSP_StopSoundStream();
// We must set up this flag before executing HW::Shutdown() // We must set up this flag before executing HW::Shutdown()
g_bHwInit = false; g_bHwInit = false;
@ -653,7 +653,7 @@ void Callback_DSPLog(const TCHAR* _szMessage, int _v)
// WARNING - THIS MAY BE EXECUTED FROM DSP THREAD // WARNING - THIS MAY BE EXECUTED FROM DSP THREAD
void Callback_DSPInterrupt() void Callback_DSPInterrupt()
{ {
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }

View File

@ -128,9 +128,9 @@ struct SCoreStartupParameter
}; };
EBootType m_BootType; EBootType m_BootType;
// files std::string m_strVideoBackend;
std::string m_strVideoPlugin;
// files
std::string m_strFilename; std::string m_strFilename;
std::string m_strBootROM; std::string m_strBootROM;
std::string m_strSRAM; std::string m_strSRAM;

View File

@ -15,12 +15,12 @@
// Official SVN repository and contact information can be found at // Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/ // http://code.google.com/p/dolphin-emu/
#include "PluginDSP.h" #include "DSPEmulator.h"
#include "HW/DSPLLE/DSPLLE.h" #include "HW/DSPLLE/DSPLLE.h"
#include "HW/DSPHLE/DSPHLE.h" #include "HW/DSPHLE/DSPHLE.h"
PluginDSP *CreateDSPPlugin(bool HLE) DSPEmulator *CreateDSPEmulator(bool HLE)
{ {
ac_Config.Load(); ac_Config.Load();

View File

@ -21,10 +21,10 @@
#include "ChunkFile.h" #include "ChunkFile.h"
class PluginDSP class DSPEmulator
{ {
public: public:
virtual ~PluginDSP() {} virtual ~DSPEmulator() {}
virtual bool IsLLE() = 0; virtual bool IsLLE() = 0;
@ -45,6 +45,6 @@ public:
virtual void DSP_ClearAudioBuffer(bool mute) = 0; virtual void DSP_ClearAudioBuffer(bool mute) = 0;
}; };
PluginDSP *CreateDSPPlugin(bool LLE); DSPEmulator *CreateDSPEmulator(bool LLE);
#endif // _PLUGINDSP_H_ #endif // _PLUGINDSP_H_

View File

@ -18,7 +18,7 @@
#include "Common.h" #include "Common.h"
#include "Thread.h" #include "Thread.h"
#include "../PluginDSP.h" #include "../DSPEmulator.h"
#include "../PowerPC/PowerPC.h" #include "../PowerPC/PowerPC.h"
#include "../Host.h" #include "../Host.h"
#include "../Core.h" #include "../Core.h"
@ -118,14 +118,14 @@ void CCPU::EnableStepping(const bool _bStepping)
{ {
PowerPC::Pause(); PowerPC::Pause();
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PAUSE); g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PAUSE);
DSP::GetPlugin()->DSP_ClearAudioBuffer(true); DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(true);
} }
else else
{ {
PowerPC::Start(); PowerPC::Start();
m_StepEvent.Set(); m_StepEvent.Set();
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PLAY); g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PLAY);
DSP::GetPlugin()->DSP_ClearAudioBuffer(false); DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(false);
} }
} }

View File

@ -46,7 +46,7 @@
#include "AudioInterface.h" #include "AudioInterface.h"
#include "../PowerPC/PowerPC.h" #include "../PowerPC/PowerPC.h"
#include "../ConfigManager.h" #include "../ConfigManager.h"
#include "../PluginDSP.h" #include "../DSPEmulator.h"
namespace DSP namespace DSP
{ {
@ -211,7 +211,7 @@ static ARAM_Info g_ARAM_Info;
static u16 g_AR_MODE; static u16 g_AR_MODE;
static u16 g_AR_REFRESH; static u16 g_AR_REFRESH;
PluginDSP *dsp_plugin; DSPEmulator *dsp_emulator;
static int dsp_slice = 0; static int dsp_slice = 0;
static bool dsp_is_lle = false; static bool dsp_is_lle = false;
@ -230,7 +230,7 @@ void DoState(PointerWrap &p)
p.Do(g_AR_MODE); p.Do(g_AR_MODE);
p.Do(g_AR_REFRESH); p.Do(g_AR_REFRESH);
dsp_plugin->DoState(p); dsp_emulator->DoState(p);
} }
@ -247,15 +247,15 @@ void GenerateDSPInterrupt_Wrapper(u64 userdata, int cyclesLate)
GenerateDSPInterrupt((DSPInterruptType)(userdata&0xFFFF), (bool)((userdata>>16) & 1)); GenerateDSPInterrupt((DSPInterruptType)(userdata&0xFFFF), (bool)((userdata>>16) & 1));
} }
PluginDSP *GetPlugin() DSPEmulator *GetDSPEmulator()
{ {
return dsp_plugin; return dsp_emulator;
} }
void Init(bool hle) void Init(bool hle)
{ {
dsp_plugin = CreateDSPPlugin(hle); dsp_emulator = CreateDSPEmulator(hle);
dsp_is_lle = dsp_plugin->IsLLE(); dsp_is_lle = dsp_emulator->IsLLE();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{ {
@ -292,9 +292,9 @@ void Shutdown()
FreeMemoryPages(g_ARAM.ptr, g_ARAM.size); FreeMemoryPages(g_ARAM.ptr, g_ARAM.size);
g_ARAM.ptr = NULL; g_ARAM.ptr = NULL;
dsp_plugin->Shutdown(); dsp_emulator->Shutdown();
delete dsp_plugin; delete dsp_emulator;
dsp_plugin = NULL; dsp_emulator = NULL;
} }
void Read16(u16& _uReturnValue, const u32 _iAddress) void Read16(u16& _uReturnValue, const u32 _iAddress)
@ -304,31 +304,31 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
// DSP // DSP
case DSP_MAIL_TO_DSP_HI: case DSP_MAIL_TO_DSP_HI:
if (dsp_slice > DSP_MAIL_SLICE && dsp_is_lle) { if (dsp_slice > DSP_MAIL_SLICE && dsp_is_lle) {
dsp_plugin->DSP_Update(DSP_MAIL_SLICE); dsp_emulator->DSP_Update(DSP_MAIL_SLICE);
dsp_slice -= DSP_MAIL_SLICE; dsp_slice -= DSP_MAIL_SLICE;
} }
_uReturnValue = dsp_plugin->DSP_ReadMailBoxHigh(true); _uReturnValue = dsp_emulator->DSP_ReadMailBoxHigh(true);
break; break;
case DSP_MAIL_TO_DSP_LO: case DSP_MAIL_TO_DSP_LO:
_uReturnValue = dsp_plugin->DSP_ReadMailBoxLow(true); _uReturnValue = dsp_emulator->DSP_ReadMailBoxLow(true);
break; break;
case DSP_MAIL_FROM_DSP_HI: case DSP_MAIL_FROM_DSP_HI:
if (dsp_slice > DSP_MAIL_SLICE && dsp_is_lle) { if (dsp_slice > DSP_MAIL_SLICE && dsp_is_lle) {
dsp_plugin->DSP_Update(DSP_MAIL_SLICE); dsp_emulator->DSP_Update(DSP_MAIL_SLICE);
dsp_slice -= DSP_MAIL_SLICE; dsp_slice -= DSP_MAIL_SLICE;
} }
_uReturnValue = dsp_plugin->DSP_ReadMailBoxHigh(false); _uReturnValue = dsp_emulator->DSP_ReadMailBoxHigh(false);
break; break;
case DSP_MAIL_FROM_DSP_LO: case DSP_MAIL_FROM_DSP_LO:
_uReturnValue = dsp_plugin->DSP_ReadMailBoxLow(false); _uReturnValue = dsp_emulator->DSP_ReadMailBoxLow(false);
break; break;
case DSP_CONTROL: case DSP_CONTROL:
_uReturnValue = (g_dspState.DSPControl.Hex & ~DSP_CONTROL_MASK) | _uReturnValue = (g_dspState.DSPControl.Hex & ~DSP_CONTROL_MASK) |
(dsp_plugin->DSP_ReadControlRegister() & DSP_CONTROL_MASK); (dsp_emulator->DSP_ReadControlRegister() & DSP_CONTROL_MASK);
break; break;
// ARAM // ARAM
@ -388,11 +388,11 @@ void Write16(const u16 _Value, const u32 _Address)
{ {
// DSP // DSP
case DSP_MAIL_TO_DSP_HI: case DSP_MAIL_TO_DSP_HI:
dsp_plugin->DSP_WriteMailBoxHigh(true, _Value); dsp_emulator->DSP_WriteMailBoxHigh(true, _Value);
break; break;
case DSP_MAIL_TO_DSP_LO: case DSP_MAIL_TO_DSP_LO:
dsp_plugin->DSP_WriteMailBoxLow(true, _Value); dsp_emulator->DSP_WriteMailBoxLow(true, _Value);
break; break;
case DSP_MAIL_FROM_DSP_HI: case DSP_MAIL_FROM_DSP_HI:
@ -408,7 +408,7 @@ void Write16(const u16 _Value, const u32 _Address)
{ {
UDSPControl tmpControl; UDSPControl tmpControl;
tmpControl.Hex = (_Value & ~DSP_CONTROL_MASK) | tmpControl.Hex = (_Value & ~DSP_CONTROL_MASK) |
(dsp_plugin->DSP_WriteControlRegister(_Value) & DSP_CONTROL_MASK); (dsp_emulator->DSP_WriteControlRegister(_Value) & DSP_CONTROL_MASK);
// Not really sure if this is correct, but it works... // Not really sure if this is correct, but it works...
// Kind of a hack because DSP_CONTROL_MASK should make this bit // Kind of a hack because DSP_CONTROL_MASK should make this bit
@ -533,7 +533,7 @@ void Read32(u32& _uReturnValue, const u32 _iAddress)
{ {
// DSP // DSP
case DSP_MAIL_TO_DSP_HI: case DSP_MAIL_TO_DSP_HI:
_uReturnValue = (dsp_plugin->DSP_ReadMailBoxHigh(true) << 16) | dsp_plugin->DSP_ReadMailBoxLow(true); _uReturnValue = (dsp_emulator->DSP_ReadMailBoxHigh(true) << 16) | dsp_emulator->DSP_ReadMailBoxLow(true);
break; break;
// AI // AI
@ -569,8 +569,8 @@ void Write32(const u32 _iValue, const u32 _iAddress)
{ {
// DSP // DSP
case DSP_MAIL_TO_DSP_HI: case DSP_MAIL_TO_DSP_HI:
dsp_plugin->DSP_WriteMailBoxHigh(true, _iValue >> 16); dsp_emulator->DSP_WriteMailBoxHigh(true, _iValue >> 16);
dsp_plugin->DSP_WriteMailBoxLow(true, (u16)_iValue); dsp_emulator->DSP_WriteMailBoxLow(true, (u16)_iValue);
break; break;
// AI // AI
@ -626,8 +626,8 @@ void GenerateDSPInterrupt(DSPInterruptType type, bool _bSet)
UpdateInterrupts(); UpdateInterrupts();
} }
// CALLED FROM DSP PLUGIN, POSSIBLY THREADED // CALLED FROM DSP EMULATOR, POSSIBLY THREADED
void GenerateDSPInterruptFromPlugin(DSPInterruptType type, bool _bSet) void GenerateDSPInterruptFromDSPEmu(DSPInterruptType type, bool _bSet)
{ {
CoreTiming::ScheduleEvent_Threadsafe( CoreTiming::ScheduleEvent_Threadsafe(
0, et_GenerateDSPInterrupt, type | (_bSet<<16)); 0, et_GenerateDSPInterrupt, type | (_bSet<<16));
@ -637,12 +637,12 @@ void GenerateDSPInterruptFromPlugin(DSPInterruptType type, bool _bSet)
void UpdateDSPSlice(int cycles) { void UpdateDSPSlice(int cycles) {
if (dsp_is_lle) { if (dsp_is_lle) {
//use up the rest of the slice(if any) //use up the rest of the slice(if any)
dsp_plugin->DSP_Update(dsp_slice); dsp_emulator->DSP_Update(dsp_slice);
dsp_slice %= 6; dsp_slice %= 6;
//note the new budget //note the new budget
dsp_slice += cycles; dsp_slice += cycles;
} else { } else {
dsp_plugin->DSP_Update(cycles); dsp_emulator->DSP_Update(cycles);
} }
} }
@ -660,7 +660,7 @@ void UpdateAudioDMA()
if (g_audioDMA.BlocksLeft == 0) if (g_audioDMA.BlocksLeft == 0)
{ {
dsp_plugin->DSP_SendAIBuffer(g_audioDMA.SourceAddress, 8*g_audioDMA.AudioDMAControl.NumBlocks); dsp_emulator->DSP_SendAIBuffer(g_audioDMA.SourceAddress, 8*g_audioDMA.AudioDMAControl.NumBlocks);
GenerateDSPInterrupt(DSP::INT_AID); GenerateDSPInterrupt(DSP::INT_AID);
if (g_audioDMA.AudioDMAControl.Enable) if (g_audioDMA.AudioDMAControl.Enable)
{ {

View File

@ -20,7 +20,7 @@
#include "Common.h" #include "Common.h"
class PointerWrap; class PointerWrap;
class PluginDSP; class DSPEmulator;
namespace DSP namespace DSP
{ {
@ -42,12 +42,12 @@ enum
void Init(bool hle); void Init(bool hle);
void Shutdown(); void Shutdown();
PluginDSP *GetPlugin(); DSPEmulator *GetDSPEmulator();
void DoState(PointerWrap &p); void DoState(PointerWrap &p);
void GenerateDSPInterrupt(DSPInterruptType _DSPInterruptType, bool _bSet = true); void GenerateDSPInterrupt(DSPInterruptType _DSPInterruptType, bool _bSet = true);
void GenerateDSPInterruptFromPlugin(DSPInterruptType _DSPInterruptType, bool _bSet = true); void GenerateDSPInterruptFromDSPEmu(DSPInterruptType _DSPInterruptType, bool _bSet = true);
// Read32 // Read32
void Read16(u16& _uReturnValue, const u32 _uAddress); void Read16(u16& _uReturnValue, const u32 _uAddress);
@ -57,7 +57,7 @@ void Read32(u32& _uReturnValue, const u32 _uAddress);
void Write16(const u16 _uValue, const u32 _uAddress); void Write16(const u16 _uValue, const u32 _uAddress);
void Write32(const u32 _uValue, const u32 _uAddress); void Write32(const u32 _uValue, const u32 _uAddress);
// Audio/DSP Plugin Helper // Audio/DSP Helper
u8 ReadARAM(const u32 _uAddress); u8 ReadARAM(const u32 _uAddress);
void WriteARAM(u8 value, u32 _uAddress); void WriteARAM(u8 value, u32 _uAddress);

View File

@ -21,11 +21,11 @@
#include "AudioCommon.h" #include "AudioCommon.h"
#include "SoundStream.h" #include "SoundStream.h"
#include "MailHandler.h" #include "MailHandler.h"
#include "../../PluginDSP.h" #include "../../DSPEmulator.h"
class IUCode; class IUCode;
class DSPHLE : public PluginDSP { class DSPHLE : public DSPEmulator {
public: public:
DSPHLE(); DSPHLE();

View File

@ -255,12 +255,12 @@ void CUCode_AX::Update(int cycles)
if (NeedsResumeMail()) if (NeedsResumeMail())
{ {
m_rMailHandler.PushMail(DSP_RESUME); m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
// check if we have to send something // check if we have to send something
else if (!m_rMailHandler.IsEmpty()) else if (!m_rMailHandler.IsEmpty())
{ {
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
} }

View File

@ -145,12 +145,12 @@ void CUCode_AXWii::Update(int cycles)
if (NeedsResumeMail()) if (NeedsResumeMail())
{ {
m_rMailHandler.PushMail(DSP_RESUME); m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
// check if we have to send something // check if we have to send something
else if (!m_rMailHandler.IsEmpty()) else if (!m_rMailHandler.IsEmpty())
{ {
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
} }

View File

@ -40,7 +40,7 @@ void CUCode_CARD::Update(int cycles)
// check if we have to sent something // check if we have to sent something
if (!m_rMailHandler.IsEmpty()) if (!m_rMailHandler.IsEmpty())
{ {
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
} }

View File

@ -36,7 +36,7 @@ void CUCode_GBA::Update(int cycles)
// check if we have to send something // check if we have to send something
if (!m_rMailHandler.IsEmpty()) if (!m_rMailHandler.IsEmpty())
{ {
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
} }

View File

@ -78,7 +78,7 @@ CUCode_Zelda::CUCode_Zelda(DSPHLE *dsp_hle, u32 _CRC)
else else
{ {
m_rMailHandler.PushMail(DSP_INIT); m_rMailHandler.PushMail(DSP_INIT);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF3551111); // handshake m_rMailHandler.PushMail(0xF3551111); // handshake
} }
@ -116,13 +116,13 @@ void CUCode_Zelda::Update(int cycles)
if (!IsLightVersion()) if (!IsLightVersion())
{ {
if (m_rMailHandler.GetNextMail() == DSP_FRAME_END) if (m_rMailHandler.GetNextMail() == DSP_FRAME_END)
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
if (NeedsResumeMail()) if (NeedsResumeMail())
{ {
m_rMailHandler.PushMail(DSP_RESUME); m_rMailHandler.PushMail(DSP_RESUME);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
} }
@ -143,7 +143,7 @@ void CUCode_Zelda::HandleMail_LightVersion(u32 _uMail)
if (m_bSyncCmdPending) if (m_bSyncCmdPending)
{ {
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_CurBuffer++; m_CurBuffer++;
if (m_CurBuffer == m_NumBuffers) if (m_CurBuffer == m_NumBuffers)
@ -206,13 +206,13 @@ void CUCode_Zelda::HandleMail_SMSVersion(u32 _uMail)
m_CurBuffer++; m_CurBuffer++;
m_rMailHandler.PushMail(DSP_SYNC); m_rMailHandler.PushMail(DSP_SYNC);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer); m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer);
if (m_CurBuffer == m_NumBuffers) if (m_CurBuffer == m_NumBuffers)
{ {
m_rMailHandler.PushMail(DSP_FRAME_END); m_rMailHandler.PushMail(DSP_FRAME_END);
// DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); // DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
soundStream->GetMixer()->SetHLEReady(true); soundStream->GetMixer()->SetHLEReady(true);
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync"); DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
@ -333,7 +333,7 @@ void CUCode_Zelda::HandleMail_NormalVersion(u32 _uMail)
m_CurBuffer++; m_CurBuffer++;
m_rMailHandler.PushMail(DSP_SYNC); m_rMailHandler.PushMail(DSP_SYNC);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer); m_rMailHandler.PushMail(0xF355FF00 | m_CurBuffer);
m_CurVoice = 0; m_CurVoice = 0;
@ -561,7 +561,7 @@ void CUCode_Zelda::ExecuteList()
else else
{ {
m_rMailHandler.PushMail(DSP_SYNC); m_rMailHandler.PushMail(DSP_SYNC);
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
m_rMailHandler.PushMail(0xF3550000 | Sync); m_rMailHandler.PushMail(0xF3550000 | Sync);
} }
} }

View File

@ -54,7 +54,7 @@ bool DSPHost_Running()
void DSPHost_InterruptRequest() void DSPHost_InterruptRequest()
{ {
// Fire an interrupt on the PPC ASAP. // Fire an interrupt on the PPC ASAP.
DSP::GenerateDSPInterruptFromPlugin(DSP::INT_DSP); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
} }
u32 DSPHost_CodeLoaded(const u8 *ptr, int size) u32 DSPHost_CodeLoaded(const u8 *ptr, int size)

View File

@ -21,9 +21,9 @@
#include "Thread.h" #include "Thread.h"
#include "SoundStream.h" #include "SoundStream.h"
#include "DSPLLEGlobals.h" // Local #include "DSPLLEGlobals.h" // Local
#include "../../PluginDSP.h" #include "../../DSPEmulator.h"
class DSPLLE : public PluginDSP { class DSPLLE : public DSPEmulator {
public: public:
DSPLLE(); DSPLLE();

View File

@ -70,7 +70,7 @@ IPC_HLE_PERIOD: For the Wiimote this is the call schedule:
#include "../CoreTiming.h" #include "../CoreTiming.h"
#include "../ConfigManager.h" #include "../ConfigManager.h"
#include "../IPC_HLE/WII_IPC_HLE.h" #include "../IPC_HLE/WII_IPC_HLE.h"
#include "../PluginDSP.h" #include "../DSPEmulator.h"
#include "Thread.h" #include "Thread.h"
#include "Timer.h" #include "Timer.h"
#include "VideoBackendBase.h" #include "VideoBackendBase.h"
@ -245,7 +245,7 @@ void Init()
{ {
CPU_CORE_CLOCK = 729000000u; CPU_CORE_CLOCK = 729000000u;
if (!DSP::GetPlugin()->IsLLE()) if (!DSP::GetDSPEmulator()->IsLLE())
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f); DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
// AyuanX: TO BE TWEAKED // AyuanX: TO BE TWEAKED
@ -261,11 +261,11 @@ void Init()
{ {
CPU_CORE_CLOCK = 486000000u; CPU_CORE_CLOCK = 486000000u;
if (!DSP::GetPlugin()->IsLLE()) if (!DSP::GetDSPEmulator()->IsLLE())
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.005f); DSP_PERIOD = (int)(GetTicksPerSecond() * 0.005f);
} }
if (DSP::GetPlugin()->IsLLE()) if (DSP::GetDSPEmulator()->IsLLE())
DSP_PERIOD = 12000; // TO BE TWEAKED DSP_PERIOD = 12000; // TO BE TWEAKED
// This is the biggest question mark. // This is the biggest question mark.

View File

@ -32,7 +32,7 @@
#include "Host.h" #include "Host.h"
#include "PowerPC/PowerPC.h" #include "PowerPC/PowerPC.h"
#include "CoreTiming.h" #include "CoreTiming.h"
#include "PluginDSP.h" #include "DSPEmulator.h"
#include "VideoBackendBase.h" #include "VideoBackendBase.h"
extern "C" { extern "C" {
@ -2959,7 +2959,7 @@ DEFINE_LUA_FUNCTION(movie_close, "")
DEFINE_LUA_FUNCTION(sound_clear, "") DEFINE_LUA_FUNCTION(sound_clear, "")
{ {
DSP::GetPlugin()->DSP_ClearAudioBuffer(false); DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(false);
return 0; return 0;
} }

View File

@ -15,7 +15,7 @@ files = [
"OnFrame.cpp", "OnFrame.cpp",
"MemTools.cpp", "MemTools.cpp",
"PatchEngine.cpp", "PatchEngine.cpp",
"PluginDSP.cpp", "DSPEmulator.cpp",
"LuaInterface.cpp", "LuaInterface.cpp",
"State.cpp", "State.cpp",
"Tracer.cpp", "Tracer.cpp",

View File

@ -662,8 +662,12 @@ void CConfigMain::CreateGUIControls()
// backend // backend
wxBoxSizer* svidbackend = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* svidbackend = new wxBoxSizer(wxHORIZONTAL);
svidbackend->Add(TEXT_BOX(DisplayPage, _("Video Backend:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5); svidbackend->Add(TEXT_BOX(DisplayPage, _("Video Backend:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
GraphicSelection = new wxChoice(DisplayPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator); GraphicSelection = new wxChoice(DisplayPage, ID_GRAPHIC_CB,
wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
svidbackend->Add(GraphicSelection, 0, wxALIGN_CENTER_VERTICAL, 5); svidbackend->Add(GraphicSelection, 0, wxALIGN_CENTER_VERTICAL, 5);
GraphicConfig = new wxButton(DisplayPage, ID_GRAPHIC_CONFIG, _("GFX Config"),
wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
svidbackend->Add(GraphicConfig, 0, wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* sDisplaySize = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sDisplaySize = new wxBoxSizer(wxHORIZONTAL);
sDisplaySize->Add(TEXT_BOX(DisplayPage, _("Window Size:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5); sDisplaySize->Add(TEXT_BOX(DisplayPage, _("Window Size:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
@ -673,7 +677,7 @@ void CConfigMain::CreateGUIControls()
sDisplaySize->Add(WindowAutoSize, 0, wxALIGN_CENTER_VERTICAL, 5); sDisplaySize->Add(WindowAutoSize, 0, wxALIGN_CENTER_VERTICAL, 5);
sbDisplay = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Emulator Display Settings")); sbDisplay = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Emulator Display Settings"));
sbDisplay->Add(svidbackend, 0, wxLEFT, 5); sbDisplay->Add(svidbackend, 0, wxEXPAND | wxLEFT, 5);
sbDisplay->Add(sDisplayRes, 0, wxALL, 5); sbDisplay->Add(sDisplayRes, 0, wxALL, 5);
sbDisplay->Add(sDisplaySize, 0, wxALL, 5); sbDisplay->Add(sDisplaySize, 0, wxALL, 5);
sbDisplay->Add(Fullscreen, 0, wxEXPAND | wxALL, 5); sbDisplay->Add(Fullscreen, 0, wxEXPAND | wxALL, 5);
@ -1339,11 +1343,11 @@ void CConfigMain::ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event))
} }
// Plugin settings // GFX backend selection
void CConfigMain::OnSelectionChanged(wxCommandEvent& ev) void CConfigMain::OnSelectionChanged(wxCommandEvent& ev)
{ {
g_video_backend = g_available_video_backends[ev.GetInt()]; g_video_backend = g_available_video_backends[ev.GetInt()];
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin = g_video_backend->GetName(); SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();
} }
void CConfigMain::OnConfig(wxCommandEvent&) void CConfigMain::OnConfig(wxCommandEvent&)

View File

@ -254,10 +254,10 @@ EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
EVT_MENU(IDM_LUA, CFrame::OnOpenLuaWindow) EVT_MENU(IDM_LUA, CFrame::OnOpenLuaWindow)
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot) EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain) EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)
EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnPluginGFX) EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnConfigGFX)
EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnPluginDSP) EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnConfigDSP)
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD) EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnConfigPAD)
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote) EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnConfigWiimote)
EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnToolBar) EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnToolBar)
EVT_AUITOOLBAR_TOOL_DROPDOWN(IDM_SAVE_PERSPECTIVE, CFrame::OnDropDownToolbarItem) EVT_AUITOOLBAR_TOOL_DROPDOWN(IDM_SAVE_PERSPECTIVE, CFrame::OnDropDownToolbarItem)

View File

@ -47,7 +47,7 @@ inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length)
class CGameListCtrl; class CGameListCtrl;
class CLogWindow; class CLogWindow;
// The CPanel class to receive MSWWindowProc messages from the video plugin. // The CPanel class to receive MSWWindowProc messages from the video backend.
class CPanel : public wxPanel class CPanel : public wxPanel
{ {
public: public:
@ -186,10 +186,10 @@ class CFrame : public CRenderFrame
Toolbar_Pause, Toolbar_Pause,
Toolbar_Screenshot, Toolbar_Screenshot,
Toolbar_FullScreen, Toolbar_FullScreen,
Toolbar_PluginOptions, Toolbar_ConfigMain,
Toolbar_PluginGFX, Toolbar_ConfigGFX,
Toolbar_PluginDSP, Toolbar_ConfigDSP,
Toolbar_PluginPAD, Toolbar_ConfigPAD,
Toolbar_Wiimote, Toolbar_Wiimote,
Toolbar_Help, Toolbar_Help,
EToolbar_Max EToolbar_Max
@ -295,10 +295,10 @@ class CFrame : public CRenderFrame
void OnFrameStep(wxCommandEvent& event); void OnFrameStep(wxCommandEvent& event);
void OnConfigMain(wxCommandEvent& event); // Options void OnConfigMain(wxCommandEvent& event); // Options
void OnPluginGFX(wxCommandEvent& event); void OnConfigGFX(wxCommandEvent& event);
void OnPluginDSP(wxCommandEvent& event); void OnConfigDSP(wxCommandEvent& event);
void OnPluginPAD(wxCommandEvent& event); void OnConfigPAD(wxCommandEvent& event);
void OnPluginWiimote(wxCommandEvent& event); void OnConfigWiimote(wxCommandEvent& event);
void OnToggleFullscreen(wxCommandEvent& event); void OnToggleFullscreen(wxCommandEvent& event);
void OnToggleDualCore(wxCommandEvent& event); void OnToggleDualCore(wxCommandEvent& event);

View File

@ -379,10 +379,10 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
ToolBar->AddTool(IDM_TOGGLE_FULLSCREEN, _("FullScr"), m_Bitmaps[Toolbar_FullScreen], _("Toggle Fullscreen")); ToolBar->AddTool(IDM_TOGGLE_FULLSCREEN, _("FullScr"), m_Bitmaps[Toolbar_FullScreen], _("Toggle Fullscreen"));
ToolBar->AddTool(IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_FullScreen], _("Take Screenshot")); ToolBar->AddTool(IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_FullScreen], _("Take Screenshot"));
ToolBar->AddSeparator(); ToolBar->AddSeparator();
ToolBar->AddTool(wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_PluginOptions], _("Configure...")); ToolBar->AddTool(wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_ConfigMain], _("Configure..."));
ToolBar->AddTool(IDM_CONFIG_GFX_PLUGIN, _("Graphics"), m_Bitmaps[Toolbar_PluginGFX], _("Graphics settings")); ToolBar->AddTool(IDM_CONFIG_GFX_PLUGIN, _("Graphics"), m_Bitmaps[Toolbar_ConfigGFX], _("Graphics settings"));
ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _("DSP"), m_Bitmaps[Toolbar_PluginDSP], _("DSP settings")); ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _("DSP"), m_Bitmaps[Toolbar_ConfigDSP], _("DSP settings"));
ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _("GCPad"), m_Bitmaps[Toolbar_PluginPAD], _("Gamecube Pad settings")); ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _("GCPad"), m_Bitmaps[Toolbar_ConfigPAD], _("Gamecube Pad settings"));
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _("Wiimote settings")); ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _("Wiimote settings"));
// after adding the buttons to the toolbar, must call Realize() to reflect // after adding the buttons to the toolbar, must call Realize() to reflect
@ -464,10 +464,10 @@ void CFrame::InitBitmaps()
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(toolbar_play_png); m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(toolbar_play_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(toolbar_stop_png); m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(toolbar_stop_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(toolbar_pause_png); m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(toolbar_pause_png);
m_Bitmaps[Toolbar_PluginOptions]= wxGetBitmapFromMemory(toolbar_plugin_options_png); m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(toolbar_plugin_options_png);
m_Bitmaps[Toolbar_PluginGFX] = wxGetBitmapFromMemory(toolbar_plugin_gfx_png); m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(toolbar_plugin_gfx_png);
m_Bitmaps[Toolbar_PluginDSP] = wxGetBitmapFromMemory(toolbar_plugin_dsp_png); m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(toolbar_plugin_dsp_png);
m_Bitmaps[Toolbar_PluginPAD] = wxGetBitmapFromMemory(toolbar_plugin_pad_png); m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(toolbar_plugin_pad_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(toolbar_plugin_wiimote_png); m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(toolbar_plugin_wiimote_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(toolbar_fullscreen_png); m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(toolbar_fullscreen_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(toolbar_fullscreen_png); m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(toolbar_fullscreen_png);
@ -490,10 +490,10 @@ void CFrame::InitBitmaps()
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play1_png); m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play1_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop1_png); m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop1_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause1_png); m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause1_png);
m_Bitmaps[Toolbar_PluginOptions]= wxGetBitmapFromMemory(Toolbar_Options1_png); m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options1_png);
m_Bitmaps[Toolbar_PluginGFX] = wxGetBitmapFromMemory(Toolbar_Gfx1_png); m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx1_png);
m_Bitmaps[Toolbar_PluginDSP] = wxGetBitmapFromMemory(Toolbar_DSP1_png); m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP1_png);
m_Bitmaps[Toolbar_PluginPAD] = wxGetBitmapFromMemory(Toolbar_Pad1_png); m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad1_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote1_png); m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote1_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png); m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png); m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png);
@ -509,10 +509,10 @@ void CFrame::InitBitmaps()
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play2_png); m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play2_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop2_png); m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop2_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause2_png); m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause2_png);
m_Bitmaps[Toolbar_PluginOptions]= wxGetBitmapFromMemory(Toolbar_Options2_png); m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options2_png);
m_Bitmaps[Toolbar_PluginGFX] = wxGetBitmapFromMemory(Toolbar_Gfx2_png); m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx2_png);
m_Bitmaps[Toolbar_PluginDSP] = wxGetBitmapFromMemory(Toolbar_DSP2_png); m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP2_png);
m_Bitmaps[Toolbar_PluginPAD] = wxGetBitmapFromMemory(Toolbar_Pad2_png); m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad2_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote2_png); m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote2_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png); m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png); m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png);
@ -528,10 +528,10 @@ void CFrame::InitBitmaps()
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play3_png); m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play3_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop3_png); m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop3_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause3_png); m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause3_png);
m_Bitmaps[Toolbar_PluginOptions]= wxGetBitmapFromMemory(Toolbar_Options3_png); m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options3_png);
m_Bitmaps[Toolbar_PluginGFX] = wxGetBitmapFromMemory(Toolbar_Gfx3_png); m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx3_png);
m_Bitmaps[Toolbar_PluginDSP] = wxGetBitmapFromMemory(Toolbar_DSP3_png); m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP3_png);
m_Bitmaps[Toolbar_PluginPAD] = wxGetBitmapFromMemory(Toolbar_Pad3_png); m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad3_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote3_png); m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote3_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png); m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png); m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png);
@ -1088,13 +1088,13 @@ void CFrame::OnConfigMain(wxCommandEvent& WXUNUSED (event))
m_GameListCtrl->Update(); m_GameListCtrl->Update();
} }
void CFrame::OnPluginGFX(wxCommandEvent& WXUNUSED (event)) void CFrame::OnConfigGFX(wxCommandEvent& WXUNUSED (event))
{ {
if (g_video_backend) if (g_video_backend)
g_video_backend->ShowConfig(this); g_video_backend->ShowConfig(this);
} }
void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event)) void CFrame::OnConfigDSP(wxCommandEvent& WXUNUSED (event))
{ {
CConfigMain ConfigMain(this); CConfigMain ConfigMain(this);
ConfigMain.SetSelectedTab(CConfigMain::ID_AUDIOPAGE); ConfigMain.SetSelectedTab(CConfigMain::ID_AUDIOPAGE);
@ -1102,7 +1102,7 @@ void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event))
m_GameListCtrl->Update(); m_GameListCtrl->Update();
} }
void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event)) void CFrame::OnConfigPAD(wxCommandEvent& WXUNUSED (event))
{ {
InputPlugin *const pad_plugin = Pad::GetPlugin(); InputPlugin *const pad_plugin = Pad::GetPlugin();
bool was_init = false; bool was_init = false;
@ -1117,16 +1117,16 @@ void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))
Pad::Initialize(GetHandle()); Pad::Initialize(GetHandle());
#endif #endif
} }
InputConfigDialog *const m_ConfigFrame = new InputConfigDialog(this, *pad_plugin, _trans("Dolphin GCPad Configuration")); InputConfigDialog m_ConfigFrame(this, *pad_plugin, _trans("Dolphin GCPad Configuration"));
m_ConfigFrame->ShowModal(); m_ConfigFrame.ShowModal();
m_ConfigFrame->Destroy(); m_ConfigFrame.Destroy();
if (!was_init) // if game isn't running if (!was_init) // if game isn't running
{ {
Pad::Shutdown(); Pad::Shutdown();
} }
} }
void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event)) void CFrame::OnConfigWiimote(wxCommandEvent& WXUNUSED (event))
{ {
InputPlugin *const wiimote_plugin = Wiimote::GetPlugin(); InputPlugin *const wiimote_plugin = Wiimote::GetPlugin();
bool was_init = false; bool was_init = false;
@ -1141,9 +1141,9 @@ void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
Wiimote::Initialize(GetHandle()); Wiimote::Initialize(GetHandle());
#endif #endif
} }
WiimoteConfigDiag *const m_ConfigFrame = new WiimoteConfigDiag(this, *wiimote_plugin); WiimoteConfigDiag m_ConfigFrame(this, *wiimote_plugin);
m_ConfigFrame->ShowModal(); m_ConfigFrame.ShowModal();
m_ConfigFrame->Destroy(); m_ConfigFrame.Destroy();
if (!was_init) // if game isn't running if (!was_init) // if game isn't running
{ {
Wiimote::Shutdown(); Wiimote::Shutdown();

View File

@ -98,11 +98,11 @@ bool DolphinApp::OnInit()
// Declarations and definitions // Declarations and definitions
bool UseDebugger = false; bool UseDebugger = false;
bool UseLogger = false; bool UseLogger = false;
bool selectVideoPlugin = false; bool selectVideoBackend = false;
bool selectAudioPlugin = false; bool selectAudioEmulation = false;
wxString videoPluginFilename; wxString videoBackendName;
wxString audioPluginFilename; wxString audioEmulationName;
#if wxUSE_CMDLINE_PARSER // Parse command lines #if wxUSE_CMDLINE_PARSER // Parse command lines
wxCmdLineEntryDesc cmdLineDesc[] = wxCmdLineEntryDesc cmdLineDesc[] =
@ -130,13 +130,13 @@ bool DolphinApp::OnInit()
_("Exit Dolphin with emulator") _("Exit Dolphin with emulator")
}, },
{ {
wxCMD_LINE_OPTION, wxS("V"), wxS("video_plugin"), wxCMD_LINE_OPTION, wxS("V"), wxS("video_backend"),
_("Specify a video plugin"), _("Specify a video backend"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
}, },
{ {
wxCMD_LINE_OPTION, wxS("A"), wxS("audio_plugin"), wxCMD_LINE_OPTION, wxS("A"), wxS("audio_emulation"),
_("Specify an audio plugin"), _("Specify low level (LLE) or high level (HLE) audio emulation"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
}, },
{ {
@ -155,10 +155,11 @@ bool DolphinApp::OnInit()
UseLogger = parser.Found(wxT("logger")); UseLogger = parser.Found(wxT("logger"));
LoadFile = parser.Found(wxT("exec"), &FileToLoad); LoadFile = parser.Found(wxT("exec"), &FileToLoad);
BatchMode = parser.Found(wxT("batch")); BatchMode = parser.Found(wxT("batch"));
selectVideoPlugin = parser.Found(wxT("video_plugin"), selectVideoBackend = parser.Found(wxT("video_backend"),
&videoPluginFilename); &videoBackendName);
selectAudioPlugin = parser.Found(wxT("audio_plugin"), // TODO: This currently has no effect. Implement or delete.
&audioPluginFilename); selectAudioEmulation = parser.Found(wxT("audio_emulation"),
&audioEmulationName);
#endif // wxUSE_CMDLINE_PARSER #endif // wxUSE_CMDLINE_PARSER
#if defined _DEBUG && defined _WIN32 #if defined _DEBUG && defined _WIN32
@ -287,11 +288,11 @@ bool DolphinApp::OnInit()
VideoBackend::PopulateList(); VideoBackend::PopulateList();
WiimoteReal::LoadSettings(); WiimoteReal::LoadSettings();
if (selectVideoPlugin && videoPluginFilename != wxEmptyString) if (selectVideoBackend && videoBackendName != wxEmptyString)
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
std::string(videoPluginFilename.mb_str()); std::string(videoBackendName.mb_str());
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin); VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
// Enable the PNG image handler for screenshots // Enable the PNG image handler for screenshots
wxImage::AddHandler(new wxPNGHandler); wxImage::AddHandler(new wxPNGHandler);

View File

@ -297,7 +297,7 @@ int main(int argc, char* argv[])
SConfig::Init(); SConfig::Init();
VideoBackend::PopulateList(); VideoBackend::PopulateList();
VideoBackend::ActivateBackend(SConfig::GetInstance(). VideoBackend::ActivateBackend(SConfig::GetInstance().
m_LocalCoreStartupParameter.m_strVideoPlugin); m_LocalCoreStartupParameter.m_strVideoBackend);
WiimoteReal::LoadSettings(); WiimoteReal::LoadSettings();
// No use running the loop when booting fails // No use running the loop when booting fails

View File

@ -503,6 +503,7 @@ Renderer::~Renderer()
if(s_bAVIDumping) if(s_bAVIDumping)
{ {
AVIDump::Stop(); AVIDump::Stop();
s_bLastFrameDumped = false;
s_bAVIDumping = false; s_bAVIDumping = false;
} }
#else #else

View File

@ -172,10 +172,7 @@ void VideoBackend::Initialize()
g_Config.GameIniLoad(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIni.c_str()); g_Config.GameIniLoad(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIni.c_str());
g_Config.UpdateProjectionHack(); g_Config.UpdateProjectionHack();
#if defined _WIN32
// Enable support for PNG screenshots.
wxImage::AddHandler( new wxPNGHandler );
#endif
UpdateActiveConfig(); UpdateActiveConfig();
if (!OpenGL_Create(640, 480)) if (!OpenGL_Create(640, 480))