|
45989035
|
2015-06-17T00:07:45
|
|
Partial fix for bug 2758 - Android issues with NDK r10c and API-21
Sylvain
When using API 21 and running on an old device (android < 5.0 ?) some function are missing.
functions are (at least) : signal, sigemptyset, atof, stpcpy (strcat and strcpy), srand, rand.
Very few modifications on SDL to get this working :
on SDL
======
Undefine android configuration :
HAVE_SIGNAL
HAVE_SIGACTION
HAVE_ATOF
In "SDL_systrhead.c", comment out the few block of lines with "sigemptyset".
Android.mk:
remove the compilation of "test" directory because it contains a few rand/srand calls
Also, there are more discussions about this in internet :
https://groups.google.com/forum/#!topic/android-ndk/RjO9WmG9pfE
http://stackoverflow.com/questions/25475055/android-ndk-load-library-cannot-locate-srand
|
|
3779bf38
|
2015-06-17T00:00:53
|
|
Fixed bug 2948 - [Android] Arrow keys from external keyboard are not received
Sylvain
http://developer.android.com/reference/android/view/InputDevice.html
int SOURCE_CLASS_JOYSTICK Constant Value: 16 (0x00000010)
int SOURCE_JOYSTICK Constant Value: 16777232 (0x01000010)
int SOURCE_KEYBOARD Constant Value: 257 (0x00000101)
int SOURCE_GAMEPAD Constant Value: 1025 (0x00000401)
int SOURCE_DPAD Constant Value: 513 (0x00000201)
I have an a PC keyboard that I connect to an android device.
The issue is that "arrow" keys gets lost.
More explanation:
This device gets detected twice by the java "pollInputDevices()" both as SOURCE_KEYBOARD and as a composite (0x1000311 == SOURCE_JOYSTICK | SOURCE_KEYBOARD | SOURCE_DPAD).
Because of being a SOURCE_CLASS_JOYSTICK, only the second entry is registered, and I opened it.
When I press one arrow key, the java method "onKey(...)" is called.
The Source "event.getSource()" is "SOURCE_KEYBOARD", so it enters this conditions :
if ( (event.getSource() & InputDevice.SOURCE_GAMEPAD) != 0 ||
(event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) {
And then, it enters :
SDLActivity.onNativePadDown() (native code in "SDL_sysjoystick.c")
Since the "arrows" are viewed as "D-PAD", it gets translated :
int button = keycode_to_SDL(keycode);
But the android-java "event.getDeviceId()" is wrong: this is the one from the Keyboard, and not the one from the Joystick that I have opened.
So I don't get them through the Joystick interface.
And since, the keycode has been translated, it returns 0 and assume it was consumed.
So I lost the key in the function "Android_OnPadDown()"
Notice, It won't happen with other normal "letters" keys because they does not get translated by "keycode_to_SDL", so "Android_OnPadDown()" returns -1.
And then java code send the keys to "SDLActivity.onNativeKeyDown()".
Possible patch on "Android_OnPadDown" and also "Android_OnPadUp" (and maybe other functons):
85 int
186 Android_OnPadDown(int device_id, int keycode)
187 {
188 SDL_joylist_item *item;
189 int button = keycode_to_SDL(keycode);
190 if (button >= 0) {
191 item = JoystickByDeviceId(device_id);
192 if (item && item->joystick) {
193 SDL_PrivateJoystickButton(item->joystick, button , SDL_PRESSED);
194 }
+ else return -1;
195 return 0;
196 }
197
198 return -1;
199 }
It would allow the java caller function to send the key to "SDLActivity.onNativeKeyDown();"
Another solution, would be to replace:
if ( (event.getSource() & InputDevice.SOURCE_GAMEPAD) != 0 ||
(event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) {
by
if ( (event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0)
Because only "SOURCE_CLASS_JOYSTICK" devices are registered/opened.
|
|
59d34bc3
|
2015-06-15T23:44:08
|
|
Fixed bug 3015 - grab mouse inconsistent state
Martin Gerhardy
Not sure - but I think there might be a logic flaw in SDL_SetWindowGrab.
The problem here is that this modifies the window flags and e.g. sets
SDL_WINDOW_INPUT_GRABBED - but the _this->grabbed_window pointer is not
yet set.
Then in SDL_UpdateWindowGrab the _this->grabbed_window pointer is only
set if the function pointer _this->SetWindowGrab is not NULL. But if
this is NULL, the _this->grabbed_window pointer is never set, but every
future call to any of the grab functions include an assert for:
SDL_assert(!_this->grabbed_window || ((_this->grabbed_window->flags &
SDL_WINDOW_INPUT_GRABBED) != 0));
That means the first call works, the second always fails and triggers
the assert.
|
|
0c3830a9
|
2015-06-16T00:57:45
|
|
Haptic/Linux: Keep track of device numbers properly to track duplicates.
Fixes Bugzilla #3014.
|
|
ccc12a36
|
2015-06-15T20:24:51
|
|
Implement repositioning the OS-rendered IME with SDL_SetTextInputRect on Windows.
|
|
d7975823
|
2015-06-14T19:26:20
|
|
Fixed style
|
|
34634082
|
2015-06-14T19:25:12
|
|
Fixed bug 3012 - Android accelerometer joystick axis values overflow when values from Android are larger than gravity
Magnus Bjerke Vik
This causes issues when for instance using the joystick API to make an Android phone rotate an object by rotating the phone. When the absolute value of an axis reported by android is larger than earth gravity, SDL will overflow the Sint16 value used for joystick axes, causing sporadic movements when close to the gravity. Just holding the phone so that e.g. Y points directly upwards will make it unstable, and even more if you just tap the phone gently from below (increasing the acceleration).
More detailed: SDLActivity gets the accelerometer values in onSensorChanged and divides each axis by earth gravity. SDL_SYS_JoystickUpdate takes each of the axis values, multiplies them by 32767.0 (largest Sint16), and the casts them to Sint16. From this you can see that any value from Android that exceeds earth gravity will overflow the joystick axis.
A fix is to clamp the values so that they won't overflow the Sint16.
|
|
e3df6d5e
|
2015-06-14T19:21:13
|
|
Fixed bug 2953 - Crash due to a bad cleanup in the SDL_SYS_HapticQuit function
Technically this is caused by the haptic devices not being closed at quit time, which we need to fix anyway, but this is a bandaid for now.
|
|
a4eb0dea
|
2015-06-14T19:10:51
|
|
Fixed bug 2908 - Fix clang warnings
Simon Deschenes
My build system still shows warning as errors.
The first warning says that the member named instances can never be false (or NULL) as it is a static array, and we should check for instances[index] which we do anyway.
|
|
98f9b88c
|
2015-06-13T13:36:47
|
|
Fixed bug 3011 - pthread/SDL_syssem.c requires _GNU_SOURCE
Ozkan Sezer
pthread/SDL_syssem.c requires _GNU_SOURCE predefined (like SDL_sysmutex.c),
otherwise sem_timedwait() prototype might not be available to it. Problem
seen with glibc-2.3.4.
|
|
9cf47d2f
|
2015-06-13T13:34:30
|
|
Fixed bug 3010 - SDL_x11messagebox.c needs including X11/keysym.h
Ozkan Sezer
SDL_x11messagebox.c needs including <X11/keysym.h> otherwise XK_Escape,
etc might not be available to it. Seen this with x.org-x11-6.8.2.
|
|
d8c2b36c
|
2015-06-12T21:10:31
|
|
Fixed crash if allocation for touch device failed.
If the allocation of an SDL_Touch failed, the number of touch devices was still
increased. Later access of the SDL_Touch would then have dereferenced the NULL.
|
|
71468742
|
2015-06-12T11:58:31
|
|
Make some string literals "const char *", not "char *" (thanks, Martin!).
Fixes Bugzilla #3007.
|
|
f29de0d3
|
2015-06-11T12:04:57
|
|
Fixed bug 3005 - MOMO steering wheel not detected by SDL
Joe Thompson
This is a regression. The changes to fix #2460 cause the EnumJoysticksCallback() function to return without adding devices (Line 345 in SDL-0a2b6bc7005f\src\joystick\windows\SDL_dinputjoystick.c).
Looking at dinput.h on my system, at least DI8DEVTYPE_DRIVING and DI8DEVTYPE_FLIGHT need to be added to the test.
It might be better to check if (devtype == DI8DEVTYPE_SUPPLEMENTAL) rather than checking if it is NOT EQUAL to a long list of types. Or check if the device is already in the list.
|
|
a86df3b7
|
2015-06-09T21:08:24
|
|
iOS: Fixed some cases where SDL_DestroyWindow or SDL_GL_DeleteContext can cause crashes.
|
|
cd1d7c94
|
2015-06-09T21:06:55
|
|
Wayland: Fixed SDL_GetTouchDevice() returning 0 for the valid device index.
The single touch device gets SDL_TouchID 1 (like on Emscripten, iOS and WinRT).
|
|
5d6aa08b
|
2015-06-09T21:06:29
|
|
Emscripten: Fixed SDL_GetTouchDevice() returning 0 for the valid device index.
The single touch device gets SDL_TouchID 1 (like on iOS and WinRT).
|
|
86e9ab79
|
2015-06-08T20:46:09
|
|
Linux: Fixed not needed call to close() on error.
It was called if file descriptor was none and -1.
|
|
50981d41
|
2015-06-08T02:58:46
|
|
x11: Drop duplicate XInput2 XI_RawMotion events.
This happens when the pointer is grabbed, but it's not clear if this is a
bug in x.org or my misunderstanding of the XGrabPointer() documentation.
At any rate, we'll want to revisit this later for a better solution.
Fixes Bugzilla #2963.
|
|
7232e51a
|
2015-06-08T01:52:43
|
|
Unix: Don't send quit events during signal handler.
Make note to send it, and send next time we SDL_PumpEvents().
Otherwise, we might be trying to use malloc() to push a new event on the
queue while a signal is interrupting malloc() elsewhere, usually causing a
crash.
Fixes Bugzilla #2870.
|
|
e3f4ca0d
|
2015-06-08T01:13:51
|
|
configure/cmake/x11: Removed SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 test.
This was the only thing that made SDL_config.h generate differently between
32 and 64-bit versions of Linux, so instead we force a function cast in our
X11 code to match our dynamic loader version, which removes the compile error
on some machines that prompted this test in the first place.
Xlib never wrote to this data, so if you're on an older Xlib where this param
wasn't const, your data should still be intact when we force the caller to
think it was actually const after all.
Fixes Bugzilla #1893.
|
|
d98cfe14
|
2015-06-07T20:00:20
|
|
Let's assume that if VS2005 and VS2010 do it, VS2008 probably does, too.
|
|
753f95c5
|
2015-06-07T19:58:42
|
|
VS2005 tweaks (thanks, Ozkan!).
Fixes Bugzilla #2895.
His notes:
The following trivial changes make SDL2 tree (mostly) compatible with Visual
Studio 2005:
* SDL_stdlib.c: Similar to VS2010 and newer, VS2005 also generates memcpy(),
(it also generates memset(), see below), so propagate the #if condition to
cover VS2005.
* SDL_pixels.c (SDL_CalculateGammaRamp): VS2005 generates a memset() call for
gamma==0 case, so replace the if loop with SDL_memset().
* SDL_windowsvideo.h: Include msctf.h only with VS2008 and newer, otherwise
include SDL_msctf.h
* SDL_windowskeyboard.c: Adjust the #ifdefs so that SDL_msctf.h inclusion is
always recognized correctly.
|
|
8bac7967
|
2015-06-07T18:29:23
|
|
Maybe patched to compile on some Windows configurations.
(Maybe) Fixes Bugzilla #3001.
|
|
141ac2b5
|
2015-06-07T17:59:31
|
|
Backed out changeset c6d43e08be34
This caused Bugzilla #2963, so we'll find a better solution.
|
|
699f879a
|
2015-06-07T17:54:39
|
|
Fixed a memory leak (thanks, Zack!).
We should probably rework this piece of code a little more after 2.0.4 ships,
though.
Fixes Bugzilla #3004.
|
|
8a85084f
|
2015-06-06T22:45:22
|
|
RPi: Patched to compile without OpenGL (thanks, Simon!), other cleanups.
Fixes Bugzilla #3003.
|
|
fd8b7c1c
|
2015-06-05T19:41:18
|
|
Fixed comments at conditional compilation macros.
|
|
360d05bf
|
2015-06-04T15:41:39
|
|
X11: Fixed SelectionRequest replies for target TARGETS.
Fixes Google Chrome, etc, freezing up when SDL owns the clipboard selection
and actually sends thems the correct text for pasting. Confirmed working with
Unicode strings in UTF-8 format.
There were a few tweaks in this patch, but the specific fix is that
event.xselection.target in the SelectionNotify event we send back in reply
must be set to the same atom as the request ("TARGETS" in this case), and
we failed to do that in this special case. Things that don't ask for a target,
like the Gnome Terminal app, worked fine because they don't ask for TARGETS
and just go right to asking for a UTF8_STRING, and Mozilla apparently just
was more liberal in what they accepted in reply.
Chrome would reject our wrong reply and freeze up waiting for a valid one.
Someone should fix that in Chrome, too. :)
Fixes Bugzilla #2926.
|
|
7738bd9b
|
2015-06-04T17:52:51
|
|
AIX: Fixed nearly impossible file descriptor leak.
|
|
96aef8cb
|
2015-06-04T10:59:02
|
|
X11: Fixed compiler warnings in DEBUG_XEVENTS sections.
|
|
38549a7b
|
2015-06-04T00:56:11
|
|
Fixed bug 2625 - Direct3D9 with SDL_TEXTUREACCESS_TARGET textures causes an application crash
Roberto
I have debugged the code checking the function calls when Direct3D is the renderer, remember that with software and OpenGL renderers, this issue is not happening.
- Create the texture:
SDL_Texture *pTex = SDL_CreateTexture(pRenderer, iFormat, SDL_TEXTUREACCESS_TARGET, pSurf->w, pSurf->h);
- Update the texture:
SDL_UpdateTexture(pTex, NULL, pSurf->pixels, pSurf->pitch);
SDL_render.c, SDL_UpdateTexture(): return renderer->UpdateTexture(renderer, texture, rect, pixels, pitch);
SDL_render_d3d.c, D3D_UpdateTexture(): if (D3D_UpdateTextureRep(data->device, &texturedata->texture, texture->format, rect->x, rect->y, rect->w, rect->h, pixels, pitch) < 0) {
SDL_render_d3d.c, D3D_UpdateTextureRep(): if (D3D_CreateStagingTexture(device, texture) < 0) {
SDL_render_d3d.c, D3D_CreateStagingTexture(): result = IDirect3DDevice9_CreateTexture(..., D3DPOOL_SYSTEMMEM, ...) --> FAIL! with INVALIDCALL code
After checking a bit the Microsoft documentation, I found this:
D3DUSAGE_RENDERTARGET can only be used with D3DPOOL_DEFAULT. (https://msdn.microsoft.com/en-us/library/windows/desktop/bb172625%28v=vs.85%29.aspx)
The call that fails, is using D3DUSAGE_RENDERTARGET with D3DPOOL_SYSTEMMEM which is unsupported, hence the INVALIDCALL return code.
|
|
ba1263cd
|
2015-06-04T02:12:06
|
|
Backout commit 83034612a883
This caused 8-bit modes to be chosen on older OS X releases.
Fixes Bugzilla #3000.
|
|
e8b376c9
|
2015-06-03T13:11:28
|
|
Linux: Implemented sysfs-based version of SDL_GetPowerInfo().
Fixes Bugzilla #2938.
|
|
36ecb766
|
2015-06-01T01:25:22
|
|
Changed a static function to match the naming scheme of rest of source file.
|
|
05e78b3f
|
2015-05-31T22:59:59
|
|
X11: search all XI2 touch devices, not just masters (thanks, Volumetic!).
Otherwise, you won't find touch devices that aren't currently assigned to a
system cursor.
|
|
554b2b0e
|
2015-05-31T22:48:26
|
|
X11: Fixed message boxes not responding to click on titlebar close button.
The window needs to catch ClientMessage events for one specific window, but
XNextEvent() catches everything, and XWindowEvent doesn't catch ClientMessage,
so we need predicate procedure and XIfEvent() here.
Fixes Bugzilla #2980.
|
|
7619ad34
|
2015-05-31T21:43:36
|
|
Cocoa: deal with mouse focus when warping the cursor from outside a window.
Otherwise, you might not get appropriate mouse enter/leave events.
Better fix for Bugzilla #2984.
|
|
5b2ff76c
|
2015-05-31T13:58:36
|
|
Cocoa: send a MOUSEMOTION event when warping cursor from outside the window.
Fixes Bugzilla #2984.
|
|
551fbf7b
|
2015-05-31T19:22:42
|
|
Android: Changed two unknown keys to be consistent with Windows and X11 mapping.
|
|
80614b27
|
2015-05-31T11:38:10
|
|
Fixed swizzle of SDL_FillRect() on 24-bit surface (thanks, "nagydavid91"!).
Fixes Bugzilla #2986.
|
|
e58a5c43
|
2015-05-31T00:58:43
|
|
X11: Fixed high mouse buttons mappings and horizontal wheels (thanks, Daniel!).
Fixes Bugzilla #2472.
|
|
870df8ad
|
2015-05-31T00:50:30
|
|
Cocoa: ignore mouseDown events in a window's titlebar.
These events accidentally slipping in sometimes appears to be a bug (or
maybe new behavior) in 10.10, as previous versions of Mac OS X don't appear
to ever trigger this.
Thanks to Paulo Marques for pointing out the fix on the SDL mailing list!
Fixes Bugzilla #2842 (again).
|
|
f001a00b
|
2015-05-29T15:21:47
|
|
X11: Force the window focus during ShowWindow if there's no window manager.
Fixes Bugzilla #2997.
|
|
c8881837
|
2015-05-28T19:06:07
|
|
Improved fix for bug 2096 - Mapping from scancode to keycode doesn't work for remapped modifier keys
Zack Middleton
The change to the keymap to use SDL_SCANCODE_TO_KEYCODE in SDL_x11keyboard.c causes all SDL scancodes without a Usc4 character to be XOR'd with SDLK_SCANCODE_MASK, but not all key code are suppose to be (as seen in include/SDL_keycodes.h). SDLK_BACKSPACE is not 0x4000002A.
I think the full list of keys affected are return, escape, backspace, tab, and delete.
|
|
da190975
|
2015-05-28T18:57:10
|
|
Fixed clip rectangle calculation when there is a viewport offset
|
|
6e67c949
|
2015-05-28T12:55:01
|
|
Fixed bug 2054 - SDL_GetError: "Unknown touch device"
Volumetric
The "Unknown touch device" message appears because the initial touch device setup loop uses SDL_GetTouch() as a guard for calling SDL_AddTouch(). SDL_GetTouch() will always report "Unknown touch device" since the device hasn't been added yet. The SDL_GetTouch() call is unnecessary since SDL_AddTouch() calls SDL_GetTouchIndex() to verify that the device hasn't been added yet, and SDL_GetTouchIndex() has the benefit of not reporting an error for a device it can't find.
|
|
32d6dcdb
|
2015-05-28T12:48:20
|
|
Fixed bug 2096 - Mapping from scancode to keycode doesn't work for remapped modifier keys
Jacob Lee
If a user has a non-standard keyboard mapping -- say, their caps lock key has been mapped to Ctrl -- then SDL_GetModState() is no longer accurate: it only considers the unmapped keys. This is a regression from SDL 1.2.
I think there are two parts to this bug: first, GetModState should use keycodes, rather than scancodes, which is easy enough.
Unfortunately, on my system, SDL considers Caps Lock, even when mapped as Control, to be both SDL_SCANCODE_CAPSLOCK and SDLK_CAPSLOCK. The output from checkkeys for it is:
INFO: Key pressed : scancode 57 = CapsLock, keycode 0x40000039 = CapsLock modifiers: CAPS
Whereas the output for xev is:
KeyPress event, serial 41, synthetic NO, window 0x4a00001,
root 0x9a, subw 0x0, time 40218333, (144,177), root:(1458,222),
state 0x10, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
I think the problem is that X11_UpdateKeymap in SDL_x11keyboard.c only builds a mapping for keycodes associated with a Unicode character (anything where X11_KeyCodeToUcs returns a value). In the case of caps lock, SDL scancode 57 becomes x11 keycode 66, which becomes x11 keysym 65507(Control_L), which does not have a unicode value.
To fix this, I suspect that SDL needs a mapping of the rest of the x11 keysyms to their corresponding SDL key codes.
|
|
4d1626d0
|
2015-05-28T15:36:27
|
|
Windows SDL_GetBasePath: free string on failure.
|
|
aa43bee4
|
2015-05-28T15:32:45
|
|
Windows GetBasePath: fixed reallocation code.
|
|
f9abea20
|
2015-05-28T12:31:25
|
|
Fixed bug 2210 - Initializing Video produces unnecessary errors
hiduei
Overview:
Initializing the Video Subsystem causes many errors though everything works as it should.
Steps to Reproduce:
1) Set Loglevel to SDL_LOG_PRIORITY_ERROR
2) Initialize the Video Subsystem (SDL_Init(SDL_INIT_VIDEO))
Actual Results:
Many errors (see attachment) are printed on stderr, then the application continues as expected.
Expected Results:
The errors should have been warnings at most.
|
|
566316e0
|
2015-05-28T15:29:43
|
|
Windows SDL_GetBasePath: Fixed wrong variable when growing the buffer size.
|
|
6a3ad8a9
|
2015-05-28T12:18:05
|
|
Fixed bug 2367 - Bad mouse motion coordinates with two windows where one has changed logical size
Andreas Ragnerstam
I have two windows where one has a renderer where the logical size has been changed with SDL_RenderSetLogicalSize. When I get SDL_MOUSEMOTION events belonging to the non-scaled window these will have been scaled with the factor of the scaled window, which is not expected.
Adding some printf debugging to SDL_RendererEventWatch of SDL_render.c, where (event->type == SDL_MOUSEMOTION), I found that for every mouse motion SDL_RendererEventWatch is called twice and the event->motion.x and event.motion.y are set twice for the event, once for each renderer where only the last one set will be saved to the event struct. This will work fine if both renderers have the same scale, but otherwise the motion coordinates will be scaled for the renderer belonging to another window than the mouse was moved in.
I guess one solution would be to check that window == renderer->window for SDL_MOUSEMOTION events, similar to what is done for when SDL_WINDOWEVENT events.
I get the same error on both X11 and Windows.
The same problem also exists for SDL_MOUSEBUTTONDOWN and SDL_MOUSEBUTTONUP events.
|
|
bccc2ad0
|
2015-05-28T12:06:48
|
|
Fixed compiling and tested on Windows
|
|
75702ffe
|
2015-05-28T14:34:38
|
|
Make sure we have the vsscanf() prototype (thanks, Ozkan!).
issue seen with glibc-2.8.
Fixes Bugzilla #2721.
|
|
cb24f4de
|
2015-05-28T10:44:46
|
|
Fixed bug 2772 - SDL2 doesn't handle X KeymapNotify events
Jason Wyatt
Currently the keymapnotify event handling is commented out as FIXME in SDL_x11events.c (It looks like this may have functioned SDL1.2).
Not handling this event means that if a window manager shortcut such as ALT+SPACE is used, SDL will send an ALT key down signal, but not an up signal. Also querying SDL about the key state, it believes the ALT key remains pressed.
X passes the events keypress (alt), ?focusout?, ?focusin?, keymapnotify.
|
|
719bb6fc
|
2015-05-28T09:52:48
|
|
Fixed X11 build, added code to print initial modifiers to checkkeys
|
|
0694baf2
|
2015-05-28T09:33:47
|
|
Fixed bug 2736 - X11 doesn't set KMOD_NUM and KMOD_CAPS to system state
Zack Middleton
Using X11 (on Debian Wheezy), SDL_GetModState() & KMOD_NUM and KMOD_CAPS are not set to system state (numlock/capslock LEDs). Pressing numlock or capslock toggles the mod state, though if num/caps lock is enabled before starting the program it's still reversed from system state. This makes getting KMOD_NUM and KMOD_CAPS in programs unreliable. This can be seen using the checkkeys test program.
The function that appears to have handle this in SDL 1.2 is X11_SetKeyboardState. The function call is commented out with "FIXME:" in SDL 2.
Using Windows backend through WINE; on first key press if numlock and/or capslock is enabled on system, numlock/capslock SDL_SendKeyboardKey is run and toggles KMOD_NUM/KMOD_CAPS to the correct state. On X11 this does not happen.
The attached patch makes X11 backend set keyboard state on window focus if no window was previously focused. It sets all keys to system up/down state and toggles KMOD_NUM/KMOD_CAPS via SDL_SendKeyboardKey to match system if needed. The patch is based on SDL 1.2's X11_SetKeyboardState.
|
|
779d4035
|
2015-05-28T08:51:59
|
|
Fixed Windows build
|
|
0669a224
|
2015-05-28T08:41:07
|
|
Fixed bug 2860 - SetProp must be paired with RemoveProp especially for properties added to external windows
Coriiander
Upon creating a window, a window property is added to it through the Win32-function "SetProp". This is done in the SDL-function "SetupWindowData" in file "src\video\windows\SDL_windowswindow.c".
Whenever you call "SetProp" to add a property to a Win32-window, you should also call the Win32-function "RemoveProp" to remove it before destroying that Win32-window.
While you might think that it's ok and that Windows will clean up nicely itself, it is not ok. It is against all Win32-API guidelines and is mostlikely a leak. Especially on external windows (CreateWindowFrom) you want to have things done right, not messy and leaky, affecting some other module. Even if SDL gets shutdown entirely that external window will now forever still have the "SDL_WindowData" prop attached to it.
|
|
6d1ad384
|
2015-05-28T01:54:52
|
|
Windows GetBasePath should use GetModuleFileNameExW() and check for overflows.
Apparently you might get strange paths from GetModuleFileName(), such as
short path names or UNC filenames, so this avoids that problem. Since you have
to tapdance with linking different libraries and defining macros depending on
what Windows you plan to target, we dynamically load the API we need, which
works on all versions of Windows (on Win7, it'll load a compatibility wrapper
for the newer API location).
What a mess.
This also now does the right thing if there isn't enough space to store the
path, looping with a larger allocated buffer each try.
Fixes Bugzilla #2435.
|
|
84ce0006
|
2015-05-28T01:27:24
|
|
I think this will be the time...
|
|
7964f3ad
|
2015-05-28T01:22:14
|
|
Still trying to get this to compile...
|
|
cae4fd7f
|
2015-05-28T01:16:55
|
|
More patching to compile...
|
|
e90f87ba
|
2015-05-28T01:08:33
|
|
Another attempt to get this to compile.
|
|
4add1694
|
2015-05-28T01:02:03
|
|
Patched to compile on MingW.
(I think!)
|
|
58447b24
|
2015-05-28T00:54:52
|
|
Move tests from SDL_config higher up in Windows joystick/haptic code.
Fixes Bugzilla #2932.
|
|
2a757825
|
2015-05-28T00:30:21
|
|
X11: Add Xdbe support to message boxes (thanks, Melker!).
Without this, message boxes with a lot of text will noticibly flicker as
you mouse over buttons.
Fixes Bugzilla #2343.
|
|
bea1854c
|
2015-05-27T19:00:56
|
|
Patched to compile on C89 compilers.
|
|
9c343681
|
2015-05-27T18:54:06
|
|
Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934.
|
|
7f17e0ab
|
2015-05-27T10:29:43
|
|
Fixed detecting PS4 wired controller on Windows
|
|
80cfccbf
|
2015-05-26T22:57:42
|
|
Back out changeset b80349dd6d40.
This change didn't do what I thought it did, sorry.
|
|
059a0307
|
2015-05-26T21:30:41
|
|
Uh, yeah, it helps to press "Save" before committing...
|
|
c69a5592
|
2015-05-26T21:29:45
|
|
X11: generate clipboard update events (thanks, "chw"!).
Partially fixes Bugzilla #2266.
|
|
cc493d71
|
2015-05-26T21:26:27
|
|
X11: use XA_STRING for text SDL puts on the clipboard (thanks, "chw"!).
Partially fixes Bugzilla #2266.
|
|
baea64e6
|
2015-05-26T21:19:23
|
|
Stack hint should look for 0, not -1, and not care about environment variables.
|
|
a8fa7bd1
|
2015-05-26T21:13:27
|
|
Added a hint to specify new thread stack size (thanks, Gabriel!).
Fixes Bugzilla #2019.
(we'll do a better fix when we break the API in SDL 2.1.)
|
|
21d0cded
|
2015-05-26T20:55:03
|
|
Added some unknown keys from Japanese 106/109 keyboards (thanks, "ver0hiro"!).
This adds them for Windows and X11.
Fixes Bugzilla #2820.
|
|
262e8ef3
|
2015-05-26T21:51:47
|
|
Mac: Send a window resize event when the window's backing scale factor changes.
The backing scale factor can change when the window moves between retina and non-retina displays.
The only other way to detect such a change is to compare the output of SDL_GL_GetDrawableSize or SDL_GetRendererOutputSize every frame, which is less than desirable, especially since the necessary app logic is likely already being executed when a window resize event is received.
|
|
be89fa09
|
2015-05-26T20:49:27
|
|
Reset the keyboard state when launching a message box (thanks, Sean!).
Otherwise, pressed keys get stuck.
Fixes Bugzilla #2776.
|
|
41908548
|
2015-05-26T20:40:00
|
|
Windows: Alt-F4 hotkey should be checked on keydown, not keyup (thanks, Matt!).
Fixes Bugzilla #2780.
|
|
72a244da
|
2015-05-26T20:36:45
|
|
Android: Added basic drop file support (thanks, "noxalus"!).
This lets SDL-based apps respond to "Open With" commands properly, as they
can now obtain the requested path via a standard SDL dropfile event.
This is only checked on startup, so apps don't get drop events at any other
time, even if Android supports that, but this is still a definite
improvement.
Fixes Bugzilla #2762.
|
|
ae6555df
|
2015-05-26T20:22:14
|
|
Pump IBus events after X events.
|
|
a4f0daed
|
2015-05-26T19:34:56
|
|
EGL: OpenGL ES 3.0 contexts can now be created without the EGL_KHR_create_context extension.
Fixes bugzilla #2994.
|
|
d5a57853
|
2015-05-26T16:42:36
|
|
Drop out of SDL_UpdateTexture() early if the rectangle is zero pixels.
Hopefully makes static analysis happy about a zero-byte malloc elsewhere.
|
|
2e2b84fb
|
2015-05-26T16:31:11
|
|
Some setups need _GNU_SOURCE to make LLONG_MAX available (thanks, Ozkan!).
Fixes Bugzilla #2721.
|
|
59f69f63
|
2015-05-26T16:14:25
|
|
Whoops, fix the static analysis fix.
|
|
d1980b93
|
2015-05-26T12:52:28
|
|
Mac: Fix compiler warning when building with a min target >= 10.6.
|
|
37f4eb53
|
2015-05-26T12:47:03
|
|
Darwin haptic: Fixed a static analysis warning if axes==0.
|
|
f99d6e1d
|
2015-05-26T12:03:51
|
|
Linux joystick: Look at entire axis namespace for controls (thanks, "spaz16"!).
This apparently has fallout: the PS4 (and maybe PS3?) controllers apparently
report some bogus axes, but it won't change the axes we currently expect, and
thus the game controller config string is still stable.
Fixes Bugzilla #2719.
|
|
52306459
|
2015-05-26T08:52:02
|
|
Fixed bug 2869 - Controllers connected on launch are reported twice.
Since all device detection/removal happens on the main thread now, post events inline with when the status changes occur.
Also fixed rare cases when joystick API functions could return data about removed joysticks when called with a device index.
|
|
80916e01
|
2015-05-26T11:38:04
|
|
Cocoa: Fixed relative mouse mode when app loses/regains focus (thanks, Eric!).
Fixes Bugzilla #2718.
|
|
b11b3493
|
2015-05-26T11:08:30
|
|
Windows: don't beep on Alt-* key combos (Thanks, historic_bruno!).
Fixes Bugzilla 2669.
|
|
bb437f02
|
2015-05-26T11:01:19
|
|
Cocoa: report SDL_WINDOWEVENT_EXPOSED events to the app (thanks, David!).
Fixes Bugzilla #2644.
|
|
aba4d783
|
2015-05-26T10:25:15
|
|
Don't look for (and fail without) glGetIntegerv() until we need to.
Fixes Bugzilla #2615.
|
|
22704ac2
|
2015-05-26T09:55:41
|
|
Cocoa: don't fail outright if we see an unknown display format.
Just treat it as ARGB8888.
|
|
2c4a6ea0
|
2015-05-26T06:27:46
|
|
Updated the copyright year to 2015
|
|
507157ab
|
2015-05-25T16:22:09
|
|
Wait for devices to finish initializing when inserted, before using them. Fixes hotplug issue with XBox 360 game controller.
|
|
b0c5e201
|
2015-05-25T14:52:41
|
|
Added support for Razer Serval Bluetooth mode
|
|
63653814
|
2015-05-20T16:28:21
|
|
Added game controller support for the Razer Serval
|