GSopen2: synced with trunk, so that I can reintegrate. :)

git-svn-id: http://pcsx2.googlecode.com/svn/branches/GSopen2@1866 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-09-19 00:14:10 +00:00
parent 851354eca3
commit f4cc055a7d
56 changed files with 801 additions and 1189 deletions

View File

@ -227,7 +227,11 @@ This theoretically unoptimizes. Not having much luck so far.
# define __fastcall __attribute__((fastcall)) # define __fastcall __attribute__((fastcall))
# define __unused __attribute__((unused)) # define __unused __attribute__((unused))
# define _inline __inline__ __attribute__((unused)) # define _inline __inline__ __attribute__((unused))
# ifdef NDEBUG
# define __forceinline __attribute__((always_inline,unused)) # define __forceinline __attribute__((always_inline,unused))
# else
# define __forceinline // no forceinlines in debug builds
# endif
# define __noinline __attribute__((noinline)) # define __noinline __attribute__((noinline))
# define __hot __attribute__((hot)) # define __hot __attribute__((hot))
# define __cold __attribute__((cold)) # define __cold __attribute__((cold))

View File

@ -144,7 +144,7 @@ namespace Exception
explicit classname( const wxString& msg_eng ) { BaseException::InitBaseEx( msg_eng, wxEmptyString ); } explicit classname( const wxString& msg_eng ) { BaseException::InitBaseEx( msg_eng, wxEmptyString ); }
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
// Generalized Exceptions: RuntimeError / LogicError / AssertionFailure // Generalized Exceptions: RuntimeError / LogicError / ObjectIsNull
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
class RuntimeError : public virtual BaseException class RuntimeError : public virtual BaseException
@ -161,6 +161,24 @@ namespace Exception
DEFINE_LOGIC_EXCEPTION( LogicError, wxLt("An unhandled logic error has occurred.") ) DEFINE_LOGIC_EXCEPTION( LogicError, wxLt("An unhandled logic error has occurred.") )
}; };
class ObjectIsNull : public RuntimeError
{
public:
wxString ObjectName;
DEFINE_EXCEPTION_COPYTORS( ObjectIsNull )
explicit ObjectIsNull( const char* objname="unspecified" )
{
m_message_diag = wxString::FromUTF8( objname );
// overridden message formatters only use the diagnostic version...
}
virtual wxString FormatDisplayMessage() const;
virtual wxString FormatDiagnosticMessage() const;
};
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
// OutOfMemory / InvalidOperation / InvalidArgument / IndexBoundsFault / ParseError // OutOfMemory / InvalidOperation / InvalidArgument / IndexBoundsFault / ParseError
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------

View File

@ -100,6 +100,23 @@ namespace Exception
return m_message_diag + L"\n\n" + m_stacktrace; return m_message_diag + L"\n\n" + m_stacktrace;
} }
// ------------------------------------------------------------------------
wxString ObjectIsNull::FormatDiagnosticMessage() const
{
return wxsFormat(
L"An attempted reference to the %s has failed; the frame does not exist or it's handle is null.",
m_message_diag.c_str()
) + m_stacktrace;
}
wxString ObjectIsNull::FormatDisplayMessage() const
{
return wxsFormat(
L"An attempted reference to the %s has failed; the frame does not exist or it's handle is null.",
m_message_diag.c_str()
);
}
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
wxString Stream::FormatDiagnosticMessage() const wxString Stream::FormatDiagnosticMessage() const
{ {

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file> <CodeBlocks_workspace_file>
<Workspace title="pcsx2_suite_2008 workspace"> <Workspace title="pcsx2_suite_2008 workspace">
<Project filename="pcsx2/Linux/pcsx2.cbp" active="1"> <Project filename="pcsx2/Linux/pcsx2.cbp">
<Depends filename="common/build/x86emitter/x86emitter.cbp" /> <Depends filename="common/build/x86emitter/x86emitter.cbp" />
<Depends filename="common/build/Utilities/Utilities.cbp" /> <Depends filename="common/build/Utilities/Utilities.cbp" />
<Depends filename="3rdparty/zlib/zlib.cbp" /> <Depends filename="3rdparty/zlib/zlib.cbp" />
@ -22,6 +22,11 @@
<Project filename="plugins/onepad/Linux/OnePad.cbp" /> <Project filename="plugins/onepad/Linux/OnePad.cbp" />
<Project filename="plugins/zerogs/opengl/Linux/ZeroGS.cbp" /> <Project filename="plugins/zerogs/opengl/Linux/ZeroGS.cbp" />
<Project filename="tools/bin2cpp/bin2cpp.cbp" /> <Project filename="tools/bin2cpp/bin2cpp.cbp" />
<Project filename="plugins/spu2-x/src/Linux/SPU2-X.cbp" /> <Project filename="plugins/spu2-x/src/Linux/SPU2-X.cbp" active="1">
<Depends filename="3rdparty/SoundTouch/SoundTouch.cbp" />
</Project>
<Project filename="plugins/zerospu2/Linux/ZeroSPU2.cbp">
<Depends filename="3rdparty/SoundTouch/SoundTouch.cbp" />
</Project>
</Workspace> </Workspace>
</CodeBlocks_workspace_file> </CodeBlocks_workspace_file>

View File

@ -93,6 +93,8 @@ struct GIFPath
u32 _pad[3]; u32 _pad[3];
u8 regs[16]; u8 regs[16];
GIFPath();
__forceinline void PrepRegs(bool doPrep); __forceinline void PrepRegs(bool doPrep);
__forceinline void SetTag(const void* mem); __forceinline void SetTag(const void* mem);
}; };
@ -198,13 +200,6 @@ protected:
Threading::MutexLock m_lock_Stack; Threading::MutexLock m_lock_Stack;
#endif #endif
// the MTGS "dummy" GIFtag info!
// fixme: The real PS2 has a single internal PATH and 3 logical sources, not 3 entirely
// separate paths. But for that to work properly we need also interlocked path sources.
// That is, when the GIF selects a source, it sticks to that source until an EOP. Currently
// this is not emulated!
GIFPath m_path[3];
// contains aligned memory allocations for gs and Ringbuffer. // contains aligned memory allocations for gs and Ringbuffer.
SafeAlignedArray<u128,16> m_RingBuffer; SafeAlignedArray<u128,16> m_RingBuffer;

View File

@ -55,10 +55,24 @@ using namespace std;
// //
// Yeah, it's a lot of work, but the performance gains are huge, even on HT cpus. // Yeah, it's a lot of work, but the performance gains are huge, even on HT cpus.
// the MTGS "dummy" GIFtag info!
// fixme: The real PS2 has a single internal PATH and 3 logical sources, not 3 entirely
// separate paths. But for that to work properly we need also interlocked path sources.
// That is, when the GIF selects a source, it sticks to that source until an EOP. Currently
// this is not emulated!
PCSX2_ALIGNED16( static GIFPath s_path[3] );
GIFPath::GIFPath()
{
memzero_obj( *this );
}
// unpack the registers // unpack the registers
// registers are stored as a sequence of 4 bit values in the // registers are stored as a sequence of 4 bit values in the
// upper 64 bits of the GIFTAG. That sucks for us, so we unpack // upper 64 bits of the GIFTAG. That sucks for us, so we unpack
// them into an 8 bit array. // them into an 8 bit array.
//
__forceinline void GIFPath::PrepRegs(bool doPrep = 1) __forceinline void GIFPath::PrepRegs(bool doPrep = 1)
{ {
if (!doPrep) return; if (!doPrep) return;
@ -181,7 +195,6 @@ mtgsThreadObject::mtgsThreadObject() :
, m_RingBuffer( m_RingBufferSize + (Ps2MemSize::GSregs/sizeof(u128)) ) , m_RingBuffer( m_RingBufferSize + (Ps2MemSize::GSregs/sizeof(u128)) )
, m_gsMem( (u8*)m_RingBuffer.GetPtr( m_RingBufferSize ) ) , m_gsMem( (u8*)m_RingBuffer.GetPtr( m_RingBufferSize ) )
{ {
memzero_obj( m_path );
} }
void mtgsThreadObject::Start() void mtgsThreadObject::Start()
@ -226,7 +239,7 @@ void mtgsThreadObject::Reset()
SendSimplePacket( GS_RINGTYPE_RESET, 0, 0, 0 ); SendSimplePacket( GS_RINGTYPE_RESET, 0, 0, 0 );
SendSimplePacket( GS_RINGTYPE_FRAMESKIP, 0, 0, 0 ); SendSimplePacket( GS_RINGTYPE_FRAMESKIP, 0, 0, 0 );
memzero_obj( m_path ); memzero_obj( s_path );
} }
#define incPmem(x) { \ #define incPmem(x) { \
@ -238,7 +251,7 @@ void mtgsThreadObject::Reset()
__forceinline int mtgsThreadObject::_gifTransferDummy(GIF_PATH pathidx, const u8* pMem, u32 size) __forceinline int mtgsThreadObject::_gifTransferDummy(GIF_PATH pathidx, const u8* pMem, u32 size)
{ {
GIFPath& path = m_path[pathidx]; GIFPath& path = s_path[pathidx];
u32 finish = (pathidx == GIF_PATH_1) ? 0x4000 : (size<<4); u32 finish = (pathidx == GIF_PATH_1) ? 0x4000 : (size<<4);
u32 oldSize = 0; u32 oldSize = 0;
u32 numRegs = 0; u32 numRegs = 0;
@ -1003,9 +1016,9 @@ void mtgsOpen()
void mtgsThreadObject::GIFSoftReset( int mask ) void mtgsThreadObject::GIFSoftReset( int mask )
{ {
if(mask & 1) memzero_obj(m_path[0]); if(mask & 1) memzero_obj(s_path[0]);
if(mask & 2) memzero_obj(m_path[1]); if(mask & 2) memzero_obj(s_path[1]);
if(mask & 4) memzero_obj(m_path[2]); if(mask & 4) memzero_obj(s_path[2]);
if( GSgifSoftReset == NULL ) return; if( GSgifSoftReset == NULL ) return;
@ -1015,7 +1028,7 @@ void mtgsThreadObject::GIFSoftReset( int mask )
void mtgsThreadObject::Freeze( SaveStateBase& state ) void mtgsThreadObject::Freeze( SaveStateBase& state )
{ {
_mtgsFreezeGIF( state, this->m_path ); _mtgsFreezeGIF( state, s_path );
} }
// this function is needed because of recompiled calls from iGS.cpp // this function is needed because of recompiled calls from iGS.cpp

View File

@ -63,6 +63,9 @@ void Pcsx2Config::RecompilerOptions::LoadSave( IniInterface& ini )
IniBitBool( EnableIOP ); IniBitBool( EnableIOP );
IniBitBool( EnableVU0 ); IniBitBool( EnableVU0 );
IniBitBool( EnableVU1 ); IniBitBool( EnableVU1 );
IniBitBool( UseMicroVU0 );
IniBitBool( UseMicroVU1 );
} }
Pcsx2Config::CpuOptions::CpuOptions() : Pcsx2Config::CpuOptions::CpuOptions() :

View File

@ -136,42 +136,9 @@ enum DialogIdentifiers
DialogId_About, DialogId_About,
}; };
////////////////////////////////////////////////////////////////////////////////////////// // --------------------------------------------------------------------------------------
// ScopedWindowDisable // AppImageIds - Config and Toolbar Images and Icons
// // --------------------------------------------------------------------------------------
// This class is a fix helper for WXGTK ports of PCSX2, which need the current window to
// be disabled in order for plugin-created modal dialogs to receive messages. This disabling
// causes problems in Win32/MSW, where some plugins' modal dialogs will cause all PCSX2
// windows to minimize on closure.
//
class ScopedWindowDisable
{
DeclareNoncopyableObject( ScopedWindowDisable )
protected:
wxWindow& m_window;
public:
ScopedWindowDisable( wxWindow* whee ) :
m_window( *whee )
{
#ifdef __WXGTK__
wxASSERT( whee != NULL );
m_window.Disable();
#endif
}
~ScopedWindowDisable()
{
#ifdef __WXGTK__
m_window.Enable();
m_window.SetFocus();
#endif
}
};
//////////////////////////////////////////////////////////////////////////////////////////
//
struct AppImageIds struct AppImageIds
{ {
struct ConfigIds struct ConfigIds
@ -214,7 +181,6 @@ struct AppImageIds
} Toolbars; } Toolbars;
}; };
struct MsgboxEventResult struct MsgboxEventResult
{ {
Semaphore WaitForMe; Semaphore WaitForMe;
@ -260,34 +226,14 @@ public:
void ReloadPlugins(); void ReloadPlugins();
void ApplySettings( const AppConfig* oldconf = NULL );
void LoadSettings();
void SaveSettings();
void PostMenuAction( MenuIdentifiers menu_id ) const; void PostMenuAction( MenuIdentifiers menu_id ) const;
int ThreadedModalDialog( DialogIdentifiers dialogId ); int ThreadedModalDialog( DialogIdentifiers dialogId );
void Ping() const; void Ping() const;
bool PrepForExit(); bool PrepForExit();
// Executes the emulator using a saved/existing virtual machine state and currently
// configured CDVD source device.
// Debug assertions:
void SysExecute(); void SysExecute();
void SysExecute( CDVD_SourceType cdvdsrc ); void SysExecute( CDVD_SourceType cdvdsrc );
void SysResume()
{
if( !m_CoreThread ) return;
m_CoreThread->Resume();
}
void SysSuspend()
{
if( !m_CoreThread ) return;
m_CoreThread->Suspend();
}
void SysReset() void SysReset()
{ {
m_CoreThread.reset(); m_CoreThread.reset();
@ -312,6 +258,22 @@ public:
return *m_MainFrame; return *m_MainFrame;
} }
MainEmuFrame& GetMainFrameOrExcept() const
{
if( m_MainFrame == NULL )
throw Exception::ObjectIsNull( "main application frame" );
return *m_MainFrame;
}
CoreEmuThread& GetCoreThreadOrExcept() const
{
if( !m_CoreThread )
throw Exception::ObjectIsNull( "core emulation thread" );
return *m_CoreThread;
}
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Overrides of wxApp virtuals: // Overrides of wxApp virtuals:
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
@ -434,3 +396,21 @@ extern bool pxIsValidWindowPosition( const wxWindow& window, const wxPoint& wind
extern bool HandlePluginError( Exception::PluginError& ex ); extern bool HandlePluginError( Exception::PluginError& ex );
extern bool EmulationInProgress(); extern bool EmulationInProgress();
#define TryInvoke( obj, runme ) \
{ \
try { \
wxGetApp().Get##obj##OrExcept().runme; \
} \
catch( Exception::ObjectIsNull& ) { } \
}
extern void AppLoadSettings();
extern void AppSaveSettings();
extern void AppApplySettings( const AppConfig* oldconf=NULL );
extern void SysSuspend();
extern void SysResume();
extern void SysReset();
extern void SysExecute();
extern void SysExecute( CDVD_SourceType cdvdsrc );

View File

@ -511,7 +511,7 @@ wxFileConfig* OpenFileConfig( const wxString& filename )
// overwrite - this option forces the current settings to overwrite any existing settings that might // overwrite - this option forces the current settings to overwrite any existing settings that might
// be saved to the configured ini/settings folder. // be saved to the configured ini/settings folder.
// //
void AppConfig_ReloadGlobalSettings( bool overwrite ) void AppConfig_OnChangedSettingsFolder( bool overwrite )
{ {
PathDefs::GetDocuments().Mkdir(); PathDefs::GetDocuments().Mkdir();
PathDefs::GetSettings().Mkdir(); PathDefs::GetSettings().Mkdir();
@ -521,9 +521,9 @@ void AppConfig_ReloadGlobalSettings( bool overwrite )
wxConfigBase::Get()->SetRecordDefaults(); wxConfigBase::Get()->SetRecordDefaults();
if( !overwrite ) if( !overwrite )
wxGetApp().LoadSettings(); AppLoadSettings();
wxGetApp().ApplySettings(); AppApplySettings();
g_Conf->Folders.Logs.Mkdir(); g_Conf->Folders.Logs.Mkdir();
wxString newlogname( Path::Combine( g_Conf->Folders.Logs.ToString(), L"emuLog.txt" ) ); wxString newlogname( Path::Combine( g_Conf->Folders.Logs.ToString(), L"emuLog.txt" ) );

View File

@ -163,11 +163,8 @@ public:
void LoadSaveUserMode( IniInterface& ini, const wxString& cwdhash ); void LoadSaveUserMode( IniInterface& ini, const wxString& cwdhash );
protected:
void LoadSave( IniInterface& ini ); void LoadSave( IniInterface& ini );
void LoadSaveMemcards( IniInterface& ini ); void LoadSaveMemcards( IniInterface& ini );
friend class Pcsx2App;
}; };
struct ConfigOverrides struct ConfigOverrides
@ -179,6 +176,6 @@ struct ConfigOverrides
extern ConfigOverrides OverrideOptions; extern ConfigOverrides OverrideOptions;
extern wxFileConfig* OpenFileConfig( const wxString& filename ); extern wxFileConfig* OpenFileConfig( const wxString& filename );
extern void AppConfig_ReloadGlobalSettings( bool overwrite = false ); extern void AppConfig_OnChangedSettingsFolder( bool overwrite = false );
extern wxScopedPtr<AppConfig> g_Conf; extern wxScopedPtr<AppConfig> g_Conf;

View File

@ -132,44 +132,6 @@ void AppEmuThread::StateCheck()
} }
} }
// Executes the emulator using a saved/existing virtual machine state and currently
// configured CDVD source device.
void Pcsx2App::SysExecute()
{
SysReset();
LoadPluginsImmediate();
m_CoreThread.reset( new AppEmuThread( *m_CorePlugins ) );
m_CoreThread->Resume();
}
// Executes the specified cdvd source and optional elf file. This command performs a
// full closure of any existing VM state and starts a fresh VM with the requested
// sources.
void Pcsx2App::SysExecute( CDVD_SourceType cdvdsrc )
{
SysReset();
LoadPluginsImmediate();
CDVDsys_SetFile( CDVDsrc_Iso, g_Conf->CurrentIso );
CDVDsys_ChangeSource( cdvdsrc );
if( m_gsFrame == NULL && GSopen2 != NULL )
{
// Yay, we get to open and manage our OWN window!!!
// (work-in-progress)
m_gsFrame = new GSFrame( m_MainFrame, L"PCSX2" );
m_gsFrame->SetFocus();
pDsp = (uptr)m_gsFrame->GetHandle();
m_gsFrame->Show();
// The "in the main window" quickie hack...
//pDsp = (uptr)m_MainFrame->m_background.GetHandle();
}
m_CoreThread.reset( new AppEmuThread( *m_CorePlugins ) );
m_CoreThread->Resume();
}
__forceinline bool EmulationInProgress() __forceinline bool EmulationInProgress()
{ {
return wxGetApp().EmuInProgress(); return wxGetApp().EmuInProgress();
@ -297,8 +259,8 @@ void Pcsx2App::ReadUserModeSettings()
// Save user's new settings // Save user's new settings
IniSaver saver( *conf_usermode ); IniSaver saver( *conf_usermode );
g_Conf->LoadSaveUserMode( saver, groupname ); g_Conf->LoadSaveUserMode( saver, groupname );
AppConfig_ReloadGlobalSettings( true ); AppConfig_OnChangedSettingsFolder( true );
wxGetApp().SaveSettings(); AppSaveSettings();
} }
else else
{ {
@ -322,8 +284,8 @@ void Pcsx2App::ReadUserModeSettings()
// Save user's new settings // Save user's new settings
IniSaver saver( *conf_usermode ); IniSaver saver( *conf_usermode );
g_Conf->LoadSaveUserMode( saver, groupname ); g_Conf->LoadSaveUserMode( saver, groupname );
AppConfig_ReloadGlobalSettings( true ); AppConfig_OnChangedSettingsFolder( true );
wxGetApp().SaveSettings(); AppSaveSettings();
} }
} }
} }
@ -448,7 +410,7 @@ bool Pcsx2App::OnInit()
delete wxLog::SetActiveTarget( new pxLogConsole() ); delete wxLog::SetActiveTarget( new pxLogConsole() );
ReadUserModeSettings(); ReadUserModeSettings();
AppConfig_ReloadGlobalSettings(); AppConfig_OnChangedSettingsFolder();
m_MainFrame = new MainEmuFrame( NULL, L"PCSX2" ); m_MainFrame = new MainEmuFrame( NULL, L"PCSX2" );
@ -465,7 +427,7 @@ bool Pcsx2App::OnInit()
m_MainFrame->Show(); m_MainFrame->Show();
SysDetect(); SysDetect();
ApplySettings(); AppApplySettings();
m_CoreAllocs.reset( new EmuCoreAllocations() ); m_CoreAllocs.reset( new EmuCoreAllocations() );
@ -697,7 +659,7 @@ int Pcsx2App::OnExit()
PrepForExit(); PrepForExit();
if( g_Conf ) if( g_Conf )
SaveSettings(); AppSaveSettings();
while( wxGetLocale() != NULL ) while( wxGetLocale() != NULL )
delete wxGetLocale(); delete wxGetLocale();
@ -726,7 +688,7 @@ Pcsx2App::~Pcsx2App()
CleanupMess(); CleanupMess();
} }
void Pcsx2App::ApplySettings( const AppConfig* oldconf ) void AppApplySettings( const AppConfig* oldconf )
{ {
DevAssert( wxThread::IsMain(), "ApplySettings valid from the GUI thread only." ); DevAssert( wxThread::IsMain(), "ApplySettings valid from the GUI thread only." );
@ -756,14 +718,11 @@ void Pcsx2App::ApplySettings( const AppConfig* oldconf )
} }
} }
if( m_MainFrame != NULL ) TryInvoke( MainFrame, ApplySettings() );
m_MainFrame->ApplySettings(); TryInvoke( CoreThread, ApplySettings( g_Conf->EmuOptions ) );
if( m_CoreThread )
m_CoreThread->ApplySettings( g_Conf->EmuOptions );
} }
void Pcsx2App::LoadSettings() void AppLoadSettings()
{ {
wxConfigBase* conf = wxConfigBase::Get( false ); wxConfigBase* conf = wxConfigBase::Get( false );
if( NULL == conf ) return; if( NULL == conf ) return;
@ -771,11 +730,10 @@ void Pcsx2App::LoadSettings()
IniLoader loader( *conf ); IniLoader loader( *conf );
g_Conf->LoadSave( loader ); g_Conf->LoadSave( loader );
if( m_MainFrame != NULL && m_MainFrame->m_RecentIsoList ) TryInvoke( MainFrame, LoadRecentIsoList( *conf ) );
m_MainFrame->m_RecentIsoList->Load( *conf );
} }
void Pcsx2App::SaveSettings() void AppSaveSettings()
{ {
wxConfigBase* conf = wxConfigBase::Get( false ); wxConfigBase* conf = wxConfigBase::Get( false );
if( NULL == conf ) return; if( NULL == conf ) return;
@ -783,6 +741,74 @@ void Pcsx2App::SaveSettings()
IniSaver saver( *conf ); IniSaver saver( *conf );
g_Conf->LoadSave( saver ); g_Conf->LoadSave( saver );
if( m_MainFrame != NULL && m_MainFrame->m_RecentIsoList ) TryInvoke( MainFrame, SaveRecentIsoList( *conf ) );
m_MainFrame->m_RecentIsoList->Save( *conf ); }
// --------------------------------------------------------------------------------------
// Sys/Core API and Shortcuts (for wxGetApp())
// --------------------------------------------------------------------------------------
// Executes the emulator using a saved/existing virtual machine state and currently
// configured CDVD source device.
void Pcsx2App::SysExecute()
{
SysReset();
LoadPluginsImmediate();
m_CoreThread.reset( new AppEmuThread( *m_CorePlugins ) );
m_CoreThread->Resume();
}
// Executes the specified cdvd source and optional elf file. This command performs a
// full closure of any existing VM state and starts a fresh VM with the requested
// sources.
void Pcsx2App::SysExecute( CDVD_SourceType cdvdsrc )
{
SysReset();
LoadPluginsImmediate();
CDVDsys_SetFile( CDVDsrc_Iso, g_Conf->CurrentIso );
CDVDsys_ChangeSource( cdvdsrc );
if( m_gsFrame == NULL && GSopen2 != NULL )
{
// Yay, we get to open and manage our OWN window!!!
// (work-in-progress)
m_gsFrame = new GSFrame( m_MainFrame, L"PCSX2" );
m_gsFrame->SetFocus();
pDsp = (uptr)m_gsFrame->GetHandle();
m_gsFrame->Show();
// The "in the main window" quickie hack...
//pDsp = (uptr)m_MainFrame->m_background.GetHandle();
}
m_CoreThread.reset( new AppEmuThread( *m_CorePlugins ) );
m_CoreThread->Resume();
}
// Executes the emulator using a saved/existing virtual machine state and currently
// configured CDVD source device.
void SysExecute()
{
wxGetApp().SysExecute();
}
void SysExecute( CDVD_SourceType cdvdsrc )
{
wxGetApp().SysExecute( cdvdsrc );
}
void SysResume()
{
TryInvoke( CoreThread, Resume() );
}
void SysSuspend()
{
TryInvoke( CoreThread, Suspend() );
}
void SysReset()
{
wxGetApp().SysReset();
} }

View File

@ -565,6 +565,7 @@ namespace Console
// they are implemented here using a mutex lock for maximum safety. // they are implemented here using a mutex lock for maximum safety.
static void _immediate_logger( const char* src ) static void _immediate_logger( const char* src )
{ {
ScopedLock locker( immediate_log_lock ); ScopedLock locker( immediate_log_lock );
if( emuLog != NULL ) if( emuLog != NULL )
@ -574,8 +575,16 @@ namespace Console
// [TODO] make this a configurable option? Do we care? :) // [TODO] make this a configurable option? Do we care? :)
#ifdef __LINUX__ #ifdef __LINUX__
// puts does automatic newlines, which we don't want here // puts does automatic newlines, which we don't want here
//fputs( "PCSX2 > ", stdout );
/*if (strchr(src, '\n'))
{
fputs( "PCSX2 > ", stdout );
fputs( src , stdout);
}
else
{*/
fputs( src, stdout ); fputs( src, stdout );
//}
#endif #endif
} }
@ -635,7 +644,7 @@ namespace Console
bool __fastcall WriteLn( const wxString& fmt ) bool __fastcall WriteLn( const wxString& fmt )
{ {
const wxString fmtline( fmt + L"\n" ); const wxString fmtline( fmt + L"\n" );
_immediate_logger( "PCSX2 > "); //_immediate_logger( "PCSX2 > ");
_immediate_logger( fmtline ); _immediate_logger( fmtline );
if( emuLog != NULL ) if( emuLog != NULL )

View File

@ -120,7 +120,7 @@ void Dialogs::ConfigurationDialog::OnOk_Click( wxCommandEvent& evt )
{ {
FindWindow( wxID_APPLY )->Disable(); FindWindow( wxID_APPLY )->Disable();
g_Conf->SettingsTabName = m_labels[m_listbook.GetSelection()]; g_Conf->SettingsTabName = m_labels[m_listbook.GetSelection()];
wxGetApp().SaveSettings(); AppSaveSettings();
Close(); Close();
evt.Skip(); evt.Skip();
@ -139,7 +139,7 @@ void Dialogs::ConfigurationDialog::OnApply_Click( wxCommandEvent& evt )
FindWindow( wxID_APPLY )->Disable(); FindWindow( wxID_APPLY )->Disable();
g_Conf->SettingsTabName = m_labels[m_listbook.GetSelection()]; g_Conf->SettingsTabName = m_labels[m_listbook.GetSelection()];
wxGetApp().SaveSettings(); AppSaveSettings();
} }

View File

@ -55,14 +55,14 @@ Dialogs::ImportSettingsDialog::ImportSettingsDialog( wxWindow* parent ) :
void Dialogs::ImportSettingsDialog::OnImport_Click( __unused wxCommandEvent& evt ) void Dialogs::ImportSettingsDialog::OnImport_Click( __unused wxCommandEvent& evt )
{ {
AppConfig_ReloadGlobalSettings( false ); // ... and import existing settings AppConfig_OnChangedSettingsFolder( false ); // ... and import existing settings
g_Conf->Folders.Bios.Mkdir(); g_Conf->Folders.Bios.Mkdir();
EndModal( wxID_OK ); EndModal( wxID_OK );
} }
void Dialogs::ImportSettingsDialog::OnOverwrite_Click( __unused wxCommandEvent& evt ) void Dialogs::ImportSettingsDialog::OnOverwrite_Click( __unused wxCommandEvent& evt )
{ {
AppConfig_ReloadGlobalSettings( true ); // ... and overwrite any existing settings AppConfig_OnChangedSettingsFolder( true ); // ... and overwrite any existing settings
g_Conf->Folders.Bios.Mkdir(); g_Conf->Folders.Bios.Mkdir();
EndModal( wxID_OK ); EndModal( wxID_OK );
} }

View File

@ -88,6 +88,19 @@ void MainEmuFrame::UpdateIsoSrcFile()
GetMenuBar()->SetLabel( MenuId_Src_Iso, label ); GetMenuBar()->SetLabel( MenuId_Src_Iso, label );
} }
void MainEmuFrame::LoadRecentIsoList( wxConfigBase& conf )
{
if( m_RecentIsoList )
m_RecentIsoList->Load( conf );
}
void MainEmuFrame::SaveRecentIsoList( wxConfigBase& conf )
{
if( m_RecentIsoList )
m_RecentIsoList->Load( conf );
}
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Video / Audio / Pad "Extensible" Menus // Video / Audio / Pad "Extensible" Menus
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
@ -174,7 +187,6 @@ void MainEmuFrame::ConnectMenus()
#define ConnectMenu( id, handler ) \ #define ConnectMenu( id, handler ) \
Connect( id, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainEmuFrame::handler) ) Connect( id, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainEmuFrame::handler) )
#define ConnectMenuRange( id_start, inc, handler ) \ #define ConnectMenuRange( id_start, inc, handler ) \
Connect( id_start, id_start + inc, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainEmuFrame::handler) ) Connect( id_start, id_start + inc, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainEmuFrame::handler) )
@ -182,9 +194,7 @@ void MainEmuFrame::ConnectMenus()
ConnectMenu( MenuId_Config_BIOS, Menu_SelectBios_Click ); ConnectMenu( MenuId_Config_BIOS, Menu_SelectBios_Click );
ConnectMenuRange(wxID_FILE1, 20, Menu_IsoRecent_Click); ConnectMenuRange(wxID_FILE1, 20, Menu_IsoRecent_Click);
ConnectMenuRange(MenuId_Config_GS, PluginId_Count, Menu_ConfigPlugin_Click); ConnectMenuRange(MenuId_Config_GS, PluginId_Count, Menu_ConfigPlugin_Click);
ConnectMenuRange(MenuId_Src_Iso, 3, Menu_CdvdSource_Click); ConnectMenuRange(MenuId_Src_Iso, 3, Menu_CdvdSource_Click);
ConnectMenu( MenuId_Video_Advanced, Menu_ConfigPlugin_Click); ConnectMenu( MenuId_Video_Advanced, Menu_ConfigPlugin_Click);
@ -194,6 +204,7 @@ void MainEmuFrame::ConnectMenus()
ConnectMenu( MenuId_Boot_CDVD, Menu_BootCdvd_Click ); ConnectMenu( MenuId_Boot_CDVD, Menu_BootCdvd_Click );
ConnectMenu( MenuId_Boot_ELF, Menu_OpenELF_Click ); ConnectMenu( MenuId_Boot_ELF, Menu_OpenELF_Click );
ConnectMenu( MenuId_IsoBrowse, Menu_IsoBrowse_Click ); ConnectMenu( MenuId_IsoBrowse, Menu_IsoBrowse_Click );
ConnectMenu( MenuId_SkipBiosToggle, Menu_SkipBiosToggle_Click );
ConnectMenu( MenuId_Exit, Menu_Exit_Click ); ConnectMenu( MenuId_Exit, Menu_Exit_Click );
ConnectMenu( MenuId_Emu_Pause, Menu_EmuPause_Click ); ConnectMenu( MenuId_Emu_Pause, Menu_EmuPause_Click );
@ -440,6 +451,8 @@ MainEmuFrame::~MainEmuFrame() throw()
void MainEmuFrame::ApplySettings() void MainEmuFrame::ApplySettings()
{ {
GetMenuBar()->Check( MenuId_SkipBiosToggle, g_Conf->EmuOptions.SkipBiosSplash );
// Always perform delete and reload of the Recent Iso List. This handles cases where // Always perform delete and reload of the Recent Iso List. This handles cases where
// the recent file count has been changed, and it's a helluva lot easier than trying // the recent file count has been changed, and it's a helluva lot easier than trying
// to make a clone copy of this complex object. ;) // to make a clone copy of this complex object. ;)
@ -452,7 +465,6 @@ void MainEmuFrame::ApplySettings()
m_RecentIsoList.reset(); m_RecentIsoList.reset();
m_RecentIsoList.reset( new wxFileHistory( g_Conf->RecentFileCount ) ); m_RecentIsoList.reset( new wxFileHistory( g_Conf->RecentFileCount ) );
m_RecentIsoList->Load( *cfg ); m_RecentIsoList->Load( *cfg );
UpdateIsoSrcFile(); UpdateIsoSrcFile();
cfg->Flush(); cfg->Flush();
} }

View File

@ -73,6 +73,9 @@ public:
void UpdateIsoSrcSelection(); void UpdateIsoSrcSelection();
void ApplySettings(); void ApplySettings();
void LoadRecentIsoList( wxConfigBase& conf );
void SaveRecentIsoList( wxConfigBase& conf );
protected: protected:
void InitLogBoxPosition( AppConfig::ConsoleLogOptions& conf ); void InitLogBoxPosition( AppConfig::ConsoleLogOptions& conf );
@ -85,6 +88,7 @@ protected:
void Menu_RunIso_Click(wxCommandEvent &event); void Menu_RunIso_Click(wxCommandEvent &event);
void Menu_IsoBrowse_Click(wxCommandEvent &event); void Menu_IsoBrowse_Click(wxCommandEvent &event);
void Menu_IsoRecent_Click(wxCommandEvent &event); void Menu_IsoRecent_Click(wxCommandEvent &event);
void Menu_SkipBiosToggle_Click(wxCommandEvent &event);
void Menu_BootCdvd_Click(wxCommandEvent &event); void Menu_BootCdvd_Click(wxCommandEvent &event);
void Menu_OpenELF_Click(wxCommandEvent &event); void Menu_OpenELF_Click(wxCommandEvent &event);

View File

@ -29,7 +29,7 @@ void MainEmuFrame::Menu_ConfigSettings_Click(wxCommandEvent &event)
{ {
if( Dialogs::ConfigurationDialog( this ).ShowModal() ) if( Dialogs::ConfigurationDialog( this ).ShowModal() )
{ {
wxGetApp().SaveSettings(); AppSaveSettings();
} }
} }
@ -37,7 +37,7 @@ void MainEmuFrame::Menu_SelectBios_Click(wxCommandEvent &event)
{ {
if( Dialogs::BiosSelectorDialog( this ).ShowModal() ) if( Dialogs::BiosSelectorDialog( this ).ShowModal() )
{ {
wxGetApp().SaveSettings(); AppSaveSettings();
} }
} }
@ -52,7 +52,7 @@ void MainEmuFrame::Menu_CdvdSource_Click( wxCommandEvent &event )
jNO_DEFAULT jNO_DEFAULT
} }
UpdateIsoSrcSelection(); UpdateIsoSrcSelection();
wxGetApp().SaveSettings(); AppSaveSettings();
} }
// Returns FALSE if the user cancelled the action. // Returns FALSE if the user cancelled the action.
@ -71,7 +71,7 @@ bool MainEmuFrame::_DoSelectIsoBrowser()
{ {
g_Conf->Folders.RunIso = wxFileName( ctrl.GetPath() ).GetPath(); g_Conf->Folders.RunIso = wxFileName( ctrl.GetPath() ).GetPath();
g_Conf->CurrentIso = ctrl.GetPath(); g_Conf->CurrentIso = ctrl.GetPath();
wxGetApp().SaveSettings(); AppSaveSettings();
UpdateIsoSrcFile(); UpdateIsoSrcFile();
return true; return true;
@ -82,13 +82,13 @@ bool MainEmuFrame::_DoSelectIsoBrowser()
void MainEmuFrame::Menu_BootCdvd_Click( wxCommandEvent &event ) void MainEmuFrame::Menu_BootCdvd_Click( wxCommandEvent &event )
{ {
wxGetApp().SysSuspend(); SysSuspend();
if( !wxFileExists( g_Conf->CurrentIso ) ) if( !wxFileExists( g_Conf->CurrentIso ) )
{ {
if( !_DoSelectIsoBrowser() ) if( !_DoSelectIsoBrowser() )
{ {
wxGetApp().SysResume(); SysResume();
return; return;
} }
} }
@ -100,35 +100,35 @@ void MainEmuFrame::Menu_BootCdvd_Click( wxCommandEvent &event )
if( !result ) if( !result )
{ {
wxGetApp().SysResume(); SysResume();
return; return;
} }
} }
g_Conf->EmuOptions.SkipBiosSplash = GetMenuBar()->IsChecked( MenuId_SkipBiosToggle ); g_Conf->EmuOptions.SkipBiosSplash = GetMenuBar()->IsChecked( MenuId_SkipBiosToggle );
wxGetApp().SaveSettings(); AppSaveSettings();
wxGetApp().SysExecute( g_Conf->CdvdSource ); SysExecute( g_Conf->CdvdSource );
} }
void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event ) void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event )
{ {
wxGetApp().SysSuspend(); SysSuspend();
_DoSelectIsoBrowser(); _DoSelectIsoBrowser();
wxGetApp().SysResume(); SysResume();
} }
void MainEmuFrame::Menu_RunIso_Click( wxCommandEvent &event ) void MainEmuFrame::Menu_RunIso_Click( wxCommandEvent &event )
{ {
wxGetApp().SysSuspend(); SysSuspend();
if( !_DoSelectIsoBrowser() ) if( !_DoSelectIsoBrowser() )
{ {
wxGetApp().SysResume(); SysResume();
return; return;
} }
wxGetApp().SysExecute( CDVDsrc_Iso ); SysExecute( CDVDsrc_Iso );
} }
void MainEmuFrame::Menu_IsoRecent_Click(wxCommandEvent &event) void MainEmuFrame::Menu_IsoRecent_Click(wxCommandEvent &event)
@ -137,6 +137,18 @@ void MainEmuFrame::Menu_IsoRecent_Click(wxCommandEvent &event)
//Console::WriteLn( Color_Magenta, g_RecentIsoList->GetHistoryFile( event.GetId() - g_RecentIsoList->GetBaseId() ) ); //Console::WriteLn( Color_Magenta, g_RecentIsoList->GetHistoryFile( event.GetId() - g_RecentIsoList->GetBaseId() ) );
} }
#include "IniInterface.h"
void MainEmuFrame::Menu_SkipBiosToggle_Click( wxCommandEvent &event )
{
g_Conf->EmuOptions.SkipBiosSplash = GetMenuBar()->IsChecked( MenuId_SkipBiosToggle );
wxConfigBase* conf = wxConfigBase::Get( false );
if( NULL == conf ) return;
IniSaver saver( *conf );
g_Conf->EmuOptions.LoadSave( saver );
}
void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent &event) void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent &event)
{ {
} }
@ -179,20 +191,20 @@ void MainEmuFrame::Menu_EmuClose_Click(wxCommandEvent &event)
void MainEmuFrame::Menu_EmuPause_Click(wxCommandEvent &event) void MainEmuFrame::Menu_EmuPause_Click(wxCommandEvent &event)
{ {
if( event.IsChecked() ) if( event.IsChecked() )
wxGetApp().SysSuspend(); SysSuspend();
else else
wxGetApp().SysResume(); SysResume();
} }
void MainEmuFrame::Menu_EmuReset_Click(wxCommandEvent &event) void MainEmuFrame::Menu_EmuReset_Click(wxCommandEvent &event)
{ {
bool wasRunning = EmulationInProgress(); bool wasRunning = EmulationInProgress();
wxGetApp().SysReset(); SysReset();
GetMenuBar()->Check( MenuId_Emu_Pause, false ); GetMenuBar()->Check( MenuId_Emu_Pause, false );
if( !wasRunning ) return; if( !wasRunning ) return;
wxGetApp().SysExecute(); SysExecute();
} }
void MainEmuFrame::Menu_ConfigPlugin_Click(wxCommandEvent &event) void MainEmuFrame::Menu_ConfigPlugin_Click(wxCommandEvent &event)

View File

@ -250,6 +250,7 @@ namespace Panels
const wxChar* GetEEcycleSliderMsg( int val ); const wxChar* GetEEcycleSliderMsg( int val );
const wxChar* GetVUcycleSliderMsg( int val ); const wxChar* GetVUcycleSliderMsg( int val );
void Slider_Click(wxScrollEvent &event);
void EECycleRate_Scroll(wxScrollEvent &event); void EECycleRate_Scroll(wxScrollEvent &event);
void VUCycleRate_Scroll(wxScrollEvent &event); void VUCycleRate_Scroll(wxScrollEvent &event);
}; };

View File

@ -83,9 +83,9 @@ bool Panels::StaticApplyState::ApplyPage( int pageid, bool saveOnSuccess )
// If an exception is thrown above, this code below won't get run. // If an exception is thrown above, this code below won't get run.
// (conveniently skipping any option application! :D) // (conveniently skipping any option application! :D)
wxGetApp().ApplySettings( &confcopy ); AppApplySettings( &confcopy );
if( saveOnSuccess ) if( saveOnSuccess )
wxGetApp().SaveSettings(); AppSaveSettings();
} }
catch( Exception::CannotApplySettings& ex ) catch( Exception::CannotApplySettings& ex )
{ {

View File

@ -216,6 +216,17 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
mainSizer.Add( &miscSizer, SizerFlags::TopLevelBox() ); mainSizer.Add( &miscSizer, SizerFlags::TopLevelBox() );
SetSizer( &mainSizer ); SetSizer( &mainSizer );
// There has to be a cleaner way to do this...
int ids[2] = {m_slider_eecycle->GetId(), m_slider_vustealer->GetId()};
for (int i=0; i<2; i++) {
Connect( ids[i], wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( SpeedHacksPanel::Slider_Click ) );
Connect( ids[i], wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( SpeedHacksPanel::Slider_Click ) );
Connect( ids[i], wxEVT_SCROLL_LINEUP, wxScrollEventHandler( SpeedHacksPanel::Slider_Click ) );
Connect( ids[i], wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( SpeedHacksPanel::Slider_Click ) );
Connect( ids[i], wxEVT_SCROLL_TOP, wxScrollEventHandler( SpeedHacksPanel::Slider_Click ) );
Connect( ids[i], wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( SpeedHacksPanel::Slider_Click ) );
}
Connect( m_slider_eecycle->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( SpeedHacksPanel::EECycleRate_Scroll ) ); Connect( m_slider_eecycle->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( SpeedHacksPanel::EECycleRate_Scroll ) );
Connect( m_slider_vustealer->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( SpeedHacksPanel::VUCycleRate_Scroll ) ); Connect( m_slider_vustealer->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( SpeedHacksPanel::VUCycleRate_Scroll ) );
} }
@ -233,6 +244,28 @@ void Panels::SpeedHacksPanel::Apply()
opts.vuMinMax = m_check_vuMinMax->GetValue(); opts.vuMinMax = m_check_vuMinMax->GetValue();
} }
void Panels::SpeedHacksPanel::Slider_Click(wxScrollEvent &event) {
wxSlider* slider = (wxSlider*) event.GetEventObject();
int value = slider->GetValue();
int eventType = event.GetEventType();
if (eventType == wxEVT_SCROLL_PAGEUP || eventType == wxEVT_SCROLL_LINEUP) {
if (value > slider->GetMin()) {
slider->SetValue(value-1);
}
}
else if (eventType == wxEVT_SCROLL_TOP) {
slider->SetValue(slider->GetMin());
}
else if (eventType == wxEVT_SCROLL_PAGEDOWN || eventType == wxEVT_SCROLL_LINEDOWN) {
if (value < slider->GetMax()) {
slider->SetValue(value+1);
}
}
else if (eventType == wxEVT_SCROLL_BOTTOM) {
slider->SetValue(slider->GetMax());
}
}
void Panels::SpeedHacksPanel::EECycleRate_Scroll(wxScrollEvent &event) void Panels::SpeedHacksPanel::EECycleRate_Scroll(wxScrollEvent &event)
{ {
m_msg_eecycle->SetLabel(GetEEcycleSliderMsg(m_slider_eecycle->GetValue())); m_msg_eecycle->SetLabel(GetEEcycleSliderMsg(m_slider_eecycle->GetValue()));

View File

@ -35,7 +35,7 @@ using namespace Threading;
// non-NULL. If NULL, an error occurred and the thread loads the exception into either // non-NULL. If NULL, an error occurred and the thread loads the exception into either
// Ex_PluginError or Ex_RuntimeError. // Ex_PluginError or Ex_RuntimeError.
// //
class LoadPluginsTask : public Threading::PersistentThread class LoadPluginsTask : public PersistentThread
{ {
public: public:
Exception::PluginError* Ex_PluginError; Exception::PluginError* Ex_PluginError;

View File

@ -62,7 +62,7 @@ void States_Load( const wxString& file )
StateRecovery::Recover(); StateRecovery::Recover();
} }
wxGetApp().SysExecute(); SysExecute();
} }
void States_Load(int num) void States_Load(int num)

View File

@ -1,17 +1,9 @@
#include "Global.h" #include "Global.h"
#include <Dbt.h>
#include <commctrl.h>
#include "Config.h"
#include "PS2Edefs.h" #include "PS2Edefs.h"
#include "Resource.h" #include "Resource.h"
#include "Diagnostics.h" #include "Diagnostics.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "DeviceEnumerator.h" #include "DeviceEnumerator.h"
#include "InputManager.h"
#include "KeyboardQueue.h" #include "KeyboardQueue.h"
#include "WndProcEater.h" #include "WndProcEater.h"
#include "DualShock3.h" #include "DualShock3.h"

View File

@ -1,9 +1,6 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#include "InputManager.h"
#include "PS2Etypes.h"
extern u8 ps2e; extern u8 ps2e;
enum PadType { enum PadType {

View File

@ -1,6 +1,5 @@
#include "Global.h" #include "Global.h"
#include "DeviceEnumerator.h" #include "DeviceEnumerator.h"
#include "InputManager.h"
#include "WindowsMessaging.h" #include "WindowsMessaging.h"
#include "DirectInput.h" #include "DirectInput.h"
#include "KeyboardHook.h" #include "KeyboardHook.h"

View File

@ -1,10 +1,7 @@
#include "Global.h" #include "Global.h"
#include "InputManager.h"
#include "DeviceEnumerator.h" #include "DeviceEnumerator.h"
#include "resource.h" #include "resource.h"
#include "KeyboardQueue.h" #include "KeyboardQueue.h"
#include <math.h>
#include <commctrl.h>
Device *dev; Device *dev;

View File

@ -1,13 +1,10 @@
#define DIRECTINPUT_VERSION 0x0800
#include "Global.h" #include "Global.h"
#include "VKey.h" #include "VKey.h"
#include "DirectInput.h" #include "DirectInput.h"
#include <dinput.h> #include <dinput.h>
#include "InputManager.h"
#include "DeviceEnumerator.h" #include "DeviceEnumerator.h"
#include "PS2Etypes.h" #include "PS2Etypes.h"
#include <stdio.h>
// All for getting GUIDs of XInput devices.... // All for getting GUIDs of XInput devices....
#include <wbemidl.h> #include <wbemidl.h>

View File

@ -1,3 +1 @@
#include "InputManager.h"
void EnumDirectInputDevices(int ignoreXInput); void EnumDirectInputDevices(int ignoreXInput);

View File

@ -1,7 +1,6 @@
#include "Global.h" #include "Global.h"
#include "usb.h" #include "usb.h"
#include "HidDevice.h" #include "HidDevice.h"
#include "InputManager.h"
#define VID 0x054c #define VID 0x054c

View File

@ -1,6 +1,5 @@
int DualShock3Possible(); int DualShock3Possible();
void EnumDualShock3s(); void EnumDualShock3s();
#include "InputManager.h"
// May move elsewhere in the future. // May move elsewhere in the future.
int InitLibUsb(); int InitLibUsb();

View File

@ -3,6 +3,8 @@
// dll size by over 100k while avoiding any dependencies on updated CRT dlls. // dll size by over 100k while avoiding any dependencies on updated CRT dlls.
#pragma once #pragma once
#define DIRECTINPUT_VERSION 0x0800
#ifdef NO_CRT #ifdef NO_CRT
#define _CRT_ALLOCATION_DEFINED #define _CRT_ALLOCATION_DEFINED
#endif #endif
@ -27,6 +29,15 @@
#include <windows.h> #include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <commctrl.h>
// Only needed for DBT_DEVNODES_CHANGED
#include <Dbt.h>
#include "PS2Etypes.h" #include "PS2Etypes.h"
#include "PS2Edefs.h" #include "PS2Edefs.h"
@ -66,7 +77,17 @@ EXPORT_C_(s32) PADfreeze(int mode, freezeData *data);
EXPORT_C_(s32) PADsetSlot(u8 port, u8 slot); EXPORT_C_(s32) PADsetSlot(u8 port, u8 slot);
EXPORT_C_(s32) PADqueryMtap(u8 port); EXPORT_C_(s32) PADqueryMtap(u8 port);
#include "InputManager.h"
#include "Config.h"
#ifdef NO_CRT #ifdef NO_CRT
#define malloc MyMalloc
#define calloc MyCalloc
#define free MyFree
#define realloc MyRealloc
#define wcsdup MyWcsdup
#define wcsicmp MyWcsicmp
inline void * malloc(size_t size) { inline void * malloc(size_t size) {
return HeapAlloc(GetProcessHeap(), 0, size); return HeapAlloc(GetProcessHeap(), 0, size);
} }

View File

@ -1,7 +1,6 @@
#include "InputManager.h"
#include "Global.h" #include "Global.h"
#include "InputManager.h"
#include "KeyboardQueue.h" #include "KeyboardQueue.h"
#include <math.h>
InputDeviceManager *dm = 0; InputDeviceManager *dm = 0;

View File

@ -1,9 +1,7 @@
#include "Global.h" #include "Global.h"
#include "KeyboardHook.h" #include "KeyboardHook.h"
#include "InputManager.h"
#include "WindowsKeyboard.h" #include "WindowsKeyboard.h"
#include "Config.h"
#include "VKey.h" #include "VKey.h"
#include "WndProcEater.h" #include "WndProcEater.h"
#include "DeviceEnumerator.h" #include "DeviceEnumerator.h"

View File

@ -1,3 +1,4 @@
#include "Global.h"
// This is undoubtedly completely unnecessary. // This is undoubtedly completely unnecessary.
#include "KeyboardQueue.h" #include "KeyboardQueue.h"

View File

@ -1,5 +1,3 @@
#include "Global.h"
#include "PS2Edefs.h"
// This entire thing isn't really needed, // This entire thing isn't really needed,
// but takes little enough effort to be safe... // but takes little enough effort to be safe...

View File

@ -1,17 +1,10 @@
#include "Global.h" #include "Global.h"
#include <math.h>
#include <Dbt.h>
#include <stdio.h>
// For escape timer, so as not to break GSDX+DX9. // For escape timer, so as not to break GSDX+DX9.
#include <time.h> #include <time.h>
#define PADdefs #define PADdefs
#include "PS2Etypes.h"
#include "PS2Edefs.h"
#include "Config.h"
#include "InputManager.h"
#include "DeviceEnumerator.h" #include "DeviceEnumerator.h"
#include "WndProcEater.h" #include "WndProcEater.h"
#include "KeyboardQueue.h" #include "KeyboardQueue.h"
@ -596,27 +589,26 @@ u32 CALLBACK PS2EgetLibVersion2(u32 type) {
// Used in about and config screens. // Used in about and config screens.
void GetNameAndVersionString(wchar_t *out) { void GetNameAndVersionString(wchar_t *out) {
#ifdef PCSX2_DEBUG #ifdef NO_CRT
wsprintfW(out, L"LilyPad Debug %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#elif (_MSC_VER != 1400)
wsprintfW(out, L"LilyPad svn %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#else
wsprintfW(out, L"LilyPad %i.%i.%i", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV); wsprintfW(out, L"LilyPad %i.%i.%i", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#elif defined(PCSX2_DEBUG)
wsprintfW(out, L"LilyPad Debug %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#else
wsprintfW(out, L"LilyPad svn %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#endif #endif
} }
char* CALLBACK PSEgetLibName() { char* CALLBACK PSEgetLibName() {
#ifdef PCSX2_DEBUG #ifdef NO_CRT
return "LilyPad";
#elif defined(PCSX2_DEBUG)
static char version[50]; static char version[50];
sprintf(version, "LilyPad Debug (r%i)", SVN_REV); sprintf(version, "LilyPad Debug (r%i)", SVN_REV);
return version; return version;
#else #else
#if (_MSC_VER != 1400)
static char version[50]; static char version[50];
sprintf(version, "LilyPad svn (r%i)", SVN_REV); sprintf(version, "LilyPad svn (r%i)", SVN_REV);
return version; return version;
#endif
return "LilyPad";
#endif #endif
} }
@ -1412,18 +1404,6 @@ u32 CALLBACK PSEgetLibVersion() {
return (VERSION & 0xFFFFFF); return (VERSION & 0xFFFFFF);
} }
// Little funkiness to handle rounding floating points to ints without the C runtime.
// Unfortunately, means I can't use /GL optimization option when NO_CRT is defined.
#ifdef NO_CRT
extern "C" long _cdecl _ftol();
extern "C" long _cdecl _ftol2_sse() {
return _ftol();
}
extern "C" long _cdecl _ftol2() {
return _ftol();
}
#endif
s32 CALLBACK PADqueryMtap(u8 port) { s32 CALLBACK PADqueryMtap(u8 port) {
port--; port--;
if (port > 1) return 0; if (port > 1) return 0;
@ -1441,3 +1421,16 @@ s32 CALLBACK PADsetSlot(u8 port, u8 slot) {
// First slot always allowed. // First slot always allowed.
return pads[port][slot].enabled | !slot; return pads[port][slot].enabled | !slot;
} }
// Little funkiness to handle rounding floating points to ints without the C runtime.
// Unfortunately, means I can't use /GL optimization option when NO_CRT is defined.
#ifdef NO_CRT
extern "C" long _cdecl _ftol();
extern "C" long _cdecl _ftol2_sse() {
return _ftol();
}
extern "C" long _cdecl _ftol2() {
return _ftol();
}
#endif

View File

@ -1,25 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LilyPad", "LilyPad_VC2005.vcproj", "{E4081455-398C-4610-A87C-90A8A7D72DC3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Debug|Win32.ActiveCfg = Debug|Win32
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Debug|Win32.Build.0 = Debug|Win32
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Debug|x64.ActiveCfg = Debug|x64
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Debug|x64.Build.0 = Debug|x64
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Release|Win32.ActiveCfg = Release|Win32
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Release|Win32.Build.0 = Release|Win32
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Release|x64.ActiveCfg = Release|x64
{E4081455-398C-4610-A87C-90A8A7D72DC3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,764 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="LilyPad"
ProjectGUID="{E4081455-398C-4610-A87C-90A8A7D72DC3}"
RootNamespace="LilyPad"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/LilyPad.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\common\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
MinimalRebuild="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/LilyPad.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Winmm.lib setupapi.lib ole32.lib advapi32.lib user32.lib kernel32.lib Comdlg32.lib dinput8.lib dxguid.lib comctl32.lib"
OutputFile="..\..\bin\plugins\$(ProjectName)-dbg.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateManifest="false"
ModuleDefinitionFile=".\LilyPad.def"
GenerateDebugInformation="true"
ImportLibrary=".\Debug/LilyPad.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/LilyPad.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Debug/LilyPad.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib dinput8.lib dxguid.lib comctl32.lib"
LinkIncremental="2"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\LilyPad.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/LilyPad.pdb"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/LilyPad.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/LilyPad.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\common\include"
PreprocessorDefinitions="NO_CRT;WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
StringPooling="true"
ExceptionHandling="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
PrecompiledHeaderFile=".\Release/LilyPad.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CallingConvention="1"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Winmm.lib ntdll.lib setupapi.lib ole32.lib advapi32.lib user32.lib kernel32.lib Comdlg32.lib dinput8.lib dxguid.lib comctl32.lib"
OutputFile="..\..\bin\plugins\$(ProjectName).dll"
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateManifest="false"
IgnoreAllDefaultLibraries="true"
ModuleDefinitionFile=".\LilyPad.def"
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="1"
LinkTimeCodeGeneration="0"
EntryPointSymbol="DllMain"
ImportLibrary=".\Release/LilyPad.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
EmbedManifest="false"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/LilyPad.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Release/LilyPad.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
StringPooling="true"
ExceptionHandling="0"
RuntimeLibrary="2"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
WarningLevel="3"
SuppressStartupBanner="true"
CallingConvention="1"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib dinput8.lib dxguid.lib comctl32.lib"
OutputFile="$(OutDir)\$(ProjectName)64.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\LilyPad.def"
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="1"
EntryPointSymbol=""
BaseAddress="0x15000000"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/LilyPad.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="mt.exe -manifest $(IntDir)\LilyPad64.dll.manifest -outputresource:$(OutDir)\$(ProjectName)64.dll"
ExcludedFromBuild="true"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="Config.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="Config.h"
>
</File>
<File
RelativePath=".\Diagnostics.cpp"
>
</File>
<File
RelativePath=".\Diagnostics.h"
>
</File>
<File
RelativePath="LilyPad.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="Global.h"
>
</File>
<File
RelativePath="PS2Edefs.h"
>
</File>
<File
RelativePath="PS2Etypes.h"
>
</File>
<File
RelativePath="resource.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="frog.ico"
>
</File>
<File
RelativePath="LilyPad.def"
>
</File>
<File
RelativePath="LilyPad.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="InputAPIs"
>
<File
RelativePath=".\DirectInput.cpp"
>
</File>
<File
RelativePath=".\DirectInput.h"
>
</File>
<File
RelativePath=".\DualShock3.cpp"
>
</File>
<File
RelativePath=".\DualShock3.h"
>
</File>
<File
RelativePath=".\HidDevice.cpp"
>
</File>
<File
RelativePath=".\HidDevice.h"
>
</File>
<File
RelativePath=".\KeyboardHook.cpp"
>
</File>
<File
RelativePath=".\KeyboardHook.h"
>
</File>
<File
RelativePath=".\KeyboardQueue.cpp"
>
</File>
<File
RelativePath=".\KeyboardQueue.h"
>
</File>
<File
RelativePath=".\RawInput.cpp"
>
</File>
<File
RelativePath=".\RawInput.h"
>
</File>
<File
RelativePath=".\usb.h"
>
</File>
<File
RelativePath=".\WindowsKeyboard.cpp"
>
</File>
<File
RelativePath=".\WindowsKeyboard.h"
>
</File>
<File
RelativePath=".\WindowsMessaging.cpp"
>
</File>
<File
RelativePath=".\WindowsMessaging.h"
>
</File>
<File
RelativePath=".\WindowsMouse.cpp"
>
</File>
<File
RelativePath=".\WindowsMouse.h"
>
</File>
<File
RelativePath=".\XInput.cpp"
>
</File>
<File
RelativePath=".\XInput.h"
>
</File>
</Filter>
<Filter
Name="Input"
>
<File
RelativePath=".\DeviceEnumerator.cpp"
>
</File>
<File
RelativePath=".\DeviceEnumerator.h"
>
</File>
<File
RelativePath=".\InputManager.cpp"
>
</File>
<File
RelativePath=".\InputManager.h"
>
</File>
<File
RelativePath="VKey.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="VKey.h"
>
</File>
<File
RelativePath=".\WndProcEater.cpp"
>
</File>
<File
RelativePath=".\WndProcEater.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -20,7 +20,6 @@
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops" InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops"
UseOfMFC="0" UseOfMFC="0"
@ -44,13 +43,14 @@
MkTypLibCompatible="true" MkTypLibCompatible="true"
SuppressStartupBanner="true" SuppressStartupBanner="true"
TargetEnvironment="1" TargetEnvironment="1"
TypeLibraryName=".\Debug/LilyPad.tlb"
HeaderFileName="" HeaderFileName=""
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_USRDLL;TEST_EXPORTS" PreprocessorDefinitions="_USRDLL;TEST_EXPORTS"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="Global.h"
DisableSpecificWarnings="4995, 4996" DisableSpecificWarnings="4995, 4996"
/> />
<Tool <Tool
@ -101,6 +101,89 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="2"
InheritedPropertySheets="..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\3rdpartyDeps.vsprops"
UseOfMFC="0"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="Global.h"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib dinput8.lib dxguid.lib comctl32.lib"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
ConfigurationType="2" ConfigurationType="2"
@ -133,6 +216,8 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
PreprocessorDefinitions="NDEBUG;_USRDLL;TEST_EXPORTS" PreprocessorDefinitions="NDEBUG;_USRDLL;TEST_EXPORTS"
ExceptionHandling="0" ExceptionHandling="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="Global.h"
CallingConvention="1" CallingConvention="1"
DisableSpecificWarnings="4995, 4996" DisableSpecificWarnings="4995, 4996"
/> />
@ -183,90 +268,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="2"
InheritedPropertySheets="..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\3rdpartyDeps.vsprops"
UseOfMFC="0"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib dinput8.lib dxguid.lib comctl32.lib"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
ConfigurationType="2" ConfigurationType="2"
@ -311,6 +312,8 @@
BufferSecurityCheck="false" BufferSecurityCheck="false"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
FloatingPointModel="2" FloatingPointModel="2"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="Global.h"
WarningLevel="3" WarningLevel="3"
SuppressStartupBanner="true" SuppressStartupBanner="true"
CallingConvention="1" CallingConvention="1"
@ -361,7 +364,194 @@
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCPostBuildEventTool"
CommandLine="mt.exe -manifest $(IntDir)\LilyPad64.dll.manifest -outputresource:$(OutDir)\$(ProjectName)64.dll"
ExcludedFromBuild="true"
/>
</Configuration>
<Configuration
Name="Release No CRT|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
WholeProgramOptimization="false"
PreprocessorDefinitions="NDEBUG;_USRDLL;TEST_EXPORTS;NO_CRT"
ExceptionHandling="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="Global.h"
CallingConvention="1"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="ntdll.lib Setupapi.lib Winmm.lib ole32.lib advapi32.lib user32.lib kernel32.lib Comdlg32.lib dinput8.lib dxguid.lib comctl32.lib"
OutputFile="$(OutDir)\$(ProjectName)-no CRT.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreAllDefaultLibraries="true"
ModuleDefinitionFile=".\LilyPad.def"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="0"
EntryPointSymbol="DllMain"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release No CRT|x64"
ConfigurationType="2"
InheritedPropertySheets="..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\3rdpartyDeps.vsprops"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="false"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_EXPORTS"
StringPooling="true"
ExceptionHandling="0"
RuntimeLibrary="2"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="Global.h"
WarningLevel="3"
SuppressStartupBanner="true"
CallingConvention="1"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib dinput8.lib dxguid.lib comctl32.lib"
OutputFile="$(OutDir)\$(ProjectName)64.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\LilyPad.def"
OptimizeReferences="2"
EnableCOMDATFolding="2"
EntryPointSymbol=""
BaseAddress="0x15000000"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release No CRT/LilyPad.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
@ -388,9 +578,26 @@
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Release|Win32"
> >
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
@ -399,15 +606,16 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release No CRT|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release No CRT|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -440,9 +648,26 @@
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Release|Win32"
> >
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
@ -451,15 +676,16 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release No CRT|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release No CRT|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -474,6 +700,58 @@
Name="Header Files" Name="Header Files"
Filter="h;hpp;hxx;hm;inl" Filter="h;hpp;hxx;hm;inl"
> >
<File
RelativePath=".\Global.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release No CRT|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release No CRT|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File <File
RelativePath="Global.h" RelativePath="Global.h"
> >
@ -506,14 +784,6 @@
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Debug|x64"
> >
@ -522,6 +792,14 @@
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release|x64"
> >
@ -530,6 +808,22 @@
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release No CRT|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release No CRT|x64"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File> </File>
</Filter> </Filter>
<Filter <Filter
@ -650,9 +944,26 @@
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Release|Win32"
> >
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
@ -661,15 +972,16 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release No CRT|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions="" PreprocessorDefinitions=""
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release No CRT|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"

View File

@ -6,7 +6,6 @@
#include "WindowsKeyboard.h" #include "WindowsKeyboard.h"
#include "WindowsMouse.h" #include "WindowsMouse.h"
#include "Config.h"
typedef BOOL (CALLBACK *_RegisterRawInputDevices)(PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize); typedef BOOL (CALLBACK *_RegisterRawInputDevices)(PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize);
typedef UINT (CALLBACK *_GetRawInputDeviceInfo)(HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize); typedef UINT (CALLBACK *_GetRawInputDeviceInfo)(HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize);

View File

@ -1,5 +1,3 @@
#include "InputManager.h"
// Can't enumerate raw devices, can only detect them when // Can't enumerate raw devices, can only detect them when
// receiving data from them, so just use the list from before. // receiving data from them, so just use the list from before.
void EnumRawInputDevices(); void EnumRawInputDevices();

View File

@ -1,6 +1,5 @@
#include "VKey.h"
#include "Global.h" #include "Global.h"
#include <stdio.h> #include "VKey.h"
wchar_t *GetVKStringW(unsigned char vk) { wchar_t *GetVKStringW(unsigned char vk) {
int flag; int flag;

View File

@ -1,5 +1,3 @@
#include "InputManager.h"
// Shared functionality for WM and RAW keyboards. // Shared functionality for WM and RAW keyboards.
class WindowsKeyboard : public Device { class WindowsKeyboard : public Device {
public: public:

View File

@ -1,3 +1 @@
#include "InputManager.h"
void EnumWindowsMessagingDevices(); void EnumWindowsMessagingDevices();

View File

@ -1,5 +1,3 @@
#include "InputManager.h"
// Shared functionality for WM and RAW keyboards. // Shared functionality for WM and RAW keyboards.
class WindowsMouse : public Device { class WindowsMouse : public Device {
public: public:

View File

@ -1,3 +1,4 @@
#include "Global.h"
#include "WndProcEater.h" #include "WndProcEater.h"
static HWND hWndEaten = 0; static HWND hWndEaten = 0;

View File

@ -1,5 +1,3 @@
#include "Global.h"
#define EATPROC_NO_UPDATE_WHILE_UPDATING_DEVICES 1 #define EATPROC_NO_UPDATE_WHILE_UPDATING_DEVICES 1
/* Need this to let window be subclassed multiple times but still clean up nicely. /* Need this to let window be subclassed multiple times but still clean up nicely.

View File

@ -1,7 +1,6 @@
#include "Global.h" #include "Global.h"
#include "VKey.h" #include "VKey.h"
#include <xinput.h> #include <xinput.h>
#include "InputManager.h"
// This way, I don't require that XInput junk be installed. // This way, I don't require that XInput junk be installed.
typedef void (CALLBACK *_XInputEnable)(BOOL enable); typedef void (CALLBACK *_XInputEnable)(BOOL enable);

View File

@ -3,9 +3,6 @@
#ifndef __USB_H__ #ifndef __USB_H__
#define __USB_H__ #define __USB_H__
#include <stdlib.h>
#include <windows.h>
/* /*
* 'interface' is defined somewhere in the Windows header files. This macro * 'interface' is defined somewhere in the Windows header files. This macro
* is deleted here to avoid conflicts and compile errors. * is deleted here to avoid conflicts and compile errors.

View File

@ -250,7 +250,9 @@ EXPORT_C_(void) SPU2close()
if( !spu2open ) return; if( !spu2open ) return;
FileLog("[%10d] SPU2 Close\n",Cycles); FileLog("[%10d] SPU2 Close\n",Cycles);
#ifndef __LINUX__
DspCloseLibrary(); DspCloseLibrary();
#endif
spdif_shutdown(); spdif_shutdown();
SndBuffer::Cleanup(); SndBuffer::Cleanup();

View File

@ -103,6 +103,6 @@ void configure()
ReadSettings(); ReadSettings();
} }
void SysMessage(char const*, ...) void MessageBox(char const*, ...)
{ {
} }

View File

@ -15,6 +15,9 @@
<Add option="-g" /> <Add option="-g" />
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" /> <Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" />
</Compiler> </Compiler>
<Linker>
<Add library="../../../../deps/debug/libsoundtouch-dbg.a" />
</Linker>
</Target> </Target>
<Target title="Release"> <Target title="Release">
<Option output="../../../../bin/plugins/SPU2-X.so" prefix_auto="0" extension_auto="0" /> <Option output="../../../../bin/plugins/SPU2-X.so" prefix_auto="0" extension_auto="0" />
@ -27,6 +30,7 @@
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-s" /> <Add option="-s" />
<Add library="../../../../deps/libsoundtouch.a" />
</Linker> </Linker>
</Target> </Target>
</Build> </Build>
@ -51,27 +55,6 @@
<Add library="asound" /> <Add library="asound" />
<Add library="stdc++" /> <Add library="stdc++" />
</Linker> </Linker>
<Unit filename="../../../../3rdparty/SoundTouch/AAFilter.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/AAFilter.h" />
<Unit filename="../../../../3rdparty/SoundTouch/BPMDetect.h" />
<Unit filename="../../../../3rdparty/SoundTouch/FIFOSampleBuffer.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/FIFOSampleBuffer.h" />
<Unit filename="../../../../3rdparty/SoundTouch/FIFOSamplePipe.h" />
<Unit filename="../../../../3rdparty/SoundTouch/FIRFilter.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/FIRFilter.h" />
<Unit filename="../../../../3rdparty/SoundTouch/RateTransposer.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/RateTransposer.h" />
<Unit filename="../../../../3rdparty/SoundTouch/STTypes.h" />
<Unit filename="../../../../3rdparty/SoundTouch/SoundTouch.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/SoundTouch.h" />
<Unit filename="../../../../3rdparty/SoundTouch/TDStretch.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/TDStretch.h" />
<Unit filename="../../../../3rdparty/SoundTouch/WavFile.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/WavFile.h" />
<Unit filename="../../../../3rdparty/SoundTouch/cpu_detect.h" />
<Unit filename="../../../../3rdparty/SoundTouch/cpu_detect_x86_gcc.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/mmx_optimized.cpp" />
<Unit filename="../../../../3rdparty/SoundTouch/sse_optimized.cpp" />
<Unit filename="../3rdparty/liba52/a52.h" /> <Unit filename="../3rdparty/liba52/a52.h" />
<Unit filename="../3rdparty/liba52/a52_internal.h" /> <Unit filename="../3rdparty/liba52/a52_internal.h" />
<Unit filename="../3rdparty/liba52/attributes.h" /> <Unit filename="../3rdparty/liba52/attributes.h" />

View File

@ -328,6 +328,7 @@ void SndBuffer::Write( const StereoOut32& Sample )
ssFreeze--; ssFreeze--;
return; return;
} }
#ifndef __LINUX__
else if( dspPluginEnabled ) else if( dspPluginEnabled )
{ {
// Convert in, send to winamp DSP, and convert out. // Convert in, send to winamp DSP, and convert out.
@ -357,6 +358,7 @@ void SndBuffer::Write( const StereoOut32& Sample )
); );
} }
} }
#endif
else else
{ {
if( !timeStretchDisabled ) if( !timeStretchDisabled )

View File

@ -67,6 +67,7 @@ void SetIrqCall()
has_to_call_irq=true; has_to_call_irq=true;
} }
#ifndef __LINUX__
void SysMessage(const char *fmt, ...) void SysMessage(const char *fmt, ...)
{ {
va_list list; va_list list;
@ -79,6 +80,19 @@ void SysMessage(const char *fmt, ...)
swprintf_s(wtmp, L"%S", tmp); swprintf_s(wtmp, L"%S", tmp);
MessageBox(0, wtmp, L"SPU2-X System Message", 0); MessageBox(0, wtmp, L"SPU2-X System Message", 0);
} }
#else
void SysMessage(const char *fmt, ...)
{
va_list list;
char tmp[512];
wchar_t wtmp[512];
va_start(list,fmt);
sprintf(tmp,fmt,list);
va_end(list);
printf("%s", tmp);
}
#endif
__forceinline s16 * __fastcall GetMemPtr(u32 addr) __forceinline s16 * __fastcall GetMemPtr(u32 addr)
{ {
@ -791,7 +805,10 @@ static __forceinline u16 GetLoWord( s32& src )
return ((u16*)&src)[0]; return ((u16*)&src)[0];
} }
__forceinline void SPU2_FastWrite( u32 rmem, u16 value ) #ifndef __LINUX__
__forceinline
#endif
void SPU2_FastWrite( u32 rmem, u16 value )
{ {
u32 vx=0, vc=0, core=0, omem, mem; u32 vx=0, vc=0, core=0, omem, mem;
omem=mem=rmem & 0x7FF; //FFFF; omem=mem=rmem & 0x7FF; //FFFF;

View File

@ -118,8 +118,8 @@ private:
wfx.Format.wBitsPerSample = 16; wfx.Format.wBitsPerSample = 16;
wfx.Format.nBlockAlign = wfx.Format.nChannels*wfx.Format.wBitsPerSample/8; wfx.Format.nBlockAlign = wfx.Format.nChannels*wfx.Format.wBitsPerSample/8;
wfx.Format.nAvgBytesPerSec = SampleRate * wfx.Format.nBlockAlign; wfx.Format.nAvgBytesPerSec = SampleRate * wfx.Format.nBlockAlign;
wfx.Format.cbSize = 22; wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
wfx.Samples.wValidBitsPerSample = 0; wfx.Samples.wValidBitsPerSample = 16;
wfx.dwChannelMask = chanConfig; wfx.dwChannelMask = chanConfig;
wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;

View File

@ -16,6 +16,9 @@
<Compiler> <Compiler>
<Add option="-g" /> <Add option="-g" />
</Compiler> </Compiler>
<Linker>
<Add library="../../../deps/debug/libsoundtouch-dbg.a" />
</Linker>
</Target> </Target>
<Target title="Release"> <Target title="Release">
<Option output="../../../bin/plugins/libZeroSPU2.so.0.1.0" prefix_auto="0" extension_auto="0" /> <Option output="../../../bin/plugins/libZeroSPU2.so.0.1.0" prefix_auto="0" extension_auto="0" />
@ -29,6 +32,7 @@
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-s" /> <Add option="-s" />
<Add library="../../../deps/libsoundtouch.a" />
</Linker> </Linker>
</Target> </Target>
</Build> </Build>
@ -53,27 +57,6 @@
<Add library="stdc++" /> <Add library="stdc++" />
<Add library="dl" /> <Add library="dl" />
</Linker> </Linker>
<Unit filename="../../../3rdparty/SoundTouch/AAFilter.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/AAFilter.h" />
<Unit filename="../../../3rdparty/SoundTouch/BPMDetect.h" />
<Unit filename="../../../3rdparty/SoundTouch/FIFOSampleBuffer.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/FIFOSampleBuffer.h" />
<Unit filename="../../../3rdparty/SoundTouch/FIFOSamplePipe.h" />
<Unit filename="../../../3rdparty/SoundTouch/FIRFilter.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/FIRFilter.h" />
<Unit filename="../../../3rdparty/SoundTouch/RateTransposer.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/RateTransposer.h" />
<Unit filename="../../../3rdparty/SoundTouch/STTypes.h" />
<Unit filename="../../../3rdparty/SoundTouch/SoundTouch.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/SoundTouch.h" />
<Unit filename="../../../3rdparty/SoundTouch/TDStretch.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/TDStretch.h" />
<Unit filename="../../../3rdparty/SoundTouch/WavFile.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/WavFile.h" />
<Unit filename="../../../3rdparty/SoundTouch/cpu_detect.h" />
<Unit filename="../../../3rdparty/SoundTouch/cpu_detect_x86_gcc.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/mmx_optimized.cpp" />
<Unit filename="../../../3rdparty/SoundTouch/sse_optimized.cpp" />
<Unit filename="Alsa.cpp" /> <Unit filename="Alsa.cpp" />
<Unit filename="Linux.cpp" /> <Unit filename="Linux.cpp" />
<Unit filename="Linux.h" /> <Unit filename="Linux.h" />