From 69af9a3f38fd8ac376ba6899958d4002406c54c9 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 14 Feb 2011 00:45:16 -0800 Subject: [PATCH] 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 | 124 +++++++--- .../tests/testscale/testscale_VS2005.vcproj | 221 ++++++++++++++++++ src/video/SDL_pixels.c | 2 + test/testscale.c | 3 +- 4 files changed, 310 insertions(+), 40 deletions(-) create mode 100644 VisualC/tests/testscale/testscale_VS2005.vcproj diff --git a/VisualC/SDL/SDL_VS2005.vcproj b/VisualC/SDL/SDL_VS2005.vcproj index 844dedeb3..75031a04a 100644 --- a/VisualC/SDL/SDL_VS2005.vcproj +++ b/VisualC/SDL/SDL_VS2005.vcproj @@ -29,7 +29,7 @@ + + @@ -434,10 +438,22 @@ RelativePath="..\..\include\SDL_events.h" > + + + + + + @@ -454,6 +470,10 @@ RelativePath="..\..\include\SDL_loadso.h" > + + @@ -498,6 +518,10 @@ RelativePath="..\..\include\SDL_rect.h" > + + @@ -530,6 +554,10 @@ RelativePath="..\..\include\SDL_timer.h" > + + @@ -596,7 +624,7 @@ > - - @@ -676,19 +700,27 @@ > + + + + - - - - @@ -788,19 +812,23 @@ > + + - - @@ -879,6 +903,10 @@ RelativePath="..\..\src\haptic\SDL_haptic.c" > + + @@ -899,6 +927,10 @@ RelativePath="..\..\src\events\SDL_keyboard_c.h" > + + @@ -952,11 +984,11 @@ > + + + + + + @@ -1083,6 +1127,10 @@ RelativePath="..\..\src\power\windows\SDL_syspower.c" > + + @@ -1184,11 +1232,11 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index e6b920ea6..78c8eb140 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -549,6 +549,8 @@ SDL_SetPixelFormatPalette(SDL_PixelFormat * format, SDL_Palette *palette) if (format->palette) { ++format->palette->refcount; } + + return 0; } int diff --git a/test/testscale.c b/test/testscale.c index 39c8d2297..1a713c2a6 100644 --- a/test/testscale.c +++ b/test/testscale.c @@ -83,7 +83,6 @@ void Draw(DrawState *s) { int w, h; - SDL_Rect rect; SDL_GetWindowSize(s->window, &w, &h); @@ -177,7 +176,7 @@ main(int argc, char *argv[]) printf("%2.2f frames per second\n", fps); } - SDL_stack_free(drawstate); + SDL_stack_free(drawstates); quit(0); return 0;