1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Description: Export X11_KeyToUnicode() to legacy applications, but warn about such usage to stderr
Introduced in 1.2.11-3 (Sun, 13 Aug 2006 19:03:51 +0200).
.
Upstream accepted it:
Sam Lantinga 2012-01-22 10:48:43 PST
.
At this point it's fine to leave it as an exported function, but not in the
headers.
http://hg.libsdl.org/SDL/rev/900a0fae90ca
Author: Sam Hocevar <sam+deb@zoy.org>
Last-Update: 2012-01-22
Bug-Debian: http://bugs.debian.org/376560
Forwarded: http://bugzilla.libsdl.org/show_bug.cgi?id=1390
Applied-Upstream: http://hg.libsdl.org/SDL/rev/900a0fae90ca
--- a/src/video/x11/SDL_x11events.c
+++ b/src/video/x11/SDL_x11events.c
@@ -1246,8 +1246,11 @@
* sequences (dead accents, compose key sequences) will not work since the
* state has been irrevocably lost.
*/
+extern DECLSPEC Uint16 SDLCALL X11_KeyToUnicode(SDLKey, SDLMod);
+
Uint16 X11_KeyToUnicode(SDLKey keysym, SDLMod modifiers)
{
+ static int warning = 1;
struct SDL_VideoDevice *this = current_video;
char keybuf[32];
int i;
@@ -1255,6 +1258,12 @@
XKeyEvent xkey;
Uint16 unicode;
+ if ( warning ) {
+ warning = 0;
+ fprintf(stderr, "WARNING: Application is using X11_KeyToUnicode().\n");
+ fprintf(stderr, "This is not an official SDL function, please report this as a bug.\n");
+ }
+
if ( !this || !SDL_Display ) {
return 0;
}
|