comparison src/video/windows/SDL_windowsvideo.c @ 5157:fb424691cfc7

Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 02 Feb 2011 14:34:54 -0800
parents 57851a238c8f
children 9b2e99ebd099
comparison
equal deleted inserted replaced
5156:3e4086b3bcd2 5157:fb424691cfc7
27 #include "../SDL_sysvideo.h" 27 #include "../SDL_sysvideo.h"
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"
33 32
34 /* Initialization/Query functions */ 33 /* Initialization/Query functions */
35 static int WIN_VideoInit(_THIS); 34 static int WIN_VideoInit(_THIS);
36 static void WIN_VideoQuit(_THIS); 35 static void WIN_VideoQuit(_THIS);
37 36
48 WIN_DeleteDevice(SDL_VideoDevice * device) 47 WIN_DeleteDevice(SDL_VideoDevice * device)
49 { 48 {
50 SDL_VideoData *data = (SDL_VideoData *) device->driverdata; 49 SDL_VideoData *data = (SDL_VideoData *) device->driverdata;
51 50
52 SDL_UnregisterApp(); 51 SDL_UnregisterApp();
53 #if SDL_VIDEO_RENDER_D3D
54 if (data->d3d) {
55 IDirect3D9_Release(data->d3d);
56 SDL_UnloadObject(data->d3dDLL);
57 }
58 #endif
59 #ifdef _WIN32_WCE 52 #ifdef _WIN32_WCE
60 if(data->hAygShell) { 53 if(data->hAygShell) {
61 SDL_UnloadObject(data->hAygShell); 54 SDL_UnloadObject(data->hAygShell);
62 } 55 }
63 #endif 56 #endif
173 { 166 {
174 if (WIN_InitModes(_this) < 0) { 167 if (WIN_InitModes(_this) < 0) {
175 return -1; 168 return -1;
176 } 169 }
177 170
178 #if SDL_VIDEO_RENDER_D3D
179 D3D_AddRenderDriver(_this);
180 #endif
181
182 WIN_InitKeyboard(_this); 171 WIN_InitKeyboard(_this);
183 WIN_InitMouse(_this); 172 WIN_InitMouse(_this);
184 173
185 return 0; 174 return 0;
186 } 175 }