author | Sam Lantinga <slouken@libsdl.org> |
Sat, 08 Jul 2006 18:06:02 +0000 | |
branch | SDL-1.3 |
changeset 1730 | e70477157db9 |
parent 1725 | 98a3207ddde8 |
child 1733 | 0b1070f2f94d |
permissions | -rw-r--r-- |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 |
/* |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 |
SDL - Simple DirectMedia Layer |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 |
Copyright (C) 1997-2006 Sam Lantinga |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 |
This library is free software; you can redistribute it and/or |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 |
modify it under the terms of the GNU Lesser General Public |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 |
License as published by the Free Software Foundation; either |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 |
version 2.1 of the License, or (at your option) any later version. |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 |
This library is distributed in the hope that it will be useful, |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 |
Lesser General Public License for more details. |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 |
You should have received a copy of the GNU Lesser General Public |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 |
License along with this library; if not, write to the Free Software |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 |
Sam Lantinga |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 |
slouken@libsdl.org |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 |
*/ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
#include "SDL_config.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 |
|
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
24 |
#include "SDL_main.h" |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
#include "SDL_video.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 |
#include "SDL_mouse.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 |
#include "../SDL_sysvideo.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
#include "../SDL_pixels_c.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 |
#include "SDL_win32video.h" |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
31 |
#include "SDL_d3drender.h" |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
32 |
#include "SDL_gdirender.h" |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 |
/* Initialization/Query functions */ |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
35 |
static int WIN_VideoInit(_THIS); |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
36 |
static void WIN_VideoQuit(_THIS); |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 |
/* WIN32 driver bootstrap functions */ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 |
static int |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
41 |
WIN_Available(void) |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 |
{ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 |
return (1); |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
} |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 |
static void |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
47 |
WIN_DeleteDevice(SDL_VideoDevice * device) |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 |
{ |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
49 |
SDL_VideoData *data = (SDL_VideoData *) device->driverdata; |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
50 |
|
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
51 |
SDL_UnregisterApp(); |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
52 |
#if SDL_VIDEO_RENDER_D3D |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
53 |
if (data->d3d) { |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
54 |
IDirect3D9_Release(data->d3d); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
55 |
FreeLibrary(data->d3dDLL); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
56 |
} |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
57 |
#endif |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
58 |
SDL_free(device->driverdata); |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 |
SDL_free(device); |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 |
} |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 |
static SDL_VideoDevice * |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
63 |
WIN_CreateDevice(int devindex) |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 |
{ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 |
SDL_VideoDevice *device; |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
66 |
SDL_VideoData *data; |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 |
|
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
68 |
SDL_RegisterApp(NULL, 0, NULL); |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
69 |
|
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 |
/* Initialize all variables that we clean on shutdown */ |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
71 |
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 |
if (device) { |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
73 |
data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 |
} |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
75 |
if (!device || !data) { |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
76 |
SDL_OutOfMemory(); |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
77 |
if (device) { |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
78 |
SDL_free(device); |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
79 |
} |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
80 |
return NULL; |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 |
} |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
82 |
device->driverdata = data; |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
83 |
|
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
84 |
#if SDL_VIDEO_RENDER_D3D |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
85 |
data->d3dDLL = LoadLibrary(TEXT("D3D9.DLL")); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
86 |
if (data->d3dDLL) { |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
87 |
IDirect3D9 *WINAPI(*D3DCreate) (UINT SDKVersion); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
88 |
|
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
89 |
D3DCreate = |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
90 |
(IDirect3D9 * WINAPI(*)(UINT)) GetProcAddress(data->d3dDLL, |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
91 |
"Direct3DCreate9"); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
92 |
if (D3DCreate) { |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
93 |
data->d3d = D3DCreate(D3D_SDK_VERSION); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
94 |
} |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
95 |
if (!data->d3d) { |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
96 |
FreeLibrary(data->d3dDLL); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
97 |
data->d3dDLL = NULL; |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
98 |
} |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
99 |
} |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
100 |
#endif /* SDL_VIDEO_RENDER_D3D */ |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
102 |
/* Set the function pointers */ |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
103 |
device->VideoInit = WIN_VideoInit; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
104 |
device->SetDisplayMode = WIN_SetDisplayMode; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
105 |
device->VideoQuit = WIN_VideoQuit; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
106 |
device->PumpEvents = WIN_PumpEvents; |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 |
#undef CreateWindow |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
109 |
device->CreateWindow = WIN_CreateWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
110 |
device->CreateWindowFrom = WIN_CreateWindowFrom; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
111 |
device->SetWindowTitle = WIN_SetWindowTitle; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
112 |
device->SetWindowPosition = WIN_SetWindowPosition; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
113 |
device->SetWindowSize = WIN_SetWindowSize; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
114 |
device->ShowWindow = WIN_ShowWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
115 |
device->HideWindow = WIN_HideWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
116 |
device->RaiseWindow = WIN_RaiseWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
117 |
device->MaximizeWindow = WIN_MaximizeWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
118 |
device->MinimizeWindow = WIN_MinimizeWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
119 |
device->RestoreWindow = WIN_RestoreWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
120 |
device->SetWindowGrab = WIN_SetWindowGrab; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
121 |
device->DestroyWindow = WIN_DestroyWindow; |
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
122 |
device->GetWindowWMInfo = WIN_GetWindowWMInfo; |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 |
|
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
124 |
device->free = WIN_DeleteDevice; |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 |
return device; |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 |
} |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 |
VideoBootStrap WIN32_bootstrap = { |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
130 |
"win32", "SDL Win32/64 video driver", |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
131 |
WIN_Available, WIN_CreateDevice |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
132 |
}; |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
133 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
134 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
135 |
int |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
136 |
WIN_VideoInit(_THIS) |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
137 |
{ |
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
138 |
WIN_InitModes(_this); |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
139 |
|
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
140 |
#if SDL_VIDEO_RENDER_GDI |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
141 |
GDI_AddRenderDriver(_this); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
142 |
#endif |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
143 |
#if SDL_VIDEO_RENDER_D3D |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
144 |
D3D_AddRenderDriver(_this); |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
145 |
#endif |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
146 |
|
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
147 |
WIN_InitKeyboard(_this); |
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
148 |
WIN_InitMouse(_this); |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
149 |
|
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
150 |
return 0; |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
151 |
} |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
152 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
153 |
void |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
154 |
WIN_VideoQuit(_THIS) |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
155 |
{ |
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
156 |
WIN_QuitModes(_this); |
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
157 |
WIN_QuitKeyboard(_this); |
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
158 |
WIN_QuitMouse(_this); |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
159 |
} |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
160 |
|
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
161 |
/* vim: set ts=4 sw=4 expandtab: */ |