Mercurial > sdl-ios-xcode
annotate src/video/wscons/SDL_wsconsevents_c.h @ 2723:911db724ea24
Couriersud fixed bug #603
Using the following sequence
SDL_Init(..:)
SDL_CreateWindow(..., SDL_WINDOW_OPENGL)
SDL_DestroyWindow
SDL_CreateWindow(..., SDL_WINDOW_OPENGL)
SDL will crash in X11_GL_GetVisual. This is due to the fact that
during SDL_DestroyWindow X11_GL_Shutdown was called because the last window
has been closed.
On the next call to SDL_CreateWindow the library is still loaded and only the
memory is reinitialized. Function pointers such as gl_data->glXChooseVisual
will not be reinitialized.
Consequently, SDL will crash due to a NULL pointer access.
The attached patch corrects the behaviour.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 26 Aug 2008 02:47:26 +0000 |
parents | c121d94672cb |
children | 99210400e8b9 |
rev | line source |
---|---|
1187 | 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:
1187
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
1187 | 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:
1187
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
1187 | 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:
1187
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
1187 | 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:
1187
diff
changeset
|
13 Lesser General Public License for more details. |
1187 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1187
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:
1187
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:
1187
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1187 | 18 |
19 Sam Lantinga | |
20 slouken@libsdl.org | |
21 */ | |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
22 #include "SDL_config.h" |
1187 | 23 |
24 #include "SDL_wsconsvideo.h" | |
25 | |
26 int WSCONS_InitKeyboard(_THIS); | |
27 void WSCONS_ReleaseKeyboard(_THIS); | |
28 | |
29 /* Variables and functions exported by SDL_sysevents.c to other parts | |
30 of the native video subsystem (SDL_sysvideo.c) | |
31 */ | |
32 extern void WSCONS_InitOSKeymap(_THIS); | |
33 extern void WSCONS_PumpEvents(_THIS); | |
34 | |
35 /* end of SDL_wsconsevents_c.h ... */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
36 /* vi: set ts=4 sw=4 expandtab: */ |