comparison src/video/windows/SDL_windowsvideo.c @ 5142:57851a238c8f

Removed more partially functional renderers
author Sam Lantinga <slouken@libsdl.org>
date Mon, 31 Jan 2011 22:53:45 -0800
parents da10636e5eca
children fb424691cfc7
comparison
equal deleted inserted replaced
5141:da10636e5eca 5142:57851a238c8f
28 #include "../SDL_pixels_c.h" 28 #include "../SDL_pixels_c.h"
29 29
30 #include "SDL_windowsvideo.h" 30 #include "SDL_windowsvideo.h"
31 #include "SDL_windowsshape.h" 31 #include "SDL_windowsshape.h"
32 #include "SDL_d3drender.h" 32 #include "SDL_d3drender.h"
33 #include "SDL_gapirender.h"
34 33
35 /* Initialization/Query functions */ 34 /* Initialization/Query functions */
36 static int WIN_VideoInit(_THIS); 35 static int WIN_VideoInit(_THIS);
37 static void WIN_VideoQuit(_THIS); 36 static void WIN_VideoQuit(_THIS);
38 37
53 SDL_UnregisterApp(); 52 SDL_UnregisterApp();
54 #if SDL_VIDEO_RENDER_D3D 53 #if SDL_VIDEO_RENDER_D3D
55 if (data->d3d) { 54 if (data->d3d) {
56 IDirect3D9_Release(data->d3d); 55 IDirect3D9_Release(data->d3d);
57 SDL_UnloadObject(data->d3dDLL); 56 SDL_UnloadObject(data->d3dDLL);
58 }
59 #endif
60 #if SDL_VIDEO_RENDER_DDRAW
61 if (data->ddraw) {
62 data->ddraw->lpVtbl->Release(data->ddraw);
63 SDL_UnloadObject(data->ddrawDLL);
64 } 57 }
65 #endif 58 #endif
66 #ifdef _WIN32_WCE 59 #ifdef _WIN32_WCE
67 if(data->hAygShell) { 60 if(data->hAygShell) {
68 SDL_UnloadObject(data->hAygShell); 61 SDL_UnloadObject(data->hAygShell);
97 SDL_free(device); 90 SDL_free(device);
98 } 91 }
99 return NULL; 92 return NULL;
100 } 93 }
101 device->driverdata = data; 94 device->driverdata = data;
102
103 #if SDL_VIDEO_RENDER_D3D
104 data->d3dDLL = SDL_LoadObject("D3D9.DLL");
105 if (data->d3dDLL) {
106 IDirect3D9 *(WINAPI * D3DCreate) (UINT SDKVersion);
107
108 D3DCreate =
109 (IDirect3D9 * (WINAPI *) (UINT)) SDL_LoadFunction(data->d3dDLL,
110 "Direct3DCreate9");
111 if (D3DCreate) {
112 data->d3d = D3DCreate(D3D_SDK_VERSION);
113 }
114 if (!data->d3d) {
115 SDL_UnloadObject(data->d3dDLL);
116 data->d3dDLL = NULL;
117 }
118 }
119 #endif /* SDL_VIDEO_RENDER_D3D */
120 #if SDL_VIDEO_RENDER_DDRAW
121 data->ddrawDLL = SDL_LoadObject("ddraw.dll");
122 if (data->ddrawDLL) {
123 IDirectDraw *(WINAPI * DDCreate) (GUID FAR * lpGUID,
124 LPDIRECTDRAW FAR * lplpDD,
125 IUnknown FAR * pUnkOuter);
126
127 DDCreate =
128 (IDirectDraw *
129 (WINAPI *) (GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *))
130 SDL_LoadFunction(data->ddrawDLL, "DirectDrawCreate");
131 if (!DDCreate || DDCreate(NULL, &data->ddraw, NULL) != DD_OK) {
132 SDL_UnloadObject(data->ddrawDLL);
133 data->ddrawDLL = NULL;
134 data->ddraw = NULL;
135 }
136 }
137 #endif /* SDL_VIDEO_RENDER_DDRAW */
138 95
139 #ifdef _WIN32_WCE 96 #ifdef _WIN32_WCE
140 data->hAygShell = SDL_LoadObject("\\windows\\aygshell.dll"); 97 data->hAygShell = SDL_LoadObject("\\windows\\aygshell.dll");
141 if(0 == data->hAygShell) 98 if(0 == data->hAygShell)
142 data->hAygShell = SDL_LoadObject("aygshell.dll"); 99 data->hAygShell = SDL_LoadObject("aygshell.dll");
219 } 176 }
220 177
221 #if SDL_VIDEO_RENDER_D3D 178 #if SDL_VIDEO_RENDER_D3D
222 D3D_AddRenderDriver(_this); 179 D3D_AddRenderDriver(_this);
223 #endif 180 #endif
224 #if SDL_VIDEO_RENDER_DDRAW
225 DDRAW_AddRenderDriver(_this);
226 #endif
227 #if SDL_VIDEO_RENDER_GAPI
228 WINCE_AddRenderDriver(_this);
229 #endif
230 181
231 WIN_InitKeyboard(_this); 182 WIN_InitKeyboard(_this);
232 WIN_InitMouse(_this); 183 WIN_InitMouse(_this);
233 184
234 return 0; 185 return 0;