Commit graph

6504 commits

Author SHA1 Message Date
Sam Lantinga
0d378c791a Added tag release-2.0.1 for changeset 9ec71e56071c 2013-10-23 17:46:07 -07:00
Ryan C. Gordon
c7744104c6 Initialize MEMORYSTATUSEX size before GlobalMemoryStatusEx() (thanks, Justin!).
Fixes Bugzilla #2177.
2013-10-23 19:52:14 -04:00
Sam Lantinga
678e0517aa Added tag release-2.0.1 for changeset 715a01415ac9 2013-10-23 16:33:15 -07:00
Sam Lantinga
05187f9ba8 Updated Debian package version to 2.0.1 2013-10-23 16:32:56 -07:00
Sam Lantinga
c9c6126f95 Added tag release-2.0.1 for changeset a8bd63b33636 2013-10-23 16:17:08 -07:00
Pierre-Loup A. Griffais
869a803878 Fix regression causing crashes when running without a window manager. 2013-10-23 13:43:17 -07:00
Ryan C. Gordon
d89bf9b9ff Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly.
Otherwise, the XInput path would always trigger it in a harmless manner.
2013-10-23 15:54:12 -04:00
Ryan C. Gordon
10fee37476 SDL_GetPrefPath() now uses the organization on all platforms.
Even if that's not the general convention for a given platform.

--HG--
extra : rebase_source : f3a8035be94bd416fca5bda09d1d93101bc4b688
2013-10-23 00:58:20 -04:00
Sam Lantinga
0fc9b5bcf7 Fixed duplicate const warning
--HG--
extra : rebase_source : 4529dd9d2bd4eb18a194d81f300cf47553ef2044
2013-10-22 21:54:52 -07:00
Sam Lantinga
274b054ac3 SDL 2.0.0 defined __inline__ and some code relies on it now.
--HG--
extra : rebase_source : b16922234216c3e66aac75ff77bcb8b041eeb729
2013-10-22 21:53:58 -07:00
Sam Lantinga
dec06dbca4 Testing fullscreen window in the accelerometer test.
--HG--
extra : rebase_source : 891b1c0b53e6a9d509c9ba86f4fc5943fafe0ec1
2013-10-22 21:53:42 -07:00
Andreas Schiffler
55dd456631 Fix error assert for negative cases of pixels_getPixelFormatName test 2013-10-21 23:17:37 -07:00
Sam Lantinga
dc404e11c9 Added patch notes for 2.0.1 2013-10-21 22:27:07 -07:00
Sam Lantinga
a161479693 Fixed whitespace
--HG--
extra : rebase_source : 0d52de2be0171755128dd1e06b4722b4bad418a1
2013-10-21 22:08:56 -07:00
Sam Lantinga
69b2958035 Revert fix for bug 1392 because it breaks linking with mingw32 2013-10-21 10:28:57 -07:00
Sam Lantinga
eb284ee46d Fixed bug 2168 - Mac: SDL_filesystem.h not exported to public header folder when building framework
Alex Szpakowski

I actually made a mistake when creating the previous patch file... I forgot to include a crucial line which changed.

I've attached a new patch which just changes the line I forgot, since the other part has already been applied to the repository.
I tested this one by doing a clean rebuild of SDL, and it works with the new patch.
2013-10-21 02:46:16 -07:00
Sam Lantinga
0c257d4b66 We don't have API changes documented yet. 2013-10-21 02:38:23 -07:00
Sam Lantinga
5544901ec1 Fixed bug 2073 - Mac: window moves unexpectedly when exiting SDL_WINDOW_FULLSCREEN_DESKTOP mode
Alex Szpakowski

In Mac OS X, when SDL_SetWindowFullscreen(window, 0) is called on a window which was in SDL_WINDOW_FULLSCREEN_DESKTOP mode, its original size is restored but its position is moved to the bottom of the screen.

I tracked down the issue to these two lines: http://hg.libsdl.org/SDL/file/66b5b8446275/src/video/cocoa/SDL_cocoawindow.m#l1034

I believe [nswindow setFrameOrigin:rect.origin] implicitly calls [nswindow constrainFrameRect:rect toScreen:screen], which will attempt to constrain the window to the screen, but at that point the window size is still full-screen rather than the restored window size, so the constrainFrameRect function operates on the wrong window size.

https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindow/constrainFrameRect:toScreen:

I resolved the issue by swapping the order of the function calls, like so:
[nswindow setContentSize:rect.size];
[nswindow setFrameOrigin:rect.origin];
2013-10-21 02:37:03 -07:00
Sam Lantinga
a68bc09ed9 Better fix for bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
Jānis Rūcis

Reopening as compilation with ANSI C throws lots of unnecessary warnings, both using MinGW and using Linux GCC. (BTW, what happened? MinGW is broken to all hell. sdl2-config does not even link SDLMain anymore?)

I think this may have been lost somewhere, so again: GCC supports inlining via __inline__ in all known versions of GCC, regardless of the C standard in use. Please don't assume that __STRICT_ANSI__ implies no inlining support.
2013-10-21 02:32:34 -07:00
Sam Lantinga
900cb419ce Fixed bug 2168 - Mac: SDL_filesystem.h not exported to public header folder when building framework 2013-10-21 02:20:39 -07:00
Sam Lantinga
20e65317fa Fixed some warnings building for 64-bit Windows 2013-10-21 01:16:16 -07:00
Sam Lantinga
165ad7a5e6 Fixed bug 2015 - surface getting leak in SDLTest_ScreenShot function
Nitz 2013-08-06 03:53:41 UTC

In function SDLTest_ScreenShot() surface pointer getting leak while return
2013-10-21 00:30:05 -07:00
Sam Lantinga
297b7e9f3b Fixed bug 2012 - Algorithm logic getting wrong in ComputeOutCode
Nitz

I was going through the SDL_IntersectRectAndLine function and wondered to see the ComputeOutCode function implementation.

The problem in this algo is, x and y axis are getting check with respect to 0, Which is wrong, it should be get checked with respect to rectangle x and y axis.
2013-10-21 00:25:43 -07:00
Sam Lantinga
01cfa82f08 Fixed bug 2061 - SDL_filesystem API not built using cmake
Marcus von Appen

The SDL_filesystem API does not get built properly on Unix and BeOS using cmake due to not including the correct C files.
2013-10-21 00:22:07 -07:00
Sam Lantinga
9eaceb18a0 Fixed bug 2072 - Make OS X's filesystem calls use -[NSString fileSystemRepresentation]
C.W. Betts

The recommended way of getting a file name that POSIX file APIs can open in OS X when using an NSString is -[NSString fileSystemRepresentation]. However, the current filesystem API in hg uses -[NSString UTF8String].
2013-10-21 00:20:27 -07:00
Sam Lantinga
f00b8b1fb4 Better cleanup if OpenGL initialization fails 2013-10-21 00:15:24 -07:00
Sam Lantinga
e8d2a8b3b8 Fixed bug 2156 - Android: Accelerometer values fed to joystick driver are inverted for the X axis and wrong for Z
Denis Bernard

Background information: http://developer.android.com/reference/android/hardware/SensorEvent.html#values

Steps to reproduce: compile testjoystick.c as an android app (change screen size according to your device). While running the app, also run:

adb logcat -c; adb logcat -s 'SDL:*' 'SDL/APP:*'

When tilting the device left/right, the joystick moves in the opposite direction of what one would expect. Or at least, the behaviour is not consistent with the Y axis.

Also when the device sits on a table (obviously not moving), the Z axis value oscillates between -32000 and +32000 (by overflow):

I/SDL/APP ( 1994): Joystick 0 axis 2 value: 32511
I/SDL/APP ( 1994): Joystick 0 axis 2 value: 32575
I/SDL/APP ( 1994): Joystick 0 axis 2 value: 32383
I/SDL/APP ( 1994): Joystick 0 axis 2 value: -32386
I/SDL/APP ( 1994): Joystick 0 axis 2 value: -32450
I/SDL/APP ( 1994): Joystick 0 axis 2 value: -32578

This is caused by the accelerometer yielding a constant value around 9.81 for Z and feeding something like 0.9 to 1.1 to the joystick driver, resulting in the overflow.

Proposed fix in SDLActivity.java (swap X and subtract G from Z reading)
2013-10-20 23:52:02 -07:00
Sam Lantinga
5548931ed6 Fixed a crash initializing Android touch IDs 2013-10-20 23:23:25 -07:00
Sam Lantinga
042962f130 Fixed the status bar visibility in iOS 7 2013-10-20 23:05:53 -07:00
Sam Lantinga
d3ebd00978 Fixed Y axis inversion on iOS; positive is up, negative is down. 2013-10-20 22:23:09 -07:00
Sam Lantinga
44dbed38ac Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
Andreas Ertelt

The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/4434498bf4b9 / https://bugzilla.libsdl.org/show_bug.cgi?id=2121)

The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple

   warning: always_inline function might not be inlinable [-Wattributes]

as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
2013-10-20 21:56:15 -07:00
Sam Lantinga
4e8f81ab6e Prevent conflicts when linking both SDL2 and SDL2_gfx 2013-10-20 21:34:38 -07:00
Sam Lantinga
4d7a5efe31 Fixed windows compile 2013-10-20 20:49:36 -07:00
Sam Lantinga
367ffcc3af Added a macro SDL_TICKS_PASSED() to correctly compare two 32-bit tick values.
Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.
2013-10-20 20:42:55 -07:00
Sam Lantinga
84561c952a Added __WINDOWS__ to reflect both 32 and 64-bit windows platforms 2013-10-20 20:41:30 -07:00
Ryan C. Gordon
8d51830d7b Fix some edge cases in XInput haptic timing. 2013-10-20 23:38:19 -04:00
Ryan C. Gordon
a8de1da24d Disable Win32 thread naming again. See Bugzilla #2089. 2013-10-20 23:08:45 -04:00
Ryan C. Gordon
7a0350ba09 Added SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (thanks, David!).
Fixes Bugzilla #1985.
2013-10-20 21:18:05 -04:00
Ryan C. Gordon
197b270ca8 Backed out changeset c8a0b7c05db8, done testing Buildbot changes. 2013-10-20 20:24:00 -04:00
Ryan C. Gordon
cfcf5384b7 Intentionally breaking Windows and Raspberry Pi builds to test Buildbot change. 2013-10-20 20:02:02 -04:00
Ryan C. Gordon
e9b771e52a Backed out hg changeset b92b8c52946c. REFGUID is apparently a const type. 2013-10-20 16:03:11 -04:00
Ryan C. Gordon
ed8a935593 Patched to compile on non-C99 Microsoft compiler. 2013-10-20 16:02:24 -04:00
Ryan C. Gordon
613246f860 Patched to compile on Windows. 2013-10-20 16:01:10 -04:00
Ryan C. Gordon
4d56787378 Allow XInput haptics to run for SDL_HAPTIC_INFINITY time (thanks, Mitchell!).
Partially fixes Bugzilla #2126.
2013-10-20 15:55:47 -04:00
Ryan C. Gordon
0c739575a3 Fixed goofy logic in haptic device comparison code.
Mitchell Keith Bloch did the research on this bug, and came up with a slightly
 different patch than this.

Partially fixes Bugzilla #2126.
2013-10-20 15:49:52 -04:00
Ryan C. Gordon
da32e8f576 Don't bother calling SDL_SYS_HapticEffectType() at all for XInput devices. 2013-10-20 15:45:48 -04:00
Ryan C. Gordon
cc7596fc7e Fix adding of XInput devices (thanks, Mitchell!)
Partially fixes Bugzilla #2126.
2013-10-20 15:40:20 -04:00
Sam Lantinga
58b5460692 It's okay to quit things more than once. 2013-10-20 10:39:26 -07:00
Sam Lantinga
c3ae637f37 Use vertex arrays for drawing points in addition to lines 2013-10-20 10:35:51 -07:00
Sam Lantinga
bf136121da Fixed bug 1392 - Debian patch: do not propagate -lpthread
manuel.montezelo

Since the bug report[1] in 2006 Debian is shipping the patch attached.

[1] http://bugs.debian.org/375822

Maybe nowadays you don't propagate that library for linking, so maybe the patch should be dropped, but at the moment I do not have an easy/quick way to check it.

So I am submitting this report in the case that you consider it useful (even if maybe the patch itself has to be reworked), or otherwise learn if the patch is unneeded or even harmful.
2013-10-20 10:19:51 -07:00