SPU2-X: Implemented SPU2test - it now reports an error and returns failure on CPUs not supporting SSE2.

DevNote: SPU2-X now links against w32pthreads and x86emitter.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2202 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-11-16 13:14:02 +00:00
parent a341a47f1f
commit 40ed711445
5 changed files with 39 additions and 12 deletions

View File

@ -33,6 +33,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPU2-X", "plugins\spu2-x\sr
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D} = {E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}
{C34487AF-228A-4D11-8E50-27803DF76873} = {C34487AF-228A-4D11-8E50-27803DF76873}
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E} = {0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}
{A51123F5-9505-4EAE-85E7-D320290A272C} = {A51123F5-9505-4EAE-85E7-D320290A272C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GSdx", "plugins\GSdx\GSdx_vs2008.vcproj", "{18E42F6F-3A62-41EE-B42F-79366C4F1E95}"

View File

@ -73,6 +73,7 @@ static __forceinline T GetClamped( T src, T min, T max )
}
extern void SysMessage(const char *fmt, ...);
extern void SysMessage(const wchar_t *fmt, ...);
//////////////////////////////////////////////////////////////
// Dev / Debug conditionals --

View File

@ -126,14 +126,28 @@ EXPORT_C_(void) SPU2configure()
EXPORT_C_(void) SPU2about()
{
//InitLibraryName();
//SysMessage( libraryName );
AboutBox();
}
#include "x86emitter/tools.h"
EXPORT_C_(s32) SPU2test()
{
return SndBuffer::Test();
cpudetectInit();
if( !x86caps.hasStreamingSIMDExtensions || !x86caps.hasStreamingSIMD2Extensions )
{
SysMessage( "Your CPU does not support SSE2 instructions.\nThe SPU2-X plugin requires SSE2 to run." );
return -1;
}
if( !SndBuffer::Test() )
{
// TODO : Implement a proper dialog that allows the user to test different audio out drivers.
SysMessage( L"The '%s' driver test failed. Please configure\ndifferent SoundOut module and try again.", mods[OutputModule]->GetIdent() );
return -1;
}
return 0;
}
// --------------------------------------------------------------------------------------

View File

@ -28,7 +28,18 @@ void SysMessage(const char *fmt, ...)
sprintf_s(tmp,fmt,list);
va_end(list);
swprintf_s(wtmp, L"%S", tmp);
MessageBox(0, wtmp, L"SPU2-X System Message", 0);
MessageBox( GetActiveWindow(), wtmp, L"SPU2-X System Message", MB_OK | MB_SETFOREGROUND);
}
void SysMessage(const wchar_t *fmt, ...)
{
va_list list;
wchar_t wtmp[512];
va_start(list,fmt);
swprintf_s(wtmp,fmt,list);
va_end(list);
MessageBox( GetActiveWindow(), wtmp, L"SPU2-X System Message", MB_OK | MB_SETFOREGROUND);
}
//////

View File

@ -18,7 +18,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops;..\..\..\..\common\vsprops\pthreads.vsprops"
UseOfMFC="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
@ -70,7 +70,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib dsound.lib comctl32.lib soundtouch.lib"
AdditionalDependencies="rpcrt4.lib winmm.lib dsound.lib comctl32.lib soundtouch.lib x86emitter.lib utilities.lib"
OutputFile="$(OutDir)\$(ProjectName)-dev.dll"
ModuleDefinitionFile=".\Spu2-X.def"
RandomizedBaseAddress="1"
@ -103,7 +103,7 @@
<Configuration
Name="DebugStrict|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops;..\..\..\..\common\vsprops\pthreads.vsprops"
UseOfMFC="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
@ -150,7 +150,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib dsound.lib comctl32.lib soundtouch.lib"
AdditionalDependencies="rpcrt4.lib winmm.lib dsound.lib comctl32.lib soundtouch.lib x86emitter.lib utilities.lib"
OutputFile="$(OutDir)\$(ProjectName)-dbg.dll"
ModuleDefinitionFile=".\Spu2-X.def"
RandomizedBaseAddress="1"
@ -183,7 +183,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops;..\..\..\..\common\vsprops\pthreads.vsprops"
UseOfMFC="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
@ -233,7 +233,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib dsound.lib comctl32.lib soundtouch.lib"
AdditionalDependencies="rpcrt4.lib winmm.lib dsound.lib comctl32.lib soundtouch.lib x86emitter.lib utilities.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="1"
ModuleDefinitionFile=".\Spu2-X.def"
@ -269,7 +269,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\..\common\vsprops\wxWidgetsGui.vsprops;..\..\..\..\common\vsprops\pthreads.vsprops"
UseOfMFC="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
@ -318,7 +318,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib dsound.lib comctl32.lib soundtouch.lib"
AdditionalDependencies="rpcrt4.lib winmm.lib dsound.lib comctl32.lib soundtouch.lib x86emitter.lib utilities.lib"
OutputFile="$(OutDir)\$(ProjectName)-dbg.dll"
LinkIncremental="2"
ModuleDefinitionFile=".\Spu2-X.def"