From 47e824684bb2e7d2cd7ea6c6ead1b03c9bf1057562c704f6c19d0eccc952512e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Sep 2017 23:36:00 +0000 Subject: [PATCH] Accepting request 530173 from home:SpartanJ:branches:games - Update to 2.0.6: General: * Added cross-platform Vulkan graphics support in SDL_vulkan.h SDL_Vulkan_LoadLibrary() SDL_Vulkan_GetVkGetInstanceProcAddr() SDL_Vulkan_GetInstanceExtensions() SDL_Vulkan_CreateSurface() SDL_Vulkan_GetDrawableSize() SDL_Vulkan_UnloadLibrary() This is all the platform-specific code you need to bring up Vulkan on all SDL platforms. You can look at an example in test/testvulkan.c * Added SDL_ComposeCustomBlendMode() to create custom blend modes for 2D rendering * Added SDL_HasNEON() which returns whether the CPU has NEON instruction support * Added support for many game controllers, including the Nintendo Switch Pro Controller * Added support for inverted axes and separate axis directions in game controller mappings * Added functions to return information about a joystick before it's opened: SDL_JoystickGetDeviceVendor() SDL_JoystickGetDeviceProduct() SDL_JoystickGetDeviceProductVersion() SDL_JoystickGetDeviceType() SDL_JoystickGetDeviceInstanceID() * Added functions to return information about an open joystick: SDL_JoystickGetVendor() SDL_JoystickGetProduct() SDL_JoystickGetProductVersion() SDL_JoystickGetType() SDL_JoystickGetAxisInitialState() * Added functions to return information about an open game controller: SDL_GameControllerGetVendor() SDL_GameControllerGetProduct() SDL_GameControllerGetProductVersion() * Added SDL_GameControllerNumMappings() and SDL_GameControllerMappingForIndex() to be able to enumerate the built-in game controller mappings * Added SDL_LoadFile() and SDL_LoadFile_RW() to load a file into memory * Added SDL_DuplicateSurface() to make a copy of a surface * Added an experimental JACK audio driver * Implemented non-power-of-two audio resampling, optionally using libsamplerate to perform the resampling * Added the hint SDL_HINT_AUDIO_RESAMPLING_MODE to control the quality of resampling * Added the hint SDL_HINT_RENDER_LOGICAL_SIZE_MODE to control the scaling policy for SDL_RenderSetLogicalSize(): "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen (the default) "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen * Added the hints SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the mouse speed when being read from raw mouse input * Added the hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether SDL will synthesize mouse events from touch events Windows: * The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device * The old XAudio2 audio driver is deprecated and will be removed in the next release * Added hints SDL_HINT_WINDOWS_INTRESOURCE_ICON and SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL to specify a custom icon resource ID for SDL windows * The hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING is now on by default for compatibility with .NET languages and various Windows debuggers * Updated the GUID format for game controller mappings, older mappings will be automatically converted on load * Implemented the SDL_WINDOW_ALWAYS_ON_TOP flag on Windows Linux: * Added an experimental KMS/DRM video driver for embedded development iOS: * Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category, determining whether the phone mute switch affects the audio OBS-URL: https://build.opensuse.org/request/show/530173 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=55 --- SDL2-2.0.5.tar.gz | 3 - SDL2-2.0.5.tar.gz.sig | Bin 72 -> 0 bytes SDL2-2.0.6.tar.gz | 3 + SDL2-2.0.6.tar.gz.sig | Bin 0 -> 95 bytes SDL2.changes | 60 +++++++++++ SDL2.spec | 4 +- dbus-ime.diff | 230 ------------------------------------------ 7 files changed, 64 insertions(+), 236 deletions(-) delete mode 100644 SDL2-2.0.5.tar.gz delete mode 100644 SDL2-2.0.5.tar.gz.sig create mode 100644 SDL2-2.0.6.tar.gz create mode 100644 SDL2-2.0.6.tar.gz.sig delete mode 100644 dbus-ime.diff diff --git a/SDL2-2.0.5.tar.gz b/SDL2-2.0.5.tar.gz deleted file mode 100644 index c0d00da..0000000 --- a/SDL2-2.0.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785 -size 4209352 diff --git a/SDL2-2.0.5.tar.gz.sig b/SDL2-2.0.5.tar.gz.sig deleted file mode 100644 index a11c77f2667e0c338b2ea305dd8cb4c81e104fa22ef209d5fb5c4fc9ea264ad3..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0$2z|i~tG=5HO{acc*qc=0BSNofij@Hq$_xX9W*_Vsg1p eI#lcqy#Sd3Q&i?!geDV)392#~lB6~IXNEQE;1|&V diff --git a/SDL2-2.0.6.tar.gz b/SDL2-2.0.6.tar.gz new file mode 100644 index 0000000..89b4fe7 --- /dev/null +++ b/SDL2-2.0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03658b5660d16d7b31263a691e058ed37acdab155d68dabbad79998fb552c5df +size 4420311 diff --git a/SDL2-2.0.6.tar.gz.sig b/SDL2-2.0.6.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..0eebe1701ea3554afb62082225c481019e58d0525ce75958c24ffad30299c2b6 GIT binary patch literal 95 zcmeB(WnmCxVvrS6WD(U!j%^5DT3>$gL7TzS$>qz-te>$mMIMdmXW-%#fQj^(G0YE{ vwNoK}YOs2k=D%|1snZzu2rrOiSg^O!=$$4ncjxY$_Var7FWV -# Date 1477614538 -3600 -# Node ID b48d8a98e2618a6b4fd45aa2aab290ba4eb113c2 -# Parent 35fee69e84dfd745ef34e392e481f9088aeff70c -Fix double events / no repeat flag on key events when built withoutibus/fcitx - -Uses XkbSetDetectableKeyRepeat, and falls back to forcing @im=none if it's not -supported. - -diff -r 35fee69e84df -r b48d8a98e261 src/video/x11/SDL_x11events.c ---- a/src/video/x11/SDL_x11events.c Fri Oct 28 17:00:37 2016 -0700 -+++ b/src/video/x11/SDL_x11events.c Fri Oct 28 01:28:58 2016 +0100 -@@ -568,14 +568,18 @@ - printf("Filtered event type = %d display = %d window = %d\n", - xevent.type, xevent.xany.display, xevent.xany.window); - #endif -+ /* Make sure dead key press/release events are sent */ -+ /* But only if we're using one of the DBus IMEs, otherwise -+ some XIM IMEs will generate duplicate events */ - if (orig_keycode) { -- /* Make sure dead key press/release events are sent */ -+#if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX_FRONTEND_H) - SDL_Scancode scancode = videodata->key_layout[orig_keycode]; - if (orig_event_type == KeyPress) { - SDL_SendKeyboardKey(SDL_PRESSED, scancode); - } else { - SDL_SendKeyboardKey(SDL_RELEASED, scancode); - } -+#endif - } - return; - } -diff -r 35fee69e84df -r b48d8a98e261 src/video/x11/SDL_x11keyboard.c ---- a/src/video/x11/SDL_x11keyboard.c Fri Oct 28 17:00:37 2016 -0700 -+++ b/src/video/x11/SDL_x11keyboard.c Fri Oct 28 01:28:58 2016 +0100 -@@ -33,6 +33,10 @@ - - #include "imKStoUCS.h" - -+#ifdef X_HAVE_UTF8_STRING -+#include -+#endif -+ - /* *INDENT-OFF* */ - static const struct { - KeySym keysym; -@@ -262,19 +266,82 @@ - int best_distance; - int best_index; - int distance; -- -+ BOOL xkb_repeat = 0; -+ - X11_XAutoRepeatOn(data->display); - - #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM - { -- int xkb_major = XkbMajorVersion; -- int xkb_minor = XkbMinorVersion; -- if (X11_XkbQueryExtension(data->display, NULL, NULL, NULL, &xkb_major, &xkb_minor)) { -- data->xkb = X11_XkbGetMap(data->display, XkbAllClientInfoMask, XkbUseCoreKbd); -- } -- } -+ int xkb_major = XkbMajorVersion; -+ int xkb_minor = XkbMinorVersion; -+ -+ if (X11_XkbQueryExtension(data->display, NULL, NULL, NULL, &xkb_major, &xkb_minor)) { -+ data->xkb = X11_XkbGetMap(data->display, XkbAllClientInfoMask, XkbUseCoreKbd); -+ } -+ -+ /* This will remove KeyRelease events for held keys */ -+ X11_XkbSetDetectableAutoRepeat(data->display, True, &xkb_repeat); -+ } - #endif -+ -+ /* Open a connection to the X input manager */ -+#ifdef X_HAVE_UTF8_STRING -+ if (SDL_X11_HAVE_UTF8) { -+ /* Set the locale, and call XSetLocaleModifiers before XOpenIM so that -+ Compose keys will work correctly. */ -+ char *prev_locale = setlocale(LC_ALL, NULL); -+ char *prev_xmods = X11_XSetLocaleModifiers(NULL); -+ const char *new_xmods = ""; -+#if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX_FRONTEND_H) -+ const char *env_xmods = SDL_getenv("XMODIFIERS"); -+#endif -+ SDL_bool has_dbus_ime_support = SDL_FALSE; - -+ if (prev_locale) { -+ prev_locale = SDL_strdup(prev_locale); -+ } -+ -+ if (prev_xmods) { -+ prev_xmods = SDL_strdup(prev_xmods); -+ } -+ -+ /* IBus resends some key events that were filtered by XFilterEvents -+ when it is used via XIM which causes issues. Prevent this by forcing -+ @im=none if XMODIFIERS contains @im=ibus. IBus can still be used via -+ the DBus implementation, which also has support for pre-editing. */ -+#ifdef HAVE_IBUS_IBUS_H -+ if (env_xmods && SDL_strstr(env_xmods, "@im=ibus") != NULL) { -+ has_dbus_ime_support = SDL_TRUE; -+ } -+#endif -+#ifdef HAVE_FCITX_FRONTEND_H -+ if (env_xmods && SDL_strstr(env_xmods, "@im=fcitx") != NULL) { -+ has_dbus_ime_support = SDL_TRUE; -+ } -+#endif -+ if (has_dbus_ime_support || !xkb_repeat) { -+ new_xmods = "@im=none"; -+ } -+ -+ setlocale(LC_ALL, ""); -+ X11_XSetLocaleModifiers(new_xmods); -+ -+ data->im = X11_XOpenIM(data->display, NULL, data->classname, data->classname); -+ -+ /* Reset the locale + X locale modifiers back to how they were, -+ locale first because the X locale modifiers depend on it. */ -+ setlocale(LC_ALL, prev_locale); -+ X11_XSetLocaleModifiers(prev_xmods); -+ -+ if (prev_locale) { -+ SDL_free(prev_locale); -+ } -+ -+ if (prev_xmods) { -+ SDL_free(prev_xmods); -+ } -+ } -+#endif - /* Try to determine which scancodes are being used based on fingerprint */ - best_distance = SDL_arraysize(fingerprint) + 1; - best_index = -1; -diff -r 35fee69e84df -r b48d8a98e261 src/video/x11/SDL_x11sym.h ---- a/src/video/x11/SDL_x11sym.h Fri Oct 28 17:00:37 2016 -0700 -+++ b/src/video/x11/SDL_x11sym.h Fri Oct 28 01:28:58 2016 +0100 -@@ -179,6 +179,7 @@ - SDL_X11_SYM(Status,XkbGetUpdatedMap,(Display* a,unsigned int b,XkbDescPtr c),(a,b,c),return) - SDL_X11_SYM(XkbDescPtr,XkbGetMap,(Display* a,unsigned int b,unsigned int c),(a,b,c),return) - SDL_X11_SYM(void,XkbFreeClientMap,(XkbDescPtr a,unsigned int b, Bool c),(a,b,c),) -+SDL_X11_SYM(BOOL,XkbSetDetectableAutoRepeat,(Display* a, BOOL b, BOOL* c),(a,b,c),return) - #endif - - #if NeedWidePrototypes -diff -r 35fee69e84df -r b48d8a98e261 src/video/x11/SDL_x11video.c ---- a/src/video/x11/SDL_x11video.c Fri Oct 28 17:00:37 2016 -0700 -+++ b/src/video/x11/SDL_x11video.c Fri Oct 28 01:28:58 2016 +0100 -@@ -39,10 +39,6 @@ - #include "SDL_x11opengles.h" - #endif - --#ifdef X_HAVE_UTF8_STRING --#include --#endif -- - /* Initialization/Query functions */ - static int X11_VideoInit(_THIS); - static void X11_VideoQuit(_THIS); -@@ -388,65 +384,6 @@ - /* I have no idea how random this actually is, or has to be. */ - data->window_group = (XID) (((size_t) data->pid) ^ ((size_t) _this)); - -- /* Open a connection to the X input manager */ --#ifdef X_HAVE_UTF8_STRING -- if (SDL_X11_HAVE_UTF8) { -- /* Set the locale, and call XSetLocaleModifiers before XOpenIM so that -- Compose keys will work correctly. */ -- char *prev_locale = setlocale(LC_ALL, NULL); -- char *prev_xmods = X11_XSetLocaleModifiers(NULL); -- const char *new_xmods = ""; --#if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX_FRONTEND_H) -- const char *env_xmods = SDL_getenv("XMODIFIERS"); --#endif -- SDL_bool has_dbus_ime_support = SDL_FALSE; -- -- if (prev_locale) { -- prev_locale = SDL_strdup(prev_locale); -- } -- -- if (prev_xmods) { -- prev_xmods = SDL_strdup(prev_xmods); -- } -- -- /* IBus resends some key events that were filtered by XFilterEvents -- when it is used via XIM which causes issues. Prevent this by forcing -- @im=none if XMODIFIERS contains @im=ibus. IBus can still be used via -- the DBus implementation, which also has support for pre-editing. */ --#ifdef HAVE_IBUS_IBUS_H -- if (env_xmods && SDL_strstr(env_xmods, "@im=ibus") != NULL) { -- has_dbus_ime_support = SDL_TRUE; -- } --#endif --#ifdef HAVE_FCITX_FRONTEND_H -- if (env_xmods && SDL_strstr(env_xmods, "@im=fcitx") != NULL) { -- has_dbus_ime_support = SDL_TRUE; -- } --#endif -- if (has_dbus_ime_support) { -- new_xmods = "@im=none"; -- } -- -- setlocale(LC_ALL, ""); -- X11_XSetLocaleModifiers(new_xmods); -- -- data->im = X11_XOpenIM(data->display, NULL, data->classname, data->classname); -- -- /* Reset the locale + X locale modifiers back to how they were, -- locale first because the X locale modifiers depend on it. */ -- setlocale(LC_ALL, prev_locale); -- X11_XSetLocaleModifiers(prev_xmods); -- -- if (prev_locale) { -- SDL_free(prev_locale); -- } -- -- if (prev_xmods) { -- SDL_free(prev_xmods); -- } -- } --#endif -- - /* Look up some useful Atoms */ - #define GET_ATOM(X) data->X = X11_XInternAtom(data->display, #X, False) - GET_ATOM(WM_PROTOCOLS); -