Mercurial > sdl-ios-xcode
annotate include/SDL_version.h @ 4170:092c0bc69155 SDL-1.2
Fixed bug #618
Description From Tim Angus 2008-08-30 12:23:56 (-) [reply]
As we all know SDL 1.2 doesn't handle dead keys well since one key press
potentially equals two (or more) characters. For example, on many layouts,
keying <backquote>,<space> results in <no character>,<backquote><space>. Since
the unicode member of the SDL_keysym struct only has room for one character,
only one can be returned.
On Linux, the first character is returned. On Windows however, unless the exact
number of characters generated by the keypress is 1, nothing is returned. The
following patch addresses this inconsistency.
Updated patch which includes a further fix to the handling of the numpad when
numlock is on. This further fix is courtesy Amanieu d'Antras.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 13 Apr 2009 08:42:09 +0000 |
parents | a1b03ba2fcd0 |
children | 453587d6dc87 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
4159 | 3 Copyright (C) 1997-2009 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:
1222
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:
1222
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:
1222
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:
1222
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:
1222
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:
1222
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
251
b8688cfdc232
Updated the headers with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
241
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
23 /* This header defines the current SDL version */ | |
24 | |
25 #ifndef _SDL_version_h | |
26 #define _SDL_version_h | |
27 | |
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
28 #include "SDL_stdinc.h" |
0 | 29 |
30 #include "begin_code.h" | |
31 /* Set up for C function definitions, even when using C++ */ | |
32 #ifdef __cplusplus | |
33 extern "C" { | |
34 #endif | |
35 | |
36 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL | |
37 */ | |
38 #define SDL_MAJOR_VERSION 1 | |
39 #define SDL_MINOR_VERSION 2 | |
4110
b896fb0d4f9f
Updated version to 1.2.13
Sam Lantinga <slouken@libsdl.org>
parents:
3873
diff
changeset
|
40 #define SDL_PATCHLEVEL 13 |
0 | 41 |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
884
diff
changeset
|
42 typedef struct SDL_version { |
0 | 43 Uint8 major; |
44 Uint8 minor; | |
45 Uint8 patch; | |
46 } SDL_version; | |
47 | |
48 /* This macro can be used to fill a version structure with the compile-time | |
49 * version of the SDL library. | |
50 */ | |
51 #define SDL_VERSION(X) \ | |
52 { \ | |
53 (X)->major = SDL_MAJOR_VERSION; \ | |
54 (X)->minor = SDL_MINOR_VERSION; \ | |
55 (X)->patch = SDL_PATCHLEVEL; \ | |
56 } | |
57 | |
58 /* This macro turns the version numbers into a numeric value: | |
59 (1,2,3) -> (1203) | |
60 This assumes that there will never be more than 100 patchlevels | |
61 */ | |
62 #define SDL_VERSIONNUM(X, Y, Z) \ | |
1046
f09d5edfc7a3
Added some parentheses for a little more macro safety. Recommended by Petri
Ryan C. Gordon <icculus@icculus.org>
parents:
1024
diff
changeset
|
63 ((X)*1000 + (Y)*100 + (Z)) |
0 | 64 |
65 /* This is the version number macro for the current SDL version */ | |
66 #define SDL_COMPILEDVERSION \ | |
67 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) | |
68 | |
69 /* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ | |
70 #define SDL_VERSION_ATLEAST(X, Y, Z) \ | |
71 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) | |
72 | |
73 /* This function gets the version of the dynamically linked SDL library. | |
74 it should NOT be used to fill a version structure, instead you should | |
75 use the SDL_Version() macro. | |
76 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
77 extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void); |
0 | 78 |
79 /* Ends C function definitions when using C++ */ | |
80 #ifdef __cplusplus | |
81 } | |
82 #endif | |
83 #include "close_code.h" | |
84 | |
85 #endif /* _SDL_version_h */ |