annotate src/main/macos/SDL.shlib.r @ 4223:63fd67e17705 SDL-1.2

Fixed bug #727 Lorenzo Desole 2009-04-19 07:36:10 PDT I am one of the developers of a multimedia application (My Media System MMS), which uses SDL. MMS is normally running in fullscreen mode but it switches it off before launching external applications (mplayer, xine, etc.). The problem with fullscreen is that when the latter is switched off either via SDL_WM_ToggleFullScreen() or SDL_SetVideoMode(), SDL compares the current screen sizes with the ones saved when the video system was initted, and if they don't match, it calls XF86VidModeSwitchToMode() to switch to the old modeline. This makes it impossible for external programs and for MMS itself to use RandR to change the screen size, because next time fullscreen mode is turned off, it bombs out with the following error: X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 136 (XFree86-VidModeExtension) Minor opcode of failed request: 10 (XF86VidModeSwitchToMode) [...] Obviously this happens only if the new screen resolution is smaller than the original one and XF86VidModeSwitchToMode() can't succeed. I couldn't find any way to inform SDL that the screen resolution it uses as reference is no longer valid. This can be fixed by adding "save_mode(this)" to ./src/video/x11/SDL_x11modes.c, API X11_EnterFullScreen(_THIS), like this: int X11_EnterFullScreen(_THIS) { int okay; + save_mode(this); I can't rule out possible side effects, but I don't see any. While I admit this is a minor issue for the general users, it is a major showstopper for our program where the ability to change screen resolution and refresh rate according to the movie being played, is very important. Thanks in advance.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 11:14:36 +0000
parents e52772528c75
children 1e191391e68d
rev   line source
4128
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 #ifndef __TYPES_R__
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 #include "Types.r"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 #endif
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 #ifndef __BALLOONS_R__
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 #include "Balloons.r"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 #endif
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 #define VERSION_MAJOR 1
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 #define VERSION_MINOR 2
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 #define REVISION 13
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 #define STATE release /* development | alpha | beta | release */
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 #define RELEASE_NO 0 /* number after letter, or zero for release */
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 #define COUNTRY verUS
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18 #define VERSION_STRING "1.2.13"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 #define NAME "SDL"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 #define SHORT_DESCRIPTION "Simple DirectMedia Layer by Sam Lantinga"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 #define LONG_DESCRIPTION "A cross-platform multimedia library.\n\nhttp://www.libsdl.org"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 resource 'vers' (1) {
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 VERSION_MAJOR,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 (VERSION_MINOR << 4) | REVISION,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 STATE,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 RELEASE_NO,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 COUNTRY,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 VERSION_STRING,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 VERSION_STRING
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 };
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 resource 'vers' (2) {
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 VERSION_MAJOR,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 (VERSION_MINOR << 4) | REVISION,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 STATE,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 RELEASE_NO,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 COUNTRY,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 VERSION_STRING,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 SHORT_DESCRIPTION
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 };
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 /* Extension Manager info */
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 data 'CCI' (128) {
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 NAME "\n\n"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 LONG_DESCRIPTION
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 };
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 /* Finder help balloon */
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 resource 'hfdr' (kHMHelpID) {
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 HelpMgrVersion,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 hmDefaultOptions,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 0,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 0,
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 {
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58 HMStringItem
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 {
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 NAME "\n\n"
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 LONG_DESCRIPTION
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 }
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 }
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 };
b74570c53159 Updated MacOS Classic version, added version resource to MPW build.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66