changeset 5181:4191af605cb0

Fixed compiling on Windows CE
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Feb 2011 13:58:29 -0800
parents 019942602496
children f652a24a2e99
files VisualCE/SDL/SDL.vcproj src/video/windows/SDL_windowsframebuffer.c src/video/windows/SDL_windowswindow.c
diffstat 3 files changed, 82 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/VisualCE/SDL/SDL.vcproj	Fri Feb 04 13:57:55 2011 -0800
+++ b/VisualCE/SDL/SDL.vcproj	Fri Feb 04 13:58:29 2011 -0800
@@ -738,10 +738,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_alphamult.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\SDL_assert.c"
 				>
 			</File>
@@ -766,19 +762,15 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_blendfillrect.c"
+				RelativePath="..\..\src\render\software\SDL_blendfillrect.c"
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_blendline.c"
+				RelativePath="..\..\src\render\software\SDL_blendline.c"
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_blendpoint.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\video\SDL_blendrect.c"
+				RelativePath="..\..\src\render\software\SDL_blendpoint.c"
 				>
 			</File>
 			<File
@@ -818,10 +810,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_ceddrawrender.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\video\SDL_clipboard.c"
 				>
 			</File>
@@ -838,10 +826,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_d3drender.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\audio\windib\SDL_dibaudio.c"
 				>
 			</File>
@@ -850,15 +834,11 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_drawline.c"
+				RelativePath="..\..\src\render\software\SDL_drawline.c"
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_drawpoint.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\video\SDL_drawrect.c"
+				RelativePath="..\..\src\render\software\SDL_drawpoint.c"
 				>
 			</File>
 			<File
@@ -886,14 +866,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_gapirender.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\video\windows\SDL_gdirender.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\events\SDL_gesture.c"
 				>
 			</File>
@@ -934,7 +906,7 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\dummy\SDL_nullrender.c"
+				RelativePath="..\..\src\video\dummy\SDL_nullframebuffer.c"
 				>
 			</File>
 			<File
@@ -962,7 +934,11 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_renderer_sw.c"
+				RelativePath="..\..\src\render\SDL_render.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\render\software\SDL_renderer_sw.c"
 				>
 			</File>
 			<File
@@ -1066,6 +1042,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
 				>
 			</File>
@@ -1098,11 +1078,11 @@
 				>
 			</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
@@ -1131,7 +1111,7 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\mmx.h"
+				RelativePath="..\..\src\render\mmx.h"
 				>
 			</File>
 			<File
@@ -1151,10 +1131,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_alphamult.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\SDL_assert_c.h"
 				>
 			</File>
@@ -1171,6 +1147,18 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\render\software\SDL_blendfillrect.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\render\software\SDL_blendline.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\render\software\SDL_blendpoint.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\video\SDL_blit.h"
 				>
 			</File>
@@ -1187,18 +1175,10 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_ceddrawrender.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\events\SDL_clipboardevents_c.h"
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_d3drender.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\audio\windib\SDL_dibaudio.h"
 				>
 			</File>
@@ -1207,7 +1187,15 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_draw.h"
+				RelativePath="..\..\src\render\software\SDL_draw.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\render\software\SDL_drawline.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\render\software\SDL_drawpoint.h"
 				>
 			</File>
 			<File
@@ -1227,18 +1215,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\windows\SDL_gapirender.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\video\windows\SDL_gapirender_c.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\video\windows\SDL_gdirender.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\src\events\SDL_gesture_c.h"
 				>
 			</File>
@@ -1279,7 +1255,7 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\dummy\SDL_nullrender_c.h"
+				RelativePath="..\..\src\video\dummy\SDL_nullframebuffer_c.h"
 				>
 			</File>
 			<File
@@ -1295,7 +1271,7 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_renderer_sw.h"
+				RelativePath="..\..\src\render\software\SDL_renderer_sw_c.h"
 				>
 			</File>
 			<File
@@ -1323,6 +1299,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\render\SDL_sysrender.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\thread\SDL_systhread.h"
 				>
 			</File>
@@ -1375,6 +1355,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
 				>
 			</File>
@@ -1407,7 +1391,7 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\video\SDL_yuv_sw_c.h"
+				RelativePath="..\..\src\render\SDL_yuv_sw_c.h"
 				>
 			</File>
 			<File
--- a/src/video/windows/SDL_windowsframebuffer.c	Fri Feb 04 13:57:55 2011 -0800
+++ b/src/video/windows/SDL_windowsframebuffer.c	Fri Feb 04 13:58:29 2011 -0800
@@ -23,7 +23,9 @@
 
 #include "SDL_windowsvideo.h"
 
+#ifndef _WIN32_WCE
 #define HAVE_GETDIBITS
+#endif
 
 int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
 {
--- a/src/video/windows/SDL_windowswindow.c	Fri Feb 04 13:57:55 2011 -0800
+++ b/src/video/windows/SDL_windowswindow.c	Fri Feb 04 13:58:29 2011 -0800
@@ -452,7 +452,37 @@
     h = (rect.bottom - rect.top);
 
     SetWindowPos(hwnd, top, 0, 0, w, h, (SWP_NOCOPYBITS | SWP_NOMOVE));
+}
+
+#ifdef _WIN32_WCE
+void WINCE_ShowWindow(_THIS, SDL_Window* window, int visible)
+{
+    SDL_WindowData* windowdata = (SDL_WindowData*) window->driverdata;
+    SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
+
+    if(visible) {
+        if(window->flags & SDL_WINDOW_FULLSCREEN) {
+            if(videodata->SHFullScreen)
+                videodata->SHFullScreen(windowdata->hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
+
+            ShowWindow(FindWindow(TEXT("HHTaskBar"), NULL), SW_HIDE);
+        }
+
+        ShowWindow(windowdata->hwnd, SW_SHOW);
+        SetForegroundWindow(windowdata->hwnd);
+    } else {
+        ShowWindow(windowdata->hwnd, SW_HIDE);
+
+        if(window->flags & SDL_WINDOW_FULLSCREEN) {
+            if(videodata->SHFullScreen)
+                videodata->SHFullScreen(windowdata->hwnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
+
+            ShowWindow(FindWindow(TEXT("HHTaskBar"), NULL), SW_SHOW);
+
+        }
+    }
 }
+#endif /* _WIN32_WCE */
 
 void
 WIN_ShowWindow(_THIS, SDL_Window * window)