From da9cfbe200f7aa0bb472d72fb6a92b48bcd93336 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 17 Apr 2009 02:32:43 +0000 Subject: [PATCH] win32: continue to overhaul vs project organization. You will need to delete your sln files as I am now checking these in. Additionally, every build is now SSE2. If you want a non-sse2 build you better define NOSSE2 and turn off the codegen option. --- desmume/src/matrix.cpp | 2 +- desmume/src/matrix.h | 2 +- desmume/src/texcache.h | 2 +- desmume/src/types.h | 4 ++-- desmume/src/windows/DeSmuME_2005.sln | 20 +++++++++++++++++++ desmume/src/windows/DeSmuME_2005.vcproj | 13 +++--------- desmume/src/windows/DeSmuME_2008.sln | 20 +++++++++++++++++++ desmume/src/windows/DeSmuME_2008.vcproj | 11 ++-------- desmume/src/windows/console.cpp | 7 ++++++- desmume/src/windows/console.h | 8 +++----- .../src/windows/defaultconfig/userconfig.h | 4 ++-- 11 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 desmume/src/windows/DeSmuME_2005.sln create mode 100644 desmume/src/windows/DeSmuME_2008.sln diff --git a/desmume/src/matrix.cpp b/desmume/src/matrix.cpp index 0e9f4f25b..2f9cf21d0 100644 --- a/desmume/src/matrix.cpp +++ b/desmume/src/matrix.cpp @@ -33,7 +33,7 @@ void MatrixInit (float *matrix) matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.f; } -#ifndef SSE2 +#ifdef NOSSE2 void MATRIXFASTCALL MatrixMultVec4x4 (const float *matrix, float *vecPtr) { float x = vecPtr[0]; diff --git a/desmume/src/matrix.h b/desmume/src/matrix.h index 54b7143d9..bbb3ee6f8 100644 --- a/desmume/src/matrix.h +++ b/desmume/src/matrix.h @@ -44,7 +44,7 @@ void MatrixInit (float *matrix); //In order to conditionally use these asm optimized functions in visual studio //without having to make new build types to exclude the assembly files. //a bit sloppy, but there aint much to it -#ifdef SSE2 +#ifndef NOSSE2 #define SSE2_FUNC(X) _sse2_##X #define MatrixMultVec4x4 _sse2_MatrixMultVec4x4 #define MatrixMultVec3x3 _sse2_MatrixMultVec3x3 diff --git a/desmume/src/texcache.h b/desmume/src/texcache.h index f018667ef..bc2c329d0 100644 --- a/desmume/src/texcache.h +++ b/desmume/src/texcache.h @@ -4,7 +4,7 @@ #include "common.h" #define MAX_TEXTURE 500 -#ifdef SSE2 +#ifndef NOSSE2 struct ALIGN(16) TextureCache #else struct ALIGN(8) TextureCache diff --git a/desmume/src/types.h b/desmume/src/types.h index 3f193ab30..5615c3e4c 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -37,8 +37,8 @@ #endif #endif -#ifdef SSE2 -#define DESMUME_CPUEXT_STRING " SSE2" +#ifdef NOSSE2 +#define DESMUME_CPUEXT_STRING " NOSSE2" #else #define DESMUME_CPUEXT_STRING "" #endif diff --git a/desmume/src/windows/DeSmuME_2005.sln b/desmume/src/windows/DeSmuME_2005.sln new file mode 100644 index 000000000..c1443642b --- /dev/null +++ b/desmume/src/windows/DeSmuME_2005.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeSmuME_VS2005", "DeSmuME_2005.vcproj", "{9F5F72A1-D3A5-4918-B460-E076B16D10A9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Debug|Win32.Build.0 = Debug|Win32 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|Win32.ActiveCfg = Release|Win32 + {9F5F72A1-D3A5-4918-B460-E076B16D10A9}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/desmume/src/windows/DeSmuME_2005.vcproj b/desmume/src/windows/DeSmuME_2005.vcproj index 5491fa8c3..f8e22d599 100644 --- a/desmume/src/windows/DeSmuME_2005.vcproj +++ b/desmume/src/windows/DeSmuME_2005.vcproj @@ -51,10 +51,10 @@ EnableFiberSafeOptimizations="false" WholeProgramOptimization="false" AdditionalIncludeDirectories=".;..;.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig" - PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;SPU_INTERPOLATE;HAVE_LIBZ;HAVE_LIBZZIP;NOMINMAX;DEBUG;EXPERIMENTAL_WIFI" + PreprocessorDefinitions="DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;SPU_INTERPOLATE;HAVE_LIBZ;HAVE_LIBZZIP;NOMINMAX;DEBUG;EXPERIMENTAL_WIFI" ExceptionHandling="1" BufferSecurityCheck="false" - EnableEnhancedInstructionSet="0" + EnableEnhancedInstructionSet="2" FloatingPointModel="2" WarningLevel="1" DebugInformationFormat="4" @@ -168,7 +168,7 @@ - - - - - - #include "debug.h" -void OpenConsole(); -void CloseConsole(); - #else -#define OpenConsole() -#define CloseConsole() #define pringlog(...) #endif +void OpenConsole(); +void CloseConsole(); + #endif \ No newline at end of file diff --git a/desmume/src/windows/defaultconfig/userconfig.h b/desmume/src/windows/defaultconfig/userconfig.h index b87faebb4..9ce974c00 100644 --- a/desmume/src/windows/defaultconfig/userconfig.h +++ b/desmume/src/windows/defaultconfig/userconfig.h @@ -5,8 +5,8 @@ //to customize your build, place a customized copy in the userconfig directory //(alongside this defaultconfig directory) -//#define SSE2 -//#define DEVELOPER +//#define NOSSE2 //disables SSE2 optimizations (better change it in the vc++ codegen options too) +//#define DEVELOPER //enables dev+ features #endif //_USERCONFIG_H