|
6b3e8931
|
2018-09-14T19:26:26
|
|
Added hints SDL_HINT_MOUSE_DOUBLE_CLICK_TIME and SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to allow tuning double-click sensitivity.
Also increased the default double-click radius to 32 pixels to be more forgiving for touch interfaces
|
|
0b3a350c
|
2018-09-10T23:01:33
|
|
Fixed Chinese IME support (thanks ???!)
|
|
af823cc1
|
2018-09-10T23:00:09
|
|
Fixed building on tvOS
|
|
404ba5ee
|
2018-08-28T13:37:11
|
|
Fixed bug 4229 - Add support for ABGR format in DirectFB renderer
Alexandre
DirectFB supports 32-bit ABGR pixel format via DSPF_ABGR, but SDL doesn't map SDL_PIXELFORMAT_ABGR8888 to DSPF_ABGR.
A patch is attached and should add support for ABGR pixel format devices.
|
|
a1ca8441
|
2018-08-26T20:37:23
|
|
Update the cursor clipping each frame, in case it was stolen by another application.
|
|
15b3794f
|
2018-08-26T10:34:23
|
|
Only reset the clip rect if it's currently the rect we previously clipped.
This prevents us from clearing the clip rect globally when another application has set it.
There's also an experimental change to regularly update the clip rect for a window defensively, in case someone else has reset it. It works well, but I don't know if it's cheap enough to call as frequently as it would be called now, and might have other undesirable side effects.
Also fixed whitespace and SDL coding style
|
|
a794126d
|
2018-08-24T09:49:48
|
|
vulkan: SDL_Vulkan_GetInstanceExtensions should accept a NULL window.
Fixes Bugzilla #4235.
|
|
088070e5
|
2018-08-22T23:47:29
|
|
Moved display orientation handling on iOS out to a separate function for Qt apps
|
|
f225af0c
|
2018-08-22T21:48:28
|
|
Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes.
Documented the values returned by the accelerometer and gyroscope sensors
|
|
6f758ad2
|
2018-08-21T20:03:54
|
|
Moved SDL_IsTablet() to a cross-platform API function
|
|
109544ca
|
2018-08-21T11:23:47
|
|
Add SDL_IsTablet() to Android and iOS SDL.
|
|
aeea6b9b
|
2018-08-18T12:30:04
|
|
Emscripten: Fixed SDL_SYSTEM_CURSOR_SIZEALL
|
|
941c5b47
|
2018-08-07T18:07:11
|
|
haiku: Rename internal functions from BE_* to HAIKU_*
Fixes Bugzilla #2349.
|
|
e061a92d
|
2018-08-02T16:03:47
|
|
Some drag'and'drop improvements.
First: disable d'n'd events by default; most apps don't need these at all, and
if an app doesn't explicitly handle these, each drop on the window will cause
a memory leak if the events are enabled. This follows the guidelines we have
for SDL_TEXTINPUT events already.
Second: when events are enabled or disabled, signal the video layer, as it
might be able to inform the OS, causing UI changes or optimizations (for
example, dropping a file icon on a Cocoa app that isn't accepting drops will
cause macOS to show a rejection animation instead of the drop operation just
vanishing into the ether, X11 might show a different cursor when dragging
onto an accepting window, etc).
Third: fill in the drop event details in the test library and enable the
events in testwm.c for making sure this all works as expected.
|
|
8f0cc4a4
|
2018-07-22T19:42:08
|
|
Backed out changeset 2e42ec46061e.
This change isn't correct. See comments in Bugzilla #4183.
|
|
862aa4b4
|
2018-07-22T19:28:27
|
|
windows: Fixed some Visual Studio warnings about shadowed variables.
Fixes Bugzilla #4118.
|
|
c3178e67
|
2018-07-12T16:52:45
|
|
Ensure we still clear the X locale modifiers even if not compiled with ibus or fcitx support
|
|
013b146d
|
2018-06-30T20:55:51
|
|
SDL_windowstaskdialog.h (struct _TASKDIALOGCONFIG): make unions anonymous
otherwise build fails. (at least with my VS2005. and the code accesses the
arms of the unions anonymously anyway.)
|
|
7c2028f8
|
2018-06-29T16:56:11
|
|
Attempt to fix "cast from pointer to integer of different size" warnings.
|
|
5a8ecf4e
|
2018-06-25T13:14:52
|
|
yuv: Patched to make static analysis happy (warned about unused variable).
|
|
c8ac9096
|
2018-06-24T22:42:36
|
|
wayland: Implemented xdg-wm-base support.
This is just in parity with the existing zxdg-shell-unstable-v6 code. Making
the Wayland target robust (and uh, with title bars) is going to take a lot
of work on top of this.
|
|
59574fe2
|
2018-06-24T13:57:22
|
|
x11: Normalize x11xinput2 touch x to be 1.0 at width (thanks, Zach!).
"Applications (such as SDL's testgesture) do "event.tfinger.x * window_width"
to find window coord. Currently the X11 XInput2 backend expects application
to do "event.tfinger.x * (window_width-1)" instead.
X11 XInput2 touch events are normalized so x is 1.0 at "width - 1" but other
SDL backends appear to have x be 1.0 at "width". Same issue for touch event
y with regards to height."
Fixes Bugzilla #4183.
|
|
88dfa466
|
2018-06-18T13:14:04
|
|
Use a blank cursor instead of PointerIcon.TYPE_NULL since that shows the default cursor on Samsung DeX
|
|
fe682827
|
2018-06-14T06:12:12
|
|
egl: Don't change context when deleting current.
If we change the current context behind the app's back, those tracking
the current context to minimize context changes are going to get
confused.
This brings the EGL backend in line with the GLX one.
Fixes Bugzilla #4199.
|
|
4a4bac95
|
2018-06-12T13:22:58
|
|
Deal with fullscreen limitations under windowed Android environments (Chromebook, DeX, etc.) (Thanks Rachel!)
|
|
fe196db7
|
2018-06-07T17:07:03
|
|
Track android device panel width & height as well as window surface & height.
Expand SDLActivity::SDLSurface::surfaceChanged() callback to grab the panel width and height at the same time and pass that along to the native code. Only works on API 17+. Duplicates surface dimensions whenever it fails.
Add Android_DeviceWidth/Android_DeviceHeight globals to native code.
Disambiguate Android_ScreenWidth/Android_ScreenHeight -> Android_SurfaceWidth/Android_SurfaceHeight
Use device width/height for all display mode settings.
|
|
2dedbc72
|
2018-06-05T12:46:11
|
|
Add Android support for relative mouse mode to SDL.
|
|
9d6ac3de
|
2018-06-05T12:46:09
|
|
Fix creating a minimized window in SDL to not cause focus to be stolen (because ShowWindow( hwnd, SW_MINIMIZE ) would be called after creation, thus changing focus to the prior window based on some per-app list in windows, rather than the window being created with WS_MINIMIZED to start with).
This means we have to consider SDL_WINDOW_MINIMIZED a window creation flag, but on non-windows platforms we just remove it and let the normal FinishWindowCreation re-apply and do the minimize as I have no idea what is right on them or if anything should change.
CR: Phil
|
|
3d387098
|
2018-05-27T20:30:03
|
|
metal: contrary to documentation, we need to set the drawableSize explicitly.
Fixes Bugzilla #4149.
|
|
999af809
|
2018-05-18T13:09:30
|
|
Merged latest changes from Steam Link app
|
|
a4d0571e
|
2018-05-07T20:10:12
|
|
Reverted change for bug 4152 - restrict the win10 mouse bug workaround to win10 v1709 only
Daniel Gibson
Sorry, but it seems like Microsoft didn't fix the issue properly.
I just updated my Win10 machine, it now is Version 1803, Build 17134.1
I tested with SDL2 2.0.7 (my workaround was released with 2.0.8) and still got
lots of events that directly undid the prior "real" events - just like before.
(See simple testcase in attachement)
By default it sets SDL_HINT_MOUSE_RELATIVE_MODE_WARP - which triggered (and on my machine still triggers) the buggy behavior. You can start it with -raw, then it'll not set that hint and the events will be as expected.
The easiest way to see the difference is looking at the window title, which shows accumulated X and Y values: If you just move your mouse to the right, in -raw mode the number just increases. In non-raw mode (using mouse warping) it stays around 0.
I also had a WinAPI-only testcase: https://gist.github.com/DanielGibson/b5b033c67b9137f0280af9fc53352c68
It just calls SetCursorPos(320,240); on each WM_MOUSEMOVE event, and it also
logs all those events to a mouseevents.log textfile.
This log indeed looks a bit different since the latest Win10 update: It seems like all those events with x=320 y=240 do arrive - but only after I stopped moving the mouse - even though the cursor seems to be moved back every frame (or so).
So moving the mouse to the right gives X coordinates like
330, 325, 333, 340, 330, ...
and then when stopping movement I get lots of events with X coordinate 320
|
|
606c5a58
|
2018-05-05T10:27:53
|
|
Fixed bug 4152 - Windows 10 v1803 update seems to have fixed the jumping mouse bug (see bug #3931.)
|
|
386790ef
|
2018-04-23T22:29:14
|
|
Improved error messages when Vulkan isn't configured (thanks Daniel Gibson!)
|
|
2df59062
|
2018-04-15T17:42:09
|
|
wayland: zxdg_shell_v6 needs a configure event before using a surface at all.
Fixes Bugzilla #4109.
Fixes Bugzilla #4119.
|
|
6a0ef0cd
|
2018-04-09T10:37:31
|
|
SDL:
On Windows, have SDL_ShowWindow() not activate the window if the window has the WS_EX_NOACTIVATE window flag.
|
|
4d78a995
|
2018-03-26T12:38:29
|
|
Fixed bug where an SDL window that was activated while hidden could never be shown.
Test code:
{
SDL_Window *win = SDL_CreateWindow( "Dummy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 128, 128, SDL_WINDOW_HIDDEN );
SDL_SysWMinfo info;
SDL_VERSION( &info.version );
SDL_GetWindowWMInfo( win, &info );
SetActiveWindow( info.info.win.window );
{
DWORD then = SDL_GetTicks();
while ( ( SDL_GetTicks() - then ) < 3000 )
{
SDL_Event evt;
SDL_PollEvent( &evt );
}
SDL_ShowWindow( win );
then = SDL_GetTicks();
while ( ( SDL_GetTicks() - then ) < 3000 )
{
SDL_Event evt;
SDL_PollEvent( &evt );
}
}
SDL_DestroyWindow( win );
}
|
|
e14278ef
|
2018-03-24T10:26:40
|
|
Fixed bug 3804 - Message box on Windows truncates button ID
Simon Hug
I just wanted to fix a simple compiler warning in SDL_ShowMessageBox on Windows (which Sam fixed recently) and ended up finding some issues.
Attached patch fixes these issues:
- Because Windows only reports the lower 16 bits of the control identifier that was pushed, the button IDs used by SDL (C type int, most likely 32 bits) can get cut off.
- The documentation states (somewhat ambiguously) that the button ID will be -1 if the dialog was closed, but the current code sets 0. For SDL 2.1, I think this should be a return code of SDL_ShowMessageBox itself. That will free up the button ID and it seems a more appropriate place for signaling this event.
- Ampersands in controls will create mnemonics on Windows (underlined letters that, if combined with the Alt key, will push the button). I was thinking of adding a hint or flag to let the users enable it, but that might have unexpected results.
- When the size of the text gets calculated, it doesn't use the same parameters as the static control. This can cut off text or wrap it weirdly.
- On Windows, the Tab key is used to switch between control groups and sometimes between buttons in dialogs. This didn't seem to work correctly.
Attached patch also adds:
- Icons. Just the system ones that can be loaded with the ordinals IDI_ERROR, IDI_WARNING and IDI_INFORMATION.
- A button limit of 2^16 - 101.
- Some more specific error messages, but they never reach the user because how SDL_ShowMessageBox handles them if an implementation returns with an error.
|
|
f536fbea
|
2018-03-16T11:08:53
|
|
Reimplemented Android cursor API support using reflection so it builds with older SDKs
|
|
e20d4173
|
2018-03-15T18:22:48
|
|
Added Android custom cursor implementation
This is commented out in SDLActivity.java, with the note #CURSORIMPLEENTATION because it requires API 24, which is higher than the minimum required SDK
|
|
cc7b2fc5
|
2018-03-10T21:13:50
|
|
Temporary fix for bug 3432 - macOS 10.12: small scrolls (1 wheel notch) don't generate events
Eric Wasylishen
This bug was reintroduced by https://hg.libsdl.org/SDL/rev/fcf24b38a28a
The steps to reproduce are the same: run the "testrelative" SDL demo with "--info all",
connect a USB mouse with a scroll wheel, and roll the scroll wheel one "notch". You'll get log output like:
testdraw2[1644:67222] INFO: SDL EVENT: Mouse: wheel scrolled 0 in x and 0 in y (reversed: 1) in window 1
As far as I can tell macOS doesn't have an API for getting the number of "wheel notches"; I get a deltaY of 0.100006 for one "notch", and it's heavily accelerated (if you roll the wheel quickly you'll get large deltas). So NSEvent's deltaY is only meant to be used for scrolling a scroll view, with the given distance in points, not something like selecting an item in a game.
Here's a temporary patch that at restores the foor/ceil in Cocoa_HandleMouseWheel.
Not ideal, but at least it restores the ability to scroll one notch of a mousewheel.
|
|
2419d267
|
2018-03-02T22:53:25
|
|
Progress fixing bug 4100 - errors and warnings after changeset 11917
Ozkan Sezer 2018-03-02 20:02:37 UTC
http://hg.libsdl.org/SDL/rev/d702b0c54e52 resulted in an error and
two warnings when compiled with mingw.
1. Error from SDL_windowstaskdialog.h:
In file included from src/video/windows/SDL_windowsmessagebox.c:29:0:
src/video/windows/SDL_windowstaskdialog.h:23:54: error: expected ')' before 'HWND'
This is fixed by removing unnecessary annotations:
2. Warning from SDL_assert.c:
src/SDL_assert.c: In function 'SDL_ExitProcess':
src/SDL_assert.c:138:1: warning: 'noreturn' function does return
Indeed ExitProcess() is prototyped with DECLSPEC_NORETURN, but
TerminateProcess() is not. This can be rectified by adding an
exit() call in there. Do NOTE, however, that requires building
with a libc:
3. Warning from SDL_windowsmessagebox.c:
src/video/windows/SDL_windowsmessagebox.c: In function 'WIN_ShowMessageBox':
src/video/windows/SDL_windowsmessagebox.c:513:9: warning: 'nCancelButton' may be used uninitialized in this function
My lazy solution was manually initializing nCancelButton to 0.
|
|
ac2d1f67
|
2018-03-02T12:08:18
|
|
Fixed setting the layer drawable size
Without this change the drawable had a size of 0 and the metal renderer asserted because the projection matrix wasn't set.
|
|
cef1c1c2
|
2018-03-02T14:10:25
|
|
windows: Restore patches for Task Dialogs and TerminateProcess().
2.0.8 has shipped, these can live in revision control now!
|
|
3537c3e7
|
2018-02-28T10:39:41
|
|
Back out Task Dialog and TerminateProcess patches for 2.0.8.
These can return to revision control once we ship.
|
|
6a1cfcce
|
2018-02-28T02:14:15
|
|
windows: dos2unix'd messagebox code, and (hopefully) fixed on MingW.
|
|
a749035f
|
2018-02-28T01:54:22
|
|
windows: Message boxes use Task Dialogs if possible (thanks, Jack!).
This lets the message box have an icon. Unless the app has opted-in to using
the v6 common controls, though, this will fall back to the usual SDL message
boxes.
|
|
be6ca785
|
2018-02-25T23:02:09
|
|
Support official Vulkan SDK for macOS.
This tries to load vulkan.framework or libvulkan.1.dylib before MoltenVK.framework
or libMoltenVK.dylib. In the previous version, layers would not work for applications
run-time loading the default library.
|
|
849d042f
|
2018-02-24T08:58:22
|
|
Fixed bug 4091 - Undefined references to Android audio functions when SDL_AUDIO_DISABLED is on
Manuel Sabogal
If SDL is compiled with the Audio subsystem disabled there are some undefined references to the functions ANDROIDAUDIO_ResumeDevices and ANDROIDAUDIO_PauseDevices in the file src/video/android/SDL_androidevents.c.
|
|
0626486e
|
2018-02-23T19:12:04
|
|
Backout the vulkan change in d449dea10fc8 breaks Mir builds
|
|
e17c3219
|
2018-02-23T11:24:26
|
|
mir: Disable Mir by default as Mir supports Wayland clients
Also remove enabling VK support for Mir
|
|
ac309df7
|
2018-02-21T22:27:09
|
|
vulkan: Possibly fix a compiler warning (-Wstrict-prototypes).
|
|
69958441
|
2018-02-21T09:58:21
|
|
Fix high-dpi support on macOS and simplify it and iOS variant.
The detault drawableSize for a CAMetalLayer is its bounds x its scale.
So it is sufficient to set the *layer's* scale to the desired value.
|
|
2ea4419a
|
2018-02-17T20:18:48
|
|
yuv: patched to compile.
|
|
7c0c2c22
|
2018-02-17T20:10:13
|
|
yuv: fixed variable declaration shadowing warnings.
Fixes Bugzilla #4062.
|
|
6867f618
|
2018-02-16T14:56:28
|
|
video: put a spinlock around a global linked list.
This should only contend if you're allocating or freeing surfaces from
multiple threads at once, and then just for a short time.
Fixes Bugzilla #4084.
|
|
8ddebfa0
|
2018-02-16T10:23:10
|
|
Fixed bug 4085 - X11: Allow configuring _NET_WM_BYPASS_COMPOSITOR through SDL hints
Callum McGing
This patch allows the user to disable the behaviour that blocks the compositor through a new hint: SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR. This allows tools or other windowed applications to behave properly under KWin.
|
|
5abd7d16
|
2018-02-13T22:58:20
|
|
Don't attempt WM_NCCALCSIZE adjustment when in fullscreen window transition
|
|
40b27fd5
|
2018-02-12T17:00:00
|
|
revert the recent typecast assignment changes (see bug #4079)
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h into generic function
pointer typedefs.
|
|
8a1ae708
|
2018-02-12T10:00:00
|
|
kill C99'ism in SDL_waylandvulkan.c
|
|
6e01fbb7
|
2018-02-11T18:23:37
|
|
On Android show the system UI when an SDL window is windowed, hide the system UI when it's fullscreen, like we do on iOS.
We're increasing the Android SDK minimum version to API 19, this doesn't increase the minimum target API, which is API 14.
|
|
873141ac
|
2018-02-11T15:29:36
|
|
ISO C correct fix for casting void* to function pointer
|
|
882215e1
|
2018-02-11T18:16:01
|
|
vulkan: Fix assignment of vkGetInstanceProcAddr on Windows.
"*(void**)pfn = LoadAddress()" would cast the NULL pointer in pfn to a
void**, and then dereference it, which wasn't what we wanted. Replaced with
a clearer cast operation.
|
|
7b50aee9
|
2018-02-08T18:07:14
|
|
Fixed min/max window size handling for borderless resizable windows
|
|
940933d8
|
2018-02-07T15:05:30
|
|
Fixed bug 4054 - Raspberry Pi refresh rate detection
Viacheslav Slavinsky
SDL_rpivideo driver has 60 frames per second hardcoded in it, this is a problem for games that need to keep pace using VSYNC. I believe that I have found a solution to this. It is based on code in tvservice.c in rpi userland:
https://github.com/raspberrypi/userland/blob/a1b89e91f393c7134b4cdc36431f863bb3333163/host_applications/linux/apps/tvservice/tvservice.c#L433
|
|
bd0def06
|
2018-02-07T14:12:26
|
|
Set rpath instead of changing environment for RPi
Credit goes to Adrian Perez de Castro for the improvement.
Signed-off-by: Guillermo A. Amaral <g@maral.me>
|
|
cd532207
|
2018-02-07T13:13:55
|
|
wayland: Add support for xdg-shell protocol (unstable v6).
This is meant to be the desktop-enhanced version of wl_shell. Right now we
just match what the existing wl_shell code does, but there are other areas of
functionality available to us now, that we can fill in later.
This uses the "unstable" API, since this is what ships in Ubuntu 17.10 (as
part of Wayland 1.10), but Wayland 1.12 promotes this to stable with extremely
minor changes. We will add support for the stable version when it makes sense
to do so.
|
|
73c26c20
|
2018-02-06T16:43:31
|
|
Send Apple TV remote input as key events unless it's opened as a joystick, to match Android behavior.
|
|
f59b9c8b
|
2018-02-06T15:03:38
|
|
Replaced SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS with SDL_HINT_TV_REMOTE_AS_JOYSTICK which controls whether remotes on iOS and Android are interpreted as joysticks (the default) or as return/escape/arrow keys.
|
|
35322ed8
|
2018-02-01T15:46:51
|
|
Fixed building on tvOS
|
|
85c34e9a
|
2018-02-01T15:21:01
|
|
Added SDL_HINT_IOS_HIDE_HOME_INDICATOR to determine how the home indicator on the iPhone X is handled.
This variable can be set to the following values:
"0" - The indicator bar is not hidden (default for windowed applications)
"1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
"2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
|
|
90e72bf4
|
2018-01-30T18:08:34
|
|
Fixed ISO C99 compatibility
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
|
|
2d7420f2
|
2018-01-25T11:12:20
|
|
Fixed bug 3985 - SDL_CreateWindow() has stopped changing screen mode when SDL_WINDOW_FULLSCREEN is used
Anthony
This worked in 2.0.5 as normal, but stopped working in 2.0.7. The monitor's resolution doesn't change, a window is created in full screen mode at the virtual desktop resolution instead.
|
|
9338a619
|
2018-01-17T17:24:15
|
|
Added a hint SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS to prevent turning Apple TV remote swipes into arrow key events
|
|
35554caf
|
2018-01-17T13:17:10
|
|
Make rpi video cross-compiler friendly.
* Stops using fixed path to find GLES/EGL libs.
* Tries pkg-config to locate bcm_host.
Signed-off-by: Guillermo A. Amaral <g@maral.me>
|
|
509db8af
|
2018-01-17T13:12:39
|
|
Fixed formatting, added actual count to SDL error message
|
|
61261e59
|
2018-01-16T21:29:32
|
|
EGL: Request sRGB framebuffer in correct place.
The EGL_GL_COLORSPACE_KHR is an attribute for eglCreate*Surface.
As written in EGL_KHR_gl_colorspace documentation:
Accepted as an attribute name by eglCreateWindowSurface,
eglCreatePbufferSurface and eglCreatePixmapSurface
EGL_GL_COLORSPACE_KHR 0x309D
(...)
|
|
0cba6847
|
2018-01-15T10:29:53
|
|
Fixed bug 4043 - SDL_windowswindow.c incorrect icon height
Needed to allocate space for the mask in the ICONIMAGE structure
|
|
f9bdce61
|
2018-01-14T13:34:50
|
|
Vulkan: Allow SDL_Vulkan_GetInstanceExtensions to be called with a larger array than necessary.
|
|
7cd39b7d
|
2018-01-13T01:58:11
|
|
Mir: Handle close window events
|
|
a0c4eb2a
|
2018-01-10T18:00:51
|
|
Restored borderless window behavior where DOTA created a borderless window the size of the desktop and expected it to behave like a fullscreen desktop window.
A future SDL release will change the borderless window to act more like a normal window that happens to have no chrome, to support windows that draw their own chrome. In the meantime, those applications should set the "SDL_BORDERLESS_WINDOWED_STYLE" hint.
|
|
66baf736
|
2018-01-03T11:31:42
|
|
Fixed spacing in copyright headers
|
|
7c60bec4
|
2018-01-03T10:58:58
|
|
Fixed bug 4018 - Implement SDL_GetWindowBordersSize() under Windows/Win32/WinAPI
Ismael Ferreras Morezuelas (Swyter)
As a new year gift I have implemented the Windows version of SDL_GetWindowBordersSize(). I needed it for auto-selecting a cozy window size for the game I'm currently working on and noticed that it only worked under X11, so I thought it could be a good excuse to contribute back more stuff. The Mercurial patch is attached as a .diff file. Let me know what you think.
Happy 2018 to all the SDL2 devs and users!
--
PS: Keep in mind that Windows 10 includes the 8px invisible grip borders as part of the frame. There's a way of detecting if Aero/DWM is being used and ask only for the visible rect, but I believe that GetWindowRect() is doing that for a reason and working as intended, so I haven't changed it. (See [2])
References:
[1]: http://www.firststeps.ru/mfc/winapi/r.php?72
[2]: https://stackoverflow.com/a/34143777/674685
[3]: https://stackoverflow.com/a/431548/674685
[4]: https://wiki.libsdl.org/SDL_GetWindowBordersSize
|
|
8111a632
|
2018-01-03T10:49:26
|
|
Fixed bug 4013 - Wayland: fix videoquit on multimonitor system
Vladimir
On multimonitor system Wayland_VideoQuit invalid deiniting.
Tested in Centos7 + Weston
|
|
1fa4bcca
|
2018-01-03T10:43:01
|
|
Fixed bug 4012 - Wayland: invalid direction on mouse wheel
Vladimir
Invalid direction on mouse wheel
Patch tested in Centos 7 + Weston
|
|
6bc38737
|
2018-01-03T10:07:27
|
|
Fixed bug 4011 - Wayland: fix free cursor
Vladimir
Sometimes SDL application crashes on cursor free.
Patch tested under Centos 7 + weston
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
f9cd7650
|
2018-01-02T21:44:28
|
|
metal and moltenvk: fix highdpi.
|
|
7c667a6f
|
2018-01-01T19:16:51
|
|
windows: Remove references to GetVersionExA (thanks, Andrew Pilley!).
"GetVersionExA is deprecated in windows 8.1 and above's SDK, causing a warning
when building against the win10 SDK. Attached patch cleans up the usage for a
warning-free build.
GetVersionExA was being used to test to see if SDL was running on win9x or
winnt. A quick chat with Ryan on twitter suggested that SDL doesn't
officially support win9x anymore, so the call to this can be outright removed.
As an aside, replacing the call to GetVersionExA with VerifyVersionInfoA (the
recommended path) would have been pointless, as VerifyVersionInfoA only
supports VER_PLATFORM_WIN32_NT and doesn't officially support any other value
for dwPlatformId currently. (And it's probable that win9x SDKs didn't have
VerifyVersionInfo* in them anyway.)"
Fixes Bugzilla #4019.
|
|
48fea0ce
|
2017-12-31T15:21:25
|
|
macOS: Fix MoltenVK Metal view resizing, and allow the metal view to be used without vulkan.
|
|
64ec4c33
|
2017-12-29T22:13:40
|
|
macOS: Make sure the desktop's display mode is always in SDL's list of display modes.
|
|
b7be5bce
|
2017-12-19T11:17:37
|
|
Fixed bug 4000 - SDL2 on raspberry: mouse displayed at 0,0 after SDL_ShowCursor
Laurent Merckx
I have a problem with the SDL_ShowCursor method on Raspberry.
Depending on the context, my application hides or show the mouse cursor with SDL_ShowCursor.
But when calling SDL_ShowCursor(true), the cursor is displayed at 0,0 (and not at last position).
After debugging sources by myself, it seems that the problem is in SDL_rpimouse.c - RPI_ShowCursor:
vc_dispmanx_rect_set( &dst_rect, 0, 0, curdata->w, curdata->h);
should be
vc_dispmanx_rect_set( &dst_rect, mouse->x, mouse->y, curdata->w, curdata->h);
For me, it solves the problem.
|
|
b92e2f02
|
2017-12-19T10:57:21
|
|
Fixed bug 4004 - iOS: don't hide keyboard on RETURN
Dominik Reichardt
As discussed in 2012 the iOS onscreen keyboard hides when you hit RETURN (see https://discourse.libsdl.org/t/on-screen-keyboard-change/19216).
IMO this is a bad idea to not be able to influence this behavior and just recently this was fixed for Android by adding the hint SDL_HINT_ANDROID_RETURN_HIDES_IME in changeset 11768 6ce3bb5e38a5.
|
|
18577a70
|
2017-12-12T16:37:23
|
|
Fixed bug 3992 - SDL_GetColorKey doesn't set error message
Luke A. Guest
SDL_GetColorKey does not set an error message on failure. The current source just returns -1.
The documentation https://wiki.libsdl.org/SDL_GetColorKey?highlight=%28%5CbCategoryAPI%5Cb%29%7C%28SDLFunctionTemplate%29 says to call SDL_GetError but that is useless in this case.
|
|
1b16618b
|
2017-12-11T11:47:52
|
|
Fixed Windows gcc build
|
|
ab06f570
|
2017-12-10T09:17:33
|
|
Workaround for bug 3931 - spurious SDL_MOUSEMOTION events with SDL_HINT_MOUSE_RELATIVE_MODE_WARP 1 since Windows 10 Fall Creators update
Elis?e Maurer
The attached minimal program sets the SDL_HINT_MOUSE_RELATIVE_MODE_WARP to 1, enables relative mouse mode then logs all SDL_MOUSEMOTION xrel values as they happen.
When moving the mouse exclusively to the right:
* On a Windows 10 installation before Fall Creators update (for instance, Version 10.0.15063 Build 15063), only positive values are reported, as expected
* On a Windows 10 installation after Fall Creators update (for instance, Version 10.0.16299 Update 16299), a mix of positive and negative values are reported.
3 different people have reproduced this bug and have confirmed it started to happen after the Fall Creators update was installed. It happens with SDL 2.0.7 as well as latest default branch as of today.
It seems like some obscure (maybe unintended) Windows behavior change? Haven't been able to pin it down more yet.
(To force-upgrade a Windows installation to the Fall Creators update, you can use the update assistant at https://www.microsoft.com/en-us/software-download/windows10)
Eric Wasylishen
Broken GetCursorPos / SetCursorPos based games on Win 10 fall creators are not limited to SDL.. I just tested winquake.exe (original 1997 exe) and it now has "jumps" in the mouse input if you try to look around in a circle. It uses GetCursorPos/SetCursorPos by default. Switching WinQuake to use directinput (-dinput flag) seems to get rid of the jumps.
Daniel Gibson
A friend tested on Win10 1607 (which is before the Fall Creators Update) and the the bug doesn't occur there, so the regression that SetCursorPos() doesn't reliably generate mouse events was indeed introduced with that update.
I even reproduced it in a minimal WinAPI-only application (https://gist.github.com/DanielGibson/b5b033c67b9137f0280af9fc53352c68), the weird thing is that if you don't do anything each "frame" (i.e. the mainloop only polls the events and does nothing else), there are a lot of mouse events with the coordinates you passed to SetCursorPos(), but when sleeping for 10ms in each iteration of the mainloop, those events basically don't happen anymore. Which is bad, because in games the each iteration of the mainloop usually takes 16ms..
I have a patch now that I find acceptable.
It checks for the windows version with RtlGetVersion() (https://msdn.microsoft.com/en-us/library/windows/hardware/ff561910.aspx) and only if it's >= Win10 build 16299, enables the workaround.
All code is in video/windows/SDL_windowsevents.c
and the workaround is, that for each WM_MOUSEMOVE event, "if(isWin10FCUorNewer && mouseID != SDL_TOUCH_MOUSEID && mouse->relative_mode_warp)", an addition mouse move event is generated with the coordinates of the center of the screen
(SDL_SendMouseMotion(data->window, mouseID, 0, center_x, center_y);) - which is exactly what would happen if windows generated those reliably itself.
This will cause SDL_PrivateSendMouseMotion() to set mouse->last_x = center_x; and mouse->last_y = center_y; so the next mouse relative mouse event will be calculated correctly.
If Microsoft ever fixes this bug, the IsWin10FCUorNewer() function would have to
be adjusted to also check for a maximum version, so the workaround is then disabled again.
|
|
127841f3
|
2017-12-08T11:33:27
|
|
Fixed compiler warning
|
|
ba9c336e
|
2017-12-07T17:47:01
|
|
Fixed building for simulators or older iOS SDKs
|
|
6deb1e75
|
2017-12-07T17:12:03
|
|
Fixed compiling Metal renderer on iOS
|
|
cadf3e44
|
2017-12-07T09:35:28
|
|
The Metal view is a full SDL_uikitview to support multi-touch
|
|
ef6e629d
|
2017-12-06T16:37:55
|
|
cocoa: Added two missing files from hg changeset da7ba330ec68.
Fixes Bugzilla #3975.
|