forked from jengelh/SDL2
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
This commit is contained in:
parent
6c28f8e3ea
commit
47e824684b
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785
|
||||
size 4209352
|
Binary file not shown.
3
SDL2-2.0.6.tar.gz
Normal file
3
SDL2-2.0.6.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:03658b5660d16d7b31263a691e058ed37acdab155d68dabbad79998fb552c5df
|
||||
size 4420311
|
BIN
SDL2-2.0.6.tar.gz.sig
Normal file
BIN
SDL2-2.0.6.tar.gz.sig
Normal file
Binary file not shown.
60
SDL2.changes
60
SDL2.changes
@ -1,3 +1,63 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 30 16:54:04 UTC 2017 - spartanj@gmail.com
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 1 13:14:45 UTC 2017 - fcrozat@suse.com
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
Name: SDL2
|
||||
%define lname libSDL2-2_0-0
|
||||
Version: 2.0.5
|
||||
Version: 2.0.6
|
||||
Release: 0
|
||||
Summary: Simple DirectMedia Layer Library
|
||||
License: Zlib
|
||||
@ -31,7 +31,6 @@ Source2: http://libsdl.org/release/%name-%version.tar.gz.sig
|
||||
Source3: %name.keyring
|
||||
Source4: baselibs.conf
|
||||
Patch1: %{name}-ppc64-declaration-after-statement.patch
|
||||
Patch2: dbus-ime.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: cmake
|
||||
BuildRequires: dos2unix
|
||||
@ -109,7 +108,6 @@ library.
|
||||
%ifarch ppc64 ppc64le
|
||||
%patch -P 1 -p1
|
||||
%endif
|
||||
%patch -P 2 -p1
|
||||
dos2unix WhatsNew.txt
|
||||
dos2unix TODO.txt
|
||||
dos2unix BUGS.txt
|
||||
|
230
dbus-ime.diff
230
dbus-ime.diff
@ -1,230 +0,0 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Alex Baines <alex@abaines.me.uk>
|
||||
# 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 <locale.h>
|
||||
+#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 <locale.h>
|
||||
-#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);
|
||||
|
Loading…
Reference in New Issue
Block a user