changeset 5255:f908e06b3c96

Fixed compiling on Windows
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Feb 2011 10:13:30 -0800
parents 7a963be087ef
children 1b0de3574c58
files VisualC/SDL/SDL_VS2008.vcproj VisualC/SDL/SDL_VS2010.vcxproj VisualCE/SDL/SDL.vcproj src/SDL_compat.c src/video/SDL_video.c src/video/windows/SDL_windowsclipboard.c src/video/windows/SDL_windowsmodes.c
diffstat 7 files changed, 6 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/VisualC/SDL/SDL_VS2008.vcproj	Fri Feb 11 00:25:44 2011 -0800
+++ b/VisualC/SDL/SDL_VS2008.vcproj	Fri Feb 11 10:13:30 2011 -0800
@@ -867,10 +867,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\SDL_gamma.c"
-			>
-		</File>
-		<File
 			RelativePath="..\..\src\events\SDL_gesture.c"
 			>
 		</File>
@@ -1235,14 +1231,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
-			>
-		</File>
-		<File
-			RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
-			>
-		</File>
-		<File
 			RelativePath="..\..\src\video\windows\SDL_windowskeyboard.c"
 			>
 		</File>
--- a/VisualC/SDL/SDL_VS2010.vcxproj	Fri Feb 11 00:25:44 2011 -0800
+++ b/VisualC/SDL/SDL_VS2010.vcxproj	Fri Feb 11 10:13:30 2011 -0800
@@ -341,7 +341,6 @@
     <ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
     <ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
     <ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
-    <ClInclude Include="..\..\src\video\windows\SDL_windowsgamma.h" />
     <ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
     <ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
     <ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
@@ -417,7 +416,6 @@
     <ClCompile Include="..\..\src\events\SDL_events.c" />
     <ClCompile Include="..\..\src\SDL_fatal.c" />
     <ClCompile Include="..\..\src\video\SDL_fillrect.c" />
-    <ClCompile Include="..\..\src\video\SDL_gamma.c" />
     <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
     <ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
     <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
@@ -457,7 +455,6 @@
     <ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
     <ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
     <ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
-    <ClCompile Include="..\..\src\video\windows\SDL_windowsgamma.c" />
     <ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
     <ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
     <ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
--- a/VisualCE/SDL/SDL.vcproj	Fri Feb 11 00:25:44 2011 -0800
+++ b/VisualCE/SDL/SDL.vcproj	Fri Feb 11 10:13:30 2011 -0800
@@ -862,10 +862,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_gamma.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\events\SDL_gesture.c"
 				>
 			</File>
@@ -1054,10 +1050,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\video\windows\SDL_windowskeyboard.c"
 				>
 			</File>
@@ -1399,10 +1391,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\video\windows\SDL_windowskeyboard.h"
 				>
 			</File>
--- a/src/SDL_compat.c	Fri Feb 11 00:25:44 2011 -0800
+++ b/src/SDL_compat.c	Fri Feb 11 10:13:30 2011 -0800
@@ -79,7 +79,7 @@
         variable = SDL_getenv("SDL_VIDEO_FULLSCREEN_HEAD");
     }
     if ( variable ) {
-        SDL_atoi(variable);
+        return SDL_atoi(variable);
     } else {
         return 0;
     }
--- a/src/video/SDL_video.c	Fri Feb 11 00:25:44 2011 -0800
+++ b/src/video/SDL_video.c	Fri Feb 11 10:13:30 2011 -0800
@@ -1004,7 +1004,6 @@
 SDL_GetWindowPixelFormat(SDL_Window * window)
 {
     SDL_VideoDisplay *display;
-    SDL_DisplayMode *displayMode;
 
     CHECK_WINDOW_MAGIC(window, SDL_PIXELFORMAT_UNKNOWN);
 
@@ -1097,7 +1096,6 @@
                                   SDL_WINDOW_BORDERLESS |
                                   SDL_WINDOW_RESIZABLE |
                                   SDL_WINDOW_INPUT_GRABBED);
-    SDL_VideoDisplay *display;
     SDL_Window *window;
 
     if (!_this) {
@@ -1269,7 +1267,6 @@
 SDL_GetWindowFromID(Uint32 id)
 {
     SDL_Window *window;
-    int i;
 
     if (!_this) {
         return NULL;
--- a/src/video/windows/SDL_windowsclipboard.c	Fri Feb 11 00:25:44 2011 -0800
+++ b/src/video/windows/SDL_windowsclipboard.c	Fri Feb 11 10:13:30 2011 -0800
@@ -37,15 +37,11 @@
 static HWND
 GetWindowHandle(_THIS)
 {
-    SDL_VideoDisplay *display;
     SDL_Window *window;
 
-    display = _this->displays;
-    if (display) {
-        window = display->windows;
-        if (window) {
-            return ((SDL_WindowData *) window->driverdata)->hwnd;
-        }
+    window = _this->windows;
+    if (window) {
+        return ((SDL_WindowData *) window->driverdata)->hwnd;
     }
     return NULL;
 }
--- a/src/video/windows/SDL_windowsmodes.c	Fri Feb 11 00:25:44 2011 -0800
+++ b/src/video/windows/SDL_windowsmodes.c	Fri Feb 11 10:13:30 2011 -0800
@@ -217,8 +217,8 @@
     // WINCE: DEVMODE.dmPosition not found, or may be mingw32ce bug
     rect->x = 0;
     rect->y = 0;
-    rect->w = display->windows->w;
-    rect->h = display->windows->h;
+    rect->w = _this->windows->w;
+    rect->h = _this->windows->h;
 #else
     rect->x = (int)data->DeviceMode.dmPosition.x;
     rect->y = (int)data->DeviceMode.dmPosition.y;