Patch from Ken Rogoway:
authorSam Lantinga <slouken@libsdl.org>
Mon, 14 Feb 2011 00:45:16 -0800
changeset 5295 b88d05603e4b
parent 5294 4801b8bede31
child 5296 48067bfc300c
Patch from Ken Rogoway: Migrate all of the recent changes into the SDL VS2005 project file. Fix missing return value in SDL_pixels.c Fix compile error in testscale.c, variable was incorrectly named. Added VS2005 project file for testscale
VisualC/SDL/SDL_VS2005.vcproj
VisualC/tests/testscale/testscale_VS2005.vcproj
src/video/SDL_pixels.c
test/testscale.c
--- a/VisualC/SDL/SDL_VS2005.vcproj	Sun Feb 13 23:09:18 2011 -0800
+++ b/VisualC/SDL/SDL_VS2005.vcproj	Mon Feb 14 00:45:16 2011 -0800
@@ -29,7 +29,7 @@
 			<Tool
 				Name="VCPreBuildEventTool"
 				Description="Making sure basic SDL headers are in place..."
-				CommandLine="echo Copying SDL_config_windows.h to SDL_config.h...&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)\..\..\include\SDL_config_windows.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION &quot;hg-0:baadf00d&quot; &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY&#x0D;&#x0A;"
+				CommandLine="echo Copying SDL_config_windows.h to SDL_config.h...&#x0D;&#x0A;xcopy /d /q /y &quot;$(ProjectDir)\..\..\include\SDL_config_windows.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION &quot;hg-0:baadf00d&quot; &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY&#x0D;&#x0A;"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -207,7 +207,7 @@
 			<Tool
 				Name="VCPreBuildEventTool"
 				Description="Making sure basic SDL headers are in place..."
-				CommandLine="echo Copying SDL_config_windows.h to SDL_config.h...&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)\..\..\include\SDL_config_windows.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION &quot;hg-0:baadf00d&quot; &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY&#x0D;&#x0A;"
+				CommandLine="echo Copying SDL_config_windows.h to SDL_config.h...&#x0D;&#x0A;xcopy /d /q /y &quot;$(ProjectDir)\..\..\include\SDL_config_windows.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION &quot;hg-0:baadf00d&quot; &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY&#x0D;&#x0A;"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -399,6 +399,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\include\SDL_blendmode.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\SDL_clipboard.h"
 				>
 			</File>
@@ -435,10 +439,22 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\include\SDL_gesture.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\SDL_haptic.h"
 				>
 			</File>
 			<File
+				RelativePath="..\..\include\SDL_hints.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\SDL_input.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\SDL_joystick.h"
 				>
 			</File>
@@ -455,6 +471,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\include\SDL_log.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\SDL_main.h"
 				>
 			</File>
@@ -499,6 +519,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\include\SDL_render.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\SDL_revision.h"
 				>
 			</File>
@@ -531,6 +555,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\include\SDL_touch.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\SDL_types.h"
 				>
 			</File>
@@ -596,7 +624,7 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\mmx.h"
+			RelativePath="..\..\src\render\mmx.h.h"
 			>
 		</File>
 		<File
@@ -632,10 +660,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_alphamult.c"
-			>
-		</File>
-		<File
 			RelativePath="..\..\src\video\SDL_alphamult.h"
 			>
 		</File>
@@ -676,19 +700,27 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_blendfillrect.c"
+			RelativePath="..\..\src\render\software\SDL_blendfillrect.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\src\render\software\SDL_blendfillrect.h"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_blendline.c"
+			RelativePath="..\..\src\render\software\SDL_blendline.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_blendpoint.c"
+			RelativePath="..\..\src\render\software\SDL_blendline.h"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_blendrect.c"
+			RelativePath="..\..\src\render\software\SDL_blendpoint.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\src\render\software\SDL_blendpoint.h"
 			>
 		</File>
 		<File
@@ -764,14 +796,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\windows\SDL_d3drender.c"
-			>
-		</File>
-		<File
-			RelativePath="..\..\src\video\windows\SDL_d3drender.h"
-			>
-		</File>
-		<File
 			RelativePath="..\..\src\audio\windib\SDL_dibaudio.c"
 			>
 		</File>
@@ -788,19 +812,23 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_draw.h"
+			RelativePath="..\..\src\render\software\SDL_draw.h"
+			>
+		</File>
+		<File
+			RelativePath="..\..\src\render\software\SDL_drawline.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_drawline.c"
+			RelativePath="..\..\src\render\software\SDL_drawline.h"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_drawpoint.c"
+			RelativePath="..\..\src\render\software\SDL_drawpoint.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_drawrect.c"
+			RelativePath="..\..\src\render\software\SDL_drawpoint.h"
 			>
 		</File>
 		<File
@@ -852,10 +880,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_gamma.c"
-			>
-		</File>
-		<File
 			RelativePath="..\..\src\events\SDL_gesture.c"
 			>
 		</File>
@@ -880,6 +904,10 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\src\SDL_hints.c"
+			>
+		</File>
+		<File
 			RelativePath="..\..\src\stdlib\SDL_iconv.c"
 			>
 		</File>
@@ -900,6 +928,10 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\src\SDL_log.c"
+			>
+		</File>
+		<File
 			RelativePath="..\..\src\stdlib\SDL_malloc.c"
 			>
 		</File>
@@ -952,11 +984,11 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\dummy\SDL_nullrender.c"
+			RelativePath="..\..\src\video\dummy\SDL_nullframebuffer.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\dummy\SDL_nullrender_c.h"
+			RelativePath="..\..\src\video\dummy\SDL_nullframebuffer_c.h"
 			>
 		</File>
 		<File
@@ -996,19 +1028,23 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_renderer_gl.c"
+			RelativePath="..\..\src\render\SDL_render.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\src\render\direct3d\SDL_render_d3d.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_renderer_gl.h"
+			RelativePath="..\..\src\render\opengl\SDL_render_gl.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_renderer_sw.c"
+			RelativePath="..\..\src\render\software\SDL_render_sw.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_renderer_sw.h"
+			RelativePath="..\..\src\render\software\SDL_render_sw_c.h"
 			>
 		</File>
 		<File
@@ -1024,6 +1060,14 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\src\render\opengl\SDL_shaders_gl.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\src\render\opengl\SDL_shaders_gl.h"
+			>
+		</File>
+		<File
 			RelativePath="..\..\src\video\SDL_shape.c"
 			>
 		</File>
@@ -1084,6 +1128,10 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\src\render\SDL_sysrender.h"
+			>
+		</File>
+		<File
 			RelativePath="..\..\src\thread\windows\SDL_syssem.c"
 			>
 		</File>
@@ -1184,11 +1232,11 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
+			RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
+			RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.h"
 			>
 		</File>
 		<File
@@ -1248,15 +1296,15 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_yuv_mmx.c"
+			RelativePath="..\..\src\render\SDL_yuv_mmx.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_yuv_sw.c"
+			RelativePath="..\..\src\render\SDL_yuv_sw.c"
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_yuv_sw_c.h"
+			RelativePath="..\..\src\render\SDL_yuv_sw_c.h"
 			>
 		</File>
 		<File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VisualC/tests/testscale/testscale_VS2005.vcproj	Mon Feb 14 00:45:16 2011 -0800
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="testscale"
+	ProjectGUID="{845BAD86-9FBE-4052-ADEE-CE84EA3978D0}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<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/testscale.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\include"
+				PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\Debug/testscale.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				OutputFile=".\Debug/testscale.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Debug/testscale.pdb"
+				SubSystem="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<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/testscale.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\include"
+				PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\Release/testscale.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				OutputFile=".\Release/testscale.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=".\Release/testscale.pdb"
+				SubSystem="2"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\test\common.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\Sdl\Debug\SDL.lib"
+			>
+		</File>
+		<File
+			RelativePath="..\..\SDLmain\Debug\SDLmain.lib"
+			>
+		</File>
+		<File
+			RelativePath="..\..\..\Test\testscale.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- a/src/video/SDL_pixels.c	Sun Feb 13 23:09:18 2011 -0800
+++ b/src/video/SDL_pixels.c	Mon Feb 14 00:45:16 2011 -0800
@@ -549,6 +549,8 @@
     if (format->palette) {
         ++format->palette->refcount;
     }
+
+    return 0;
 }
 
 int
--- a/test/testscale.c	Sun Feb 13 23:09:18 2011 -0800
+++ b/test/testscale.c	Mon Feb 14 00:45:16 2011 -0800
@@ -83,7 +83,6 @@
 Draw(DrawState *s)
 {
     int w, h;
-    SDL_Rect rect;
 
     SDL_GetWindowSize(s->window, &w, &h);
 
@@ -177,7 +176,7 @@
         printf("%2.2f frames per second\n", fps);
     }
 
-    SDL_stack_free(drawstate);
+    SDL_stack_free(drawstates);
 
     quit(0);
     return 0;