|
84369567
|
2014-06-25T16:16:55
|
|
Changed SDL_GetAbsoluteMouseState() to SDL_GetGlobalMouseState().
This matches naming conventions in the main repository, between
SDL_GetRelativeMouseState() and SDL_WarpMouseGlobal().
|
|
2cce7b2e
|
2014-06-11T00:40:19
|
|
Implemented Cocoa GetAbsoluteMouseState().
|
|
4676705d
|
2014-06-11T00:12:19
|
|
Implement Windows GetAbsoluteMouseState().
|
|
c8c55a01
|
2014-06-11T00:12:06
|
|
This should probably query async button state.
|
|
c8cf407e
|
2014-06-05T00:54:43
|
|
Wired up Windows resize hit testing.
|
|
31de8f8b
|
2014-06-05T00:49:25
|
|
Minor tweaks to testhittesting.
|
|
2d38a71a
|
2014-06-05T00:45:16
|
|
Added SDL_HITTEST_RESIZE_*, and implemented for X11.
|
|
b861efde
|
2014-06-05T00:03:33
|
|
Implemented SDL_GetAbsoluteMouseState().
X11 only for now, but this should be doable on every platform, I think.
|
|
264eb4bb
|
2014-06-05T00:02:42
|
|
Added some (harmlessly) missing braces.
|
|
7153c2da
|
2014-05-30T09:50:47
|
|
Fixed using SDL_PointInRect() from C++.
|
|
bb7a27fa
|
2014-05-30T01:51:13
|
|
Fixed up SDL_CaptureMouse() on Windows to work like I expected.
This would have been a one-line patch to the documentation (specifying that
captures only work as long as the left mouse button is pressed), but I didn't
like that, so I got a little crazy about this instead.
|
|
bcc2cc87
|
2014-05-30T01:49:26
|
|
Fixed hit-testing on Windows.
Needed to convert from screen to client coords.
|
|
bf03bec1
|
2014-05-30T01:48:26
|
|
Patched to compile on Visual Studio.
|
|
4ef6edda
|
2014-05-30T01:48:08
|
|
Make some printf() calls into SDL_Log() so I can see them on Windows. :)
|
|
89ad7934
|
2014-05-29T13:39:02
|
|
First shot (not even compiled) at Windows hit-testing support.
|
|
661548c8
|
2014-05-29T13:38:39
|
|
Tweaked hit-testing documentation.
|
|
7364ed01
|
2014-05-28T01:27:27
|
|
Added a few debug printf() calls.
|
|
98c03f39
|
2014-05-28T01:22:47
|
|
Changed drag area API to a hit-testing API.
There were several good arguments for this: it's how Windows works with
WM_NCHITTEST, SDL doesn't need to manage a list of rects, it allows more
control over the regions (how do you use rects to cleanly surround a circular
button?), the callback can be more optimized than a iterating a list of
rects, and you don't have to send an updated list of rects whenever the
window resizes or layout changes.
|
|
7a4ddcd8
|
2014-05-27T15:47:25
|
|
Don't hardcode an 8 here.
|
|
20ac4bae
|
2014-05-27T15:40:03
|
|
Some updates for the X11 drag areas work.
|
|
2744c019
|
2014-05-27T14:41:16
|
|
Initial work on X11 implementation of SDL_SetWindowDragAreas().
|
|
3cbc83ef
|
2014-05-27T01:27:42
|
|
First shot at SDL_SetWindowDragAreas().
Only Cocoa implemented right now.
|
|
b7f90442
|
2014-05-27T00:26:47
|
|
Added SDL_PointInRect().
|
|
ded970f7
|
2014-05-24T18:23:56
|
|
Flip this around to do the simpler condition first.
|
|
668025c2
|
2014-05-24T18:23:39
|
|
Implement SDL_CaptureMouse() for Mac OS X.
|
|
b7d2c0e9
|
2014-05-24T01:30:37
|
|
Implemented SDL_CaptureMouse().
|
|
846a3e07
|
2014-05-24T01:27:19
|
|
Added some FIXMEs.
|
|
f0e0f4ca
|
2014-05-24T01:25:27
|
|
Fixed whitespace.
|
|
a2710516
|
2014-05-24T01:23:57
|
|
Generated dynapi stuff for the new WinRT entry points.
|
|
9bc47465
|
2014-05-18T21:11:30
|
|
Changed C++ style comments.
|
|
f5c77149
|
2014-05-18T21:05:39
|
|
Fixed typo in header comment.
|
|
ca11d7c8
|
2014-05-17T22:02:25
|
|
Changed C++ style comments to fix pedantic warnings.
|
|
0d196c30
|
2014-05-17T21:52:05
|
|
Removed unused standard library includes from gesture source.
|
|
660a57f9
|
2014-05-13T19:42:40
|
|
Fixes #2541, build failure with Wayland enabled, OpenGL ES disabled
Also includes an attempt at fixing building SDL on Ubuntu 13.10, which hopefully
won't break 14.04
|
|
e772f0df
|
2014-05-13T12:10:37
|
|
Added a binding for the NVIDIA Shield controller
|
|
67350973
|
2014-05-13T11:32:36
|
|
Updated coding style to match the rest of SDL
|
|
81c574b8
|
2014-05-11T15:59:22
|
|
Fixed typo in header comment.
|
|
49cef77e
|
2014-05-10T23:39:54
|
|
WinRT: fixed the max-button count for WinPhone 8.1 message boxes
Doh.
The max button count on WinPhone 8.1 was set to three, not two. Any more than
two leads to a crash.
|
|
ea99e0c0
|
2014-05-10T23:28:53
|
|
Added limited message-box support for Windows Phone 8.1
The Windows Phone 8.1 'MessageDialog' API only seems to support two buttons,
despite the documentation for such mentioning support for three. Trying to use
three or more buttons leads to an exception being thrown. As such, any attempt
to use more than two buttons via SDL_ShowMessageBox (on Windows Phone 8.1) will
lead to no message box getting shown, and the call returning an error.
The Win32 MessageBox and dialog APIs are not available in WinRT apps, to note.
More extensive message dialog support might be available at some point, if and
when XAML support is more fully fleshed-out. I'm not certain of this, though.
|
|
d12d7952
|
2014-05-10T21:48:46
|
|
Align pointer in SDL_memset before doing Uint32 loop
Some more recent compilers emit SSE aligned store instructions for the loop,
causing crashes if the destination buffer isn't aligned on a 32-bit boundary.
This would also crash on platforms like ARM that require aligned stores.
This fixes a crash inside SDL_FillRect that happens with the official x64 mingw
build.
|
|
d5a2e55d
|
2014-05-10T18:24:39
|
|
Improve handling of focus behaviour on Android. Patch by Alexey Petruchik
|
|
b701175a
|
2014-05-10T17:00:37
|
|
Include gl2platform.h in SDL_opengles2.h so we play nice with GLEW.
Based on feedback from Sven Bergstr?m
|
|
de0d349e
|
2014-05-10T16:50:05
|
|
Fixes #2512, handle configuration change messages sent by Wayland. Patch by Bryan Cain.
|
|
d57d99a1
|
2014-05-10T12:34:16
|
|
Updated iOS deployment target to iOS 5.1
|
|
fb389950
|
2014-05-10T16:23:06
|
|
Fixes #2529, guard SDL_d3math.* with the proper defines
|
|
536dd013
|
2014-05-10T16:13:22
|
|
Fixes #2519, clear error if using the default library path for EGL succeeds.
|
|
f565d81a
|
2014-05-10T15:57:09
|
|
A few more ANDROID for __ANDROID__ replacements
|
|
1a4c0dac
|
2014-05-10T11:27:43
|
|
Temporary fix for bug 2494 - Crashes due to the non thread-safe SDL_malloc/SDL_free on Windows
We'll define USE_LOCKS as a temporary fix until an alternative like ptmalloc, jemalloc, or nedmalloc can be investigated.
http://www.malloc.de/en/
http://www.canonware.com/jemalloc/
http://www.nedprod.com/programs/portable/nedmalloc/
SDL allocates memory very infrequently, so this is probably a decent fix for a while.
|
|
164e5b89
|
2014-05-09T21:28:52
|
|
WinRT: display-information code cleanups
|
|
d4f1d225
|
2014-05-09T20:32:06
|
|
Fixed bug: touch input on WinPhone 8.0 was wrong, in some cases
When a Windows Phone 8.0 app was rotated to anything but Portrait mode, touch
input coordinates, as well as virtual mouse coordinates, were usually getting
reported as coming from the wrong part of the screen.
|
|
0a879d63
|
2014-05-09T20:16:21
|
|
Fixed rendering-alignment issues on WinPhone 8.1, when the device was rotated
If a Windows Phone 8.1 device was rotated to anything but Portrait mode,
the Direct3D 11 renderer's output wouldn't get aligned correctly with the
screen.
|
|
33f81a0d
|
2014-05-06T20:31:10
|
|
WinRT: made Win[Phone] 8.1 projects be structured like their 8.0 counterparts
This change removes the "Shared" component from the Windows 8.1 and Windows
Phone 8.1 project files, then renames the projects to use a file structure
that's the same as used for the Windows 8.0 and Windows Phone 8.0 projects.
This change now places WinRT projects in the following directories:
VisualC-WinRT\WinRT81_VS2013\ -- Windows 8.1 project files
VisualC-WinRT\WinPhone81_VS2013\ -- Windows Phone 8.1 project files (NEW, as of this change)
VisualC-WinRT\WinRT80_VS2012\ -- Windows 8.0 project files
VisualC-WinRT\WinPhone80_VS2012\ -- Windows Phone 8.0 project files
Windows 8.0 and Windows Phone 8.0 projects, as well as apps or libs that
reference these, should be unaffected by this change.
Windows 8.1 and Windows Phone 8.1 based apps or libs that reference SDL's
projects directly will need to have their old references removed, then
replaced with new ones that point to the updated structure.
|
|
b6148092
|
2014-05-06T15:08:43
|
|
eglGetProcAddress fails the same way on MIR as ANDROID does on arm. Thanks Sylvain Becker for the patch!
|
|
e7bccd16
|
2014-05-06T00:20:34
|
|
Update the machine-generated configure code.
|
|
2a7aa9bd
|
2014-05-06T00:13:07
|
|
Fix build on Windows targets without dxgi.h, like MingW32.
|
|
fd2d26eb
|
2014-05-05T22:36:47
|
|
Show android video or android audio if detected in autotools summary.
|
|
3672aeb4
|
2014-05-05T22:26:21
|
|
Export android jni functions even when build with -fvisibility=hidden flag
|
|
548a0ee7
|
2014-05-05T22:21:26
|
|
__ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK.
|
|
7528f94c
|
2014-05-02T12:39:26
|
|
Remove code that found its way back into the diff
|
|
44a0f1d9
|
2014-05-02T12:33:19
|
|
Fix software rendering in the mir backend. The window assumed hardware buffer, which caused testdrawchessboard to fail to mmap a buffer.
|
|
ec5f6ad5
|
2014-04-30T21:12:47
|
|
WinRT: suppressed an unused param warning when building for Windows Phone 8.1
|
|
c5c1a2c6
|
2014-04-30T21:07:30
|
|
WinRT: preliminary support for building against the Windows Phone 8.1 SDK
This is a step towards supporting "Universal" Windows apps, when building for
Windows Phone. SDL can now build against the Windows Phone 8.1 SDK, and apps
linked to it can run, however further work and testing is required as some
previously Phone-only code appears to no longer be applicable for
Windows Phone 8.1. The Windows 8.1 code paths does seem to be preferable, but
should probably be tested and updated on a finer-grained basis.
If in doubt, use the Windows Phone 8.0 projects for now, as located in
VisualC-WinRT/WinPhone80_VS2012/
TODO:
- look at any Windows Phone specific code paths in SDL, and see if Phone 8.1
should use the Windows Phone code path(s), or the Windows 8.x or 8.1 paths
|
|
c10afa48
|
2014-04-29T19:22:48
|
|
Fixed a linker error when building SDL/WinRT
The Win32 APIs, VerifyVersionInfoW and VerSetConditionMask, are not currently
available for use in WinRT apps. This change primarily #if[n]defs-out some
calls to them.
|
|
36696777
|
2014-04-29T19:06:00
|
|
WinRT: added project files for Windows 8.1 + MSVC 2013
This commit also includes some base-level support for Universal apps.
TODO:
- add support for Windows Phone 8.1
- add support for satellite libs: SDL_image, SDL_ttf, and SDL_mixer
|
|
cb403ab6
|
2014-04-29T12:00:28
|
|
Removed comma at end of enum in a public header, to make -Wpedantic happy.
|
|
bd6a4936
|
2014-04-26T12:38:35
|
|
Fixed bug 2508 - don't redefine WIN32_LEAN_AND_MEAN
|
|
d9ffe549
|
2014-04-26T12:29:40
|
|
Fixed the inertia effect in the test program
|
|
d2fb8a2a
|
2014-04-26T11:23:55
|
|
Better compiler for Windows XP systems
|
|
8b280091
|
2014-04-24T21:05:51
|
|
Mac: Correct the y-axis position after 870c7d21004b
This fixes a bug where we'd offset positions by the height of the dock, if it
was along the bottom of the screen.
Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2509
Thanks to Alex Szpakowski for bug & patch.
|
|
5d7562c7
|
2014-04-24T23:24:48
|
|
Mac OS X: Look for joystick hotplug in its own CFRunLoop.
This allows the joystick hotplug to function without the main event loop
(specifically: without SDL_INIT_VIDEO), and moves explicit polling for
joysticks where it belongs at the low-level: in SDL_SYS_JoystickDetect().
This lets apps call SDL_JoystickUpdate() to get hotplug events and keep
SDL_NumJoysticks() correct, as expected. As SDL_PumpEvents() (and
SDL_PollEvents, etc) calls SDL_JoystickUpdate(), existing apps will function
as before.
Thanks to "raskie" on the forums for pointing this out!
|
|
dfea14d9
|
2014-04-23T13:54:47
|
|
Fixed cygwin build
|
|
45dc89c2
|
2014-04-23T13:48:01
|
|
Fixed detecting output on second adapter
CR: Sam Lantinga
|
|
3e3570df
|
2014-04-23T13:47:57
|
|
Don't crash in WIN_GL_InitExtensions() if the OpenGL library couldn't be loaded
|
|
a5ce57bc
|
2014-04-23T13:47:52
|
|
Fixed compiler warning
|
|
acbc321c
|
2014-04-23T13:47:42
|
|
Don't try to load d3dcompiler_46.dll on Windows XP
|
|
af395e97
|
2014-04-23T13:47:35
|
|
Removed possible implicit memset()
|
|
ae2a50fc
|
2014-04-21T12:42:25
|
|
Revert MIR_CFLAGS to SDL_CFLAGS. Use forward declaration for the real fix. (We shouldn't expose mir headers!)
|
|
2c784e36
|
2014-04-19T16:33:42
|
|
Set the tag type in libtool invocations
Setting the tag type will let libtool work even when it cannot infer
the type of the code being built. One way libtool may fail to infer
the tag type is if one uses a mock compiler (such as for static
analysis).
|
|
beff5cec
|
2014-04-19T13:15:53
|
|
Mac: SDL_SetWindowPosition is now relative to the menubar.
It used to be that SDL_SetWindowPosition was relative to the top of the screen,
which didn't make sense. In addition, borderless windows can be positioned
*below* the menubar, so SDL_SetWindowPosition(win, 0, 0) on a borderless window
would hide ~30ish pixels of the window below the menubar.
|
|
defd90b6
|
2014-04-19T13:15:41
|
|
Render: Allow empty cliprect.
This fixes an issue where an empty cliprect is treated the same as a NULL
cliprect, causing the render backends to disable clipping.
Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to
differentiate between:
- SDL_RenderSetClipRect(render, NULL)
- SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r);
Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504
|
|
36e11d87
|
2014-04-19T10:17:36
|
|
Fixed missing j
|
|
0ba3a54a
|
2014-04-19T12:48:45
|
|
Cleaned up and rearranged WinRT project file structure.
All WinRT projects have been merged into a single directory, "VisualC-WinRT",
with platform-specific variants in subdirectories off of it. This structure
has been applied to a few major SDL satellite libraries as well (SDL_image,
SDL_mixer, and SDL_ttf).
Currently, only Windows 8.0/RT and Windows Phone 8.0 targets are supported.
Windows 8.1/RT/Phone targets are planned.
Projects that use SDL_image/WinRT, and link to it via Visual Studio's
project-to-project reference system, will need to be updated, to reflect the
changes in the project structure. This can be done by:
1. removing the MSVC project(s) for SDL/WinRT
2. re-added the MSVC project(s) for SDL/WinRT
3. right-clicking on the app, or projects that use those libraries, choosing
References, removing the references to any of these projects (they'll likely
be highlighted with an exclamation mark), then re-adding them
To note, the satellite libraries that reference SDL/WinRT have been updated
already. The changes for those libraries will be pushed to hg.libsdl.org
shortly.
TODO:
- add support for Windows 8.1 and Windows Phone 8.1 targets, using
Microsoft's new "Universal" app support, if possible. These will be added to
a new subdirectory, or subdirectories (if more than one sets of projects are
needed, hopefully not), of "VisualC-WinRT".
- investigate NuGet support, which could allow Visual C++ to download
new copies of SDL/WinRT, its satellite libraries, and their dependencies,
from remote servers.
|
|
65c82148
|
2014-04-19T15:28:13
|
|
Removed global variable from test program.
|
|
2540214e
|
2014-04-19T00:31:02
|
|
Mir 14.04 headers available that allow scroll + touch events.
|
|
dd27ebed
|
2014-04-19T02:26:12
|
|
Turn off Wayland support for Raspberry Pi on the buildbot.
It's picking up the system headers instead of the RPi build files.
Theoretically, we _can_ support Wayland on this platform, though, as there
_is_ a Raspberry Pi port out there...
|
|
60e05040
|
2014-04-19T02:17:34
|
|
Fixed some issues reported on new Ubuntu 14.04 buildbots.
|
|
d2ea7cfe
|
2014-04-18T12:43:10
|
|
Fixed logic error loading DXGI
|
|
03afd0de
|
2014-04-18T12:43:04
|
|
SDL_DXGIGetOutputInfo() checks input parameters and returns a boolean value whether or not it succeeded.
|
|
353feb5c
|
2014-04-17T22:40:57
|
|
Fixed bug 2475 - Incorrect SDL_Log() format specifiers in test/testgesture.c
rettichschnidi
The floats should not be interpreted as integers. Patch against the current head attached.
|
|
43c99196
|
2014-04-17T22:23:32
|
|
Fixed bug 2489 - SDL2.framework references __Block_copy in /usr/lib/libSystem.B.dylib, but this symbol cannot be found on OSX-10.5
Thomas Schatz
The dynamic library (extracted from SDL2-2.0.3.dmg and put in /Library/Frameworks/) references the __Block_copy symbol in /usr/lib/libSystem.B.dylib, which cannot be found:
dlopen(/Library/Frameworks/SDL2.framework/SDL2, 6): Symbol not found: __Block_copy
Referenced from: /Library/Frameworks/SDL2.framework/SDL2
Expected in: /usr/lib/libSystem.B.dylib
From what I could gather __Block_copy seems to be related to the blocks extension to the C programming language introduced by Apple since OSX-10.6 (see: http://thirdcog.eu/pwcblocks/). If this is indeed the case, I don't think the SDL2-2.0.3.dmg on the website is at all compatible with OSX-10.5 countrary to what is announced.
|
|
6dd9ea8d
|
2014-04-17T21:00:25
|
|
Fixed bug 2496 - mouse left button double click event issue
cplu
When I double click on a window, the "clicks" field (newly added since 2.0.2) in SDL_MouseButtonEvent is 1 instead of 2.
However, when I "tripple" click, "clicks" field is then 2.
I'v look into the source code in SDL_windowsevents.c and found that when a double click event comes, WIN_WindowProc will get a WM_LBUTTONDBLCLK msg. The message sequence of a double click is:WM_LBUTTONDOWN->WM_LBUTTONUP->WM_LBUTTONDBLCLK->WM_LBUTTONUP.
|
|
5a6f4d40
|
2014-04-17T20:51:28
|
|
Fixed bug 2485 - [PATCH] Wayland: cursor disappears permanently after window loses mouse focus
Bryan Cain
Using any SDL application with the Wayland backend under Weston, if the application sets a cursor with SDL_SetCursor, the cursor will work until the mouse pointer leaves the window. When the pointer re-enters the window, there will be no cursor displayed at all.
I did some digging, and the reason for this is that SDL attaches the buffer to the cursor surface only once (during cursor creation) and assumes that it will stay attached. This is not how Wayland works, though - once the compositor is done rendering the buffer, it will release it, so it is no longer attached to the surface. When the cursor re-enters the window a second time, SDL sets the cursor to the same surface with no buffer attached, so no cursor is displayed.
This is fixed by the attached patch, which makes SDL attach the buffer to the surface when the cursor is set, not when it is created.
|
|
59690a4e
|
2014-04-17T20:21:10
|
|
Fixed bug 2482 - Wayland_CreateSystemCursor trying to load nonexistent "wait" cursor
Bryan Cain
Wayland_CreateSystemCursor tries to load a cursor named "wait" for two of the system cursor categories. This causes a segmentation fault when one of these cursors is used, because "wait" is not an actual cursor name in X11/Wayland cursor themes.
I can't attach my patch since I'm on a mobile right now, but I can confirm that simply replacing "wait" with "watch" for both of its uses in Wayland_CreateSystemCursor (in SDL_waylandmouse.c) fixes the bug.
|
|
7ae52b17
|
2014-04-17T20:18:50
|
|
Fixed bug 2477 - [PATCH] Joysticks do not work on RHEL6/CentOS6 systems
Ashley Whetter
RHEL6 and CentOS6 systems still use an old version of udev (147). It wasn't until udev 148 (Yep. 1 version off!) that the input class system changed from "ID_CLASS" to "ID_INPUT_{JOYSTICK,KEYBOARD,MOUSE,etc}" (http://lwn.net/Articles/364728/). Because SDL2 looks for the ID_INPUT_X field this means that it never detects any input devices on RHEL6 systems.
I've attached a patch which fixes the problem. If no input devices are detected with "ID_INPUT_X" then SDL will fallback to looking for the old style "ID_CLASS" udev field instead.
Because of the "big change" between udev versions I doubt it'll ever get upgraded on RHEL6, but because RHEL7 is on the way I don't know if this patch is worth merging. Hopefully it'll help anyone out that's having this problem though.
|
|
5439f9dd
|
2014-04-17T20:15:44
|
|
Fixed window losing the SDL_WINDOW_FOREIGN flag if something tries to recreate it.
|
|
2dacb60b
|
2014-04-17T20:06:02
|
|
Fixed bug 2086 - valgrind memory not released
Sylvain
Someone provided a patch for this, recently on the mailing list :
-----
Hi,
it is possible to skip the bug in libX11 by using the defaults for
XNResourceName and XNResourceClass in `XCreateIC' (the table for the
"Input Context Values" [1] in libX11-doc shows that a default is
provided if it is not set).
diff -ur SDL2-2.0.3~/src/video/x11/SDL_x11window.c SDL2-2.0.3/src/video/x11/SDL_x11window.c
--- SDL2-2.0.3~/src/video/x11/SDL_x11window.c 2014-04-04 17:09:40.764307181 +0200
+++ SDL2-2.0.3/src/video/x11/SDL_x11window.c 2014-04-04 17:10:23.887765046 +0200
@@ -239,8 +239,7 @@
data->ic =
X11_XCreateIC(videodata->im, XNClientWindow, w, XNFocusWindow, w,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
- XNResourceName, videodata->classname, XNResourceClass,
- videodata->classname, NULL);
+ NULL);
}
#endif
data->created = created;
Tito Latini
[1] http://www.x.org/releases/X11R7.7-RC1/doc/libX11/libX11/libX11.html#Input_Context_Values
|
|
f6953cf4
|
2014-04-17T20:02:11
|
|
Fixed bug 2502 - Memory leak inside SDL_x11events.c -> X11_DispatchEvent(_THIS)
bojko_1000
Code @566:
if (data->xwindow) {
Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0);
Atom type = None;
int format;
unsigned long nitems = 0, bytes_after;
unsigned char *property;
X11_XGetWindowProperty(display, data->xwindow,
_net_frame_extents, 0, 16, 0,
XA_CARDINAL, &type, &format,
&nitems, &bytes_after, &property);
if (type != None && nitems == 4)
{
border_left = ((long*)property)[0];
border_right = ((long*)property)[1];
border_top = ((long*)property)[2];
border_bottom = ((long*)property)[3];
}
}
Code after _the fix_:
if (data->xwindow) {
Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0);
Atom type = None;
int format;
unsigned long nitems = 0, bytes_after;
unsigned char *property;
X11_XGetWindowProperty(display, data->xwindow,
_net_frame_extents, 0, 16, 0,
XA_CARDINAL, &type, &format,
&nitems, &bytes_after, &property);
if (type != None && nitems == 4)
{
border_left = ((long*)property)[0];
border_right = ((long*)property)[1];
border_top = ((long*)property)[2];
border_bottom = ((long*)property)[3];
}
X11_XFree(property);
}
I have found that leak with valgrind.
|
|
f4b77110
|
2014-04-17T19:52:15
|
|
Fixed bug 2503 - Loop indexing and event union errors in SDL_gesture.c
Lasse ??rni
While enabling $1 gesture support in the Urho3D engine which uses SDL2 I detected some errors in the gesture code in SDL_gesture.c:
- In the function SDL_SaveAllDollarTemplates() the following line should use index variable j instead of i:
rtrn += SaveTemplate(&touch->dollarTemplate[i], dst);
- In the function SDL_SaveDollarTemplate() the following code should use index variable j instead of i:
if (touch->dollarTemplate[i].hash == gestureId) {
return SaveTemplate(&touch->dollarTemplate[i], dst);
- In the function SDL_SendGestureDollar() the x & y coordinates are being written to the mgesture structure, which results in garbage due to dgesture and mgesture being different data structures inside the union. The coordinates should be written to dgesture.x & dgesture.y respectively
|
|
3d5a24b9
|
2014-04-17T17:24:27
|
|
Updated configure with Brandon Schaefer's changes
|
|
fc9491dd
|
2014-04-17T14:02:21
|
|
Add DIRECTFB_CFLAGS to SDL_CFLAGS so its cflags will get added to the sdl2.pc
|