Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed compiling on Windows CE
  • Loading branch information
slouken committed Feb 4, 2011
1 parent 04a9aac commit 2d3f29e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 62 deletions.
108 changes: 46 additions & 62 deletions VisualCE/SDL/SDL.vcproj
Expand Up @@ -737,10 +737,6 @@
RelativePath="..\..\src\SDL.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_alphamult.c"
>
</File>
<File
RelativePath="..\..\src\SDL_assert.c"
>
Expand All @@ -766,19 +762,15 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_blendfillrect.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blendline.c"
RelativePath="..\..\src\render\software\SDL_blendfillrect.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blendpoint.c"
RelativePath="..\..\src\render\software\SDL_blendline.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blendrect.c"
RelativePath="..\..\src\render\software\SDL_blendpoint.c"
>
</File>
<File
Expand Down Expand Up @@ -817,10 +809,6 @@
RelativePath="..\..\src\video\SDL_bmp.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_ceddrawrender.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_clipboard.c"
>
Expand All @@ -837,10 +825,6 @@
RelativePath="..\..\src\cpuinfo\SDL_cpuinfo.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_d3drender.c"
>
</File>
<File
RelativePath="..\..\src\audio\windib\SDL_dibaudio.c"
>
Expand All @@ -850,15 +834,11 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_drawline.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_drawpoint.c"
RelativePath="..\..\src\render\software\SDL_drawline.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_drawrect.c"
RelativePath="..\..\src\render\software\SDL_drawpoint.c"
>
</File>
<File
Expand All @@ -885,14 +865,6 @@
RelativePath="..\..\src\video\SDL_gamma.c"
>
</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"
>
Expand Down Expand Up @@ -934,7 +906,7 @@
>
</File>
<File
RelativePath="..\..\src\video\dummy\SDL_nullrender.c"
RelativePath="..\..\src\video\dummy\SDL_nullframebuffer.c"
>
</File>
<File
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1065,6 +1041,10 @@
RelativePath="..\..\src\video\windows\SDL_windowsevents.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1131,7 +1111,7 @@
>
</File>
<File
RelativePath="..\..\src\video\mmx.h"
RelativePath="..\..\src\render\mmx.h"
>
</File>
<File
Expand All @@ -1150,10 +1130,6 @@
RelativePath="..\..\src\events\scancodes_xfree86.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_alphamult.h"
>
</File>
<File
RelativePath="..\..\src\SDL_assert_c.h"
>
Expand All @@ -1171,71 +1147,71 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_blit.h"
RelativePath="..\..\src\render\software\SDL_blendfillrect.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blit_auto.h"
RelativePath="..\..\src\render\software\SDL_blendline.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blit_copy.h"
RelativePath="..\..\src\render\software\SDL_blendpoint.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blit_slow.h"
RelativePath="..\..\src\video\SDL_blit.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_ceddrawrender.h"
RelativePath="..\..\src\video\SDL_blit_auto.h"
>
</File>
<File
RelativePath="..\..\src\events\SDL_clipboardevents_c.h"
RelativePath="..\..\src\video\SDL_blit_copy.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_d3drender.h"
RelativePath="..\..\src\video\SDL_blit_slow.h"
>
</File>
<File
RelativePath="..\..\src\audio\windib\SDL_dibaudio.h"
RelativePath="..\..\src\events\SDL_clipboardevents_c.h"
>
</File>
<File
RelativePath="..\..\src\audio\disk\SDL_diskaudio.h"
RelativePath="..\..\src\audio\windib\SDL_dibaudio.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_draw.h"
RelativePath="..\..\src\audio\disk\SDL_diskaudio.h"
>
</File>
<File
RelativePath="..\..\src\audio\dummy\SDL_dummyaudio.h"
RelativePath="..\..\src\render\software\SDL_draw.h"
>
</File>
<File
RelativePath="..\..\src\SDL_error_c.h"
RelativePath="..\..\src\render\software\SDL_drawline.h"
>
</File>
<File
RelativePath="..\..\src\events\SDL_events_c.h"
RelativePath="..\..\src\render\software\SDL_drawpoint.h"
>
</File>
<File
RelativePath="..\..\src\SDL_fatal.h"
RelativePath="..\..\src\audio\dummy\SDL_dummyaudio.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_gapirender.h"
RelativePath="..\..\src\SDL_error_c.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_gapirender_c.h"
RelativePath="..\..\src\events\SDL_events_c.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_gdirender.h"
RelativePath="..\..\src\SDL_fatal.h"
>
</File>
<File
Expand Down Expand Up @@ -1279,7 +1255,7 @@
>
</File>
<File
RelativePath="..\..\src\video\dummy\SDL_nullrender_c.h"
RelativePath="..\..\src\video\dummy\SDL_nullframebuffer_c.h"
>
</File>
<File
Expand All @@ -1295,7 +1271,7 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_renderer_sw.h"
RelativePath="..\..\src\render\software\SDL_renderer_sw_c.h"
>
</File>
<File
Expand All @@ -1322,6 +1298,10 @@
RelativePath="..\..\src\joystick\SDL_sysjoystick.h"
>
</File>
<File
RelativePath="..\..\src\render\SDL_sysrender.h"
>
</File>
<File
RelativePath="..\..\src\thread\SDL_systhread.h"
>
Expand Down Expand Up @@ -1374,6 +1354,10 @@
RelativePath="..\..\src\video\windows\SDL_windowsevents.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
>
Expand Down Expand Up @@ -1407,7 +1391,7 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_yuv_sw_c.h"
RelativePath="..\..\src\render\SDL_yuv_sw_c.h"
>
</File>
<File
Expand Down
2 changes: 2 additions & 0 deletions src/video/windows/SDL_windowsframebuffer.c
Expand Up @@ -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)
{
Expand Down
30 changes: 30 additions & 0 deletions src/video/windows/SDL_windowswindow.c
Expand Up @@ -452,7 +452,37 @@ WIN_SetWindowSize(_THIS, SDL_Window * window)
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)
Expand Down

0 comments on commit 2d3f29e

Please sign in to comment.