Mercurial > sdl-ios-xcode
annotate src/video/wincommon/SDL_syswm.c @ 1312:c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 01 Feb 2006 06:32:25 +0000 |
parents | 51a8702d8ecd |
children | 450721ad5436 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1152
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
252
e8157fcb3114
Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
36
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
23 #include <stdio.h> | |
24 #include <malloc.h> | |
25 #include <windows.h> | |
26 | |
27 #include "SDL_version.h" | |
28 #include "SDL_error.h" | |
29 #include "SDL_video.h" | |
30 #include "SDL_syswm.h" | |
31 #include "SDL_syswm_c.h" | |
439
3ac8344e3872
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
438
diff
changeset
|
32 #include "SDL_wingl_c.h" |
0 | 33 #include "SDL_pixels_c.h" |
1152
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
34 #include "SDL_loadso.h" |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
35 |
0 | 36 |
37 #ifdef _WIN32_WCE | |
38 #define DISABLE_ICON_SUPPORT | |
39 #endif | |
40 | |
41 /* RJR: March 28, 2000 | |
42 we need "SDL_cursor_c.h" for mods to WIN_GrabInput */ | |
43 #include "SDL_cursor_c.h" | |
44 | |
45 /* The screen icon -- needs to be freed on SDL_VideoQuit() */ | |
46 HICON screen_icn = NULL; | |
47 | |
1152
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
48 #ifdef _WIN32_WCE |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
49 |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
50 BOOL (WINAPI *CoreCatchInput)(int flag) = NULL; |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
51 int input_catched = 0; |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
52 HINSTANCE coredll = NULL; |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
53 |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
54 // the same API call that gx.dll does to catch the input |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
55 void LoadInputCatchFunc() |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
56 { |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
57 coredll = SDL_LoadObject("coredll.dll"); |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
58 if( coredll ) |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
59 { |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
60 CoreCatchInput = (int (WINAPI *)(int)) GetProcAddress(coredll, (const unsigned short *) 1453); |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
61 } |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
62 } |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
63 |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
64 #endif |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
65 |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
66 |
0 | 67 /* Win32 icon mask semantics are different from those of SDL: |
68 SDL applies the mask to the icon and copies result to desktop. | |
69 Win32 applies the mask to the desktop and XORs the icon on. | |
70 This means that the SDL mask needs to be applied to the icon and | |
71 then inverted and passed to Win32. | |
72 */ | |
73 void WIN_SetWMIcon(_THIS, SDL_Surface *icon, Uint8 *mask) | |
74 { | |
75 #ifdef DISABLE_ICON_SUPPORT | |
76 return; | |
77 #else | |
78 SDL_Palette *pal_256; | |
79 SDL_Surface *icon_256; | |
80 Uint8 *pdata, *pwin32; | |
81 Uint8 *mdata, *mwin32, m = 0; | |
82 int icon_len; | |
83 int icon_plen; | |
84 int icon_mlen; | |
85 int icon_pitch; | |
86 int mask_pitch; | |
87 SDL_Rect bounds; | |
88 int i, skip; | |
89 int row, col; | |
90 struct /* quasi-BMP format */ Win32Icon { | |
91 Uint32 biSize; | |
92 Sint32 biWidth; | |
93 Sint32 biHeight; | |
94 Uint16 biPlanes; | |
95 Uint16 biBitCount; | |
96 Uint32 biCompression; | |
97 Uint32 biSizeImage; | |
98 Sint32 biXPelsPerMeter; | |
99 Sint32 biYPelsPerMeter; | |
100 Uint32 biClrUsed; | |
101 Uint32 biClrImportant; | |
102 struct /* RGBQUAD -- note it's BGR ordered */ { | |
103 Uint8 rgbBlue; | |
104 Uint8 rgbGreen; | |
105 Uint8 rgbRed; | |
106 Uint8 rgbReserved; | |
107 } biColors[256]; | |
108 /* Pixels: | |
109 Uint8 pixels[] | |
110 */ | |
111 /* Mask: | |
112 Uint8 mask[] | |
113 */ | |
114 } *icon_win32; | |
115 | |
116 /* Allocate the win32 bmp icon and set everything to zero */ | |
117 icon_pitch = ((icon->w+3)&~3); | |
118 mask_pitch = ((icon->w+7)/8); | |
119 icon_plen = icon->h*icon_pitch; | |
120 icon_mlen = icon->h*mask_pitch; | |
121 icon_len = sizeof(*icon_win32)+icon_plen+icon_mlen; | |
122 icon_win32 = (struct Win32Icon *)alloca(icon_len); | |
123 if ( icon_win32 == NULL ) { | |
124 return; | |
125 } | |
126 memset(icon_win32, 0, icon_len); | |
127 | |
128 /* Set the basic BMP parameters */ | |
129 icon_win32->biSize = sizeof(*icon_win32)-sizeof(icon_win32->biColors); | |
130 icon_win32->biWidth = icon->w; | |
131 icon_win32->biHeight = icon->h*2; | |
132 icon_win32->biPlanes = 1; | |
133 icon_win32->biBitCount = 8; | |
134 icon_win32->biSizeImage = icon_plen+icon_mlen; | |
135 | |
136 /* Allocate a standard 256 color icon surface */ | |
137 icon_256 = SDL_CreateRGBSurface(SDL_SWSURFACE, icon->w, icon->h, | |
138 icon_win32->biBitCount, 0, 0, 0, 0); | |
139 if ( icon_256 == NULL ) { | |
140 return; | |
141 } | |
142 pal_256 = icon_256->format->palette; | |
143 if (icon->format->palette && | |
144 (icon->format->BitsPerPixel == icon_256->format->BitsPerPixel)){ | |
145 Uint8 black; | |
146 memcpy(pal_256->colors, icon->format->palette->colors, | |
147 pal_256->ncolors*sizeof(SDL_Color)); | |
148 /* Make sure that 0 is black! */ | |
149 black = SDL_FindColor(pal_256, 0x00, 0x00, 0x00); | |
150 pal_256->colors[black] = pal_256->colors[0]; | |
151 pal_256->colors[0].r = 0x00; | |
152 pal_256->colors[0].g = 0x00; | |
153 pal_256->colors[0].b = 0x00; | |
154 } else { | |
155 SDL_DitherColors(pal_256->colors, | |
156 icon_256->format->BitsPerPixel); | |
157 } | |
158 | |
159 /* Now copy color data to the icon BMP */ | |
160 for ( i=0; i<(1<<icon_win32->biBitCount); ++i ) { | |
161 icon_win32->biColors[i].rgbRed = pal_256->colors[i].r; | |
162 icon_win32->biColors[i].rgbGreen = pal_256->colors[i].g; | |
163 icon_win32->biColors[i].rgbBlue = pal_256->colors[i].b; | |
164 } | |
165 | |
166 /* Convert icon to a standard surface format. This may not always | |
167 be necessary, as Windows supports a variety of BMP formats, but | |
168 it greatly simplifies our code. | |
169 */ | |
170 bounds.x = 0; | |
171 bounds.y = 0; | |
172 bounds.w = icon->w; | |
173 bounds.h = icon->h; | |
174 if ( SDL_LowerBlit(icon, &bounds, icon_256, &bounds) < 0 ) { | |
175 SDL_FreeSurface(icon_256); | |
176 return; | |
177 } | |
178 | |
179 /* Copy pixels upside-down to icon BMP, masked with the icon mask */ | |
180 if ( SDL_MUSTLOCK(icon_256) || (icon_256->pitch != icon_pitch) ) { | |
181 SDL_FreeSurface(icon_256); | |
182 SDL_SetError("Warning: Unexpected icon_256 characteristics"); | |
183 return; | |
184 } | |
185 pdata = (Uint8 *)icon_256->pixels; | |
186 mdata = mask; | |
187 pwin32 = (Uint8 *)icon_win32+sizeof(*icon_win32)+icon_plen-icon_pitch; | |
188 skip = icon_pitch - icon->w; | |
189 for ( row=0; row<icon->h; ++row ) { | |
190 for ( col=0; col<icon->w; ++col ) { | |
191 if ( (col%8) == 0 ) { | |
192 m = *mdata++; | |
193 } | |
194 if ( (m&0x80) != 0x00 ) { | |
195 *pwin32 = *pdata; | |
196 } | |
197 m <<= 1; | |
198 ++pdata; | |
199 ++pwin32; | |
200 } | |
201 pdata += skip; | |
202 pwin32 += skip; | |
203 pwin32 -= 2*icon_pitch; | |
204 } | |
205 SDL_FreeSurface(icon_256); | |
206 | |
207 /* Copy mask inverted and upside-down to icon BMP */ | |
208 mdata = mask; | |
209 mwin32 = (Uint8 *)icon_win32 | |
210 +sizeof(*icon_win32)+icon_plen+icon_mlen-mask_pitch; | |
211 for ( row=0; row<icon->h; ++row ) { | |
212 for ( col=0; col<mask_pitch; ++col ) { | |
213 *mwin32++ = ~*mdata++; | |
214 } | |
215 mwin32 -= 2*mask_pitch; | |
216 } | |
217 | |
218 /* Finally, create the icon handle and set the window icon */ | |
219 screen_icn = CreateIconFromResourceEx((Uint8 *)icon_win32, icon_len, | |
220 TRUE, 0x00030000, icon->w, icon->h, LR_DEFAULTCOLOR); | |
221 if ( screen_icn == NULL ) { | |
222 SDL_SetError("Couldn't create Win32 icon handle"); | |
223 } else { | |
224 SetClassLong(SDL_Window, GCL_HICON, (LONG)screen_icn); | |
225 } | |
226 #endif /* DISABLE_ICON_SUPPORT */ | |
227 } | |
228 | |
229 void WIN_SetWMCaption(_THIS, const char *title, const char *icon) | |
230 { | |
231 #ifdef _WIN32_WCE | |
232 /* WinCE uses the UNICODE version */ | |
36
13ee9f4834ea
Windows CE patches contributed by Rainer Loritz
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
233 int nLen = strlen(title)+1; |
13ee9f4834ea
Windows CE patches contributed by Rainer Loritz
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
234 LPWSTR lpszW = alloca(nLen*2); |
0 | 235 MultiByteToWideChar(CP_ACP, 0, title, -1, lpszW, nLen); |
236 SetWindowText(SDL_Window, lpszW); | |
237 #else | |
238 SetWindowText(SDL_Window, title); | |
239 #endif | |
240 } | |
241 | |
242 int WIN_IconifyWindow(_THIS) | |
243 { | |
244 ShowWindow(SDL_Window, SW_MINIMIZE); | |
245 return(1); | |
246 } | |
247 | |
248 SDL_GrabMode WIN_GrabInput(_THIS, SDL_GrabMode mode) | |
249 { | |
250 if ( mode == SDL_GRAB_OFF ) { | |
251 ClipCursor(NULL); | |
252 if ( !(SDL_cursorstate & CURSOR_VISIBLE) ) { | |
253 /* RJR: March 28, 2000 | |
254 must be leaving relative mode, move mouse from | |
255 center of window to where it belongs ... */ | |
256 POINT pt; | |
257 int x, y; | |
258 SDL_GetMouseState(&x,&y); | |
259 pt.x = x; | |
260 pt.y = y; | |
261 ClientToScreen(SDL_Window, &pt); | |
262 SetCursorPos(pt.x,pt.y); | |
263 } | |
1152
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
264 #ifdef _WIN32_WCE |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
265 if( input_catched ) |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
266 { |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
267 if( !CoreCatchInput ) LoadInputCatchFunc(); |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
268 |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
269 if( CoreCatchInput ) |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
270 CoreCatchInput(0); |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
271 } |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
272 #endif |
0 | 273 } else { |
274 ClipCursor(&SDL_bounds); | |
275 if ( !(SDL_cursorstate & CURSOR_VISIBLE) ) { | |
276 /* RJR: March 28, 2000 | |
277 must be entering relative mode, get ready by | |
278 moving mouse to center of window ... */ | |
279 POINT pt; | |
280 pt.x = (SDL_VideoSurface->w/2); | |
281 pt.y = (SDL_VideoSurface->h/2); | |
282 ClientToScreen(SDL_Window, &pt); | |
283 SetCursorPos(pt.x, pt.y); | |
284 } | |
1152
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
285 #ifdef _WIN32_WCE |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
286 if( !input_catched ) |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
287 { |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
288 if( !CoreCatchInput ) LoadInputCatchFunc(); |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
289 |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
290 if( CoreCatchInput ) |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
291 CoreCatchInput(1); |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
292 } |
51a8702d8ecd
Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at
Ryan C. Gordon <icculus@icculus.org>
parents:
439
diff
changeset
|
293 #endif |
0 | 294 } |
295 return(mode); | |
296 } | |
297 | |
298 /* If 'info' is the right version, this function fills it and returns 1. | |
299 Otherwise, in case of a version mismatch, it returns -1. | |
300 */ | |
301 int WIN_GetWMInfo(_THIS, SDL_SysWMinfo *info) | |
302 { | |
303 if ( info->version.major <= SDL_MAJOR_VERSION ) { | |
304 info->window = SDL_Window; | |
438
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
305 if ( SDL_VERSIONNUM(info->version.major, |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
306 info->version.minor, |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
307 info->version.patch) >= |
439
3ac8344e3872
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
438
diff
changeset
|
308 SDL_VERSIONNUM(1, 2, 5) ) { |
438
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
309 #ifdef HAVE_OPENGL |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
310 info->hglrc = GL_hrc; |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
311 #else |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
312 info->hglrc = NULL; |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
313 #endif |
f9c5f135a8b9
Added a way to get the Windows OpenGL context in SDL_syswm.h
Sam Lantinga <slouken@libsdl.org>
parents:
252
diff
changeset
|
314 } |
0 | 315 return(1); |
316 } else { | |
317 SDL_SetError("Application not compiled with SDL %d.%d\n", | |
318 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); | |
319 return(-1); | |
320 } | |
321 } |