Mon, 11 Feb 2013 16:51:00 -0800Patch - Joystick coef[] doesn't support dial with low number of positions.
Sam Lantinga <slouken@libsdl.org> [Mon, 11 Feb 2013 16:51:00 -0800] rev 6845
Patch - Joystick coef[] doesn't support dial with low number of positions.

Simon <simon@mungewell.org>

I am working on joystick support for the SRW-S1 gaming wheel on Linux,
this device has 3 dials with only a few positions each.

At present SDL2 only fail to report the highest position value, due to the
interger math used for coef[]'s.

So with a 4 position switch I have input values (with evtest)
--
Event: time 1358967246.173186, type 3 (EV_ABS), code 9 (ABS_GAS), value 2
Event: time 1358967246.173186, -------------- SYN_REPORT ------------
Event: time 1358967246.369150, type 3 (EV_ABS), code 9 (ABS_GAS), value 1
Event: time 1358967246.369150, -------------- SYN_REPORT ------------
Event: time 1358967246.930277, type 3 (EV_ABS), code 9 (ABS_GAS), value 0
Event: time 1358967246.930277, -------------- SYN_REPORT ------------
Event: time 1358967249.369832, type 3 (EV_ABS), code 9 (ABS_GAS), value 1
Event: time 1358967249.369832, -------------- SYN_REPORT ------------
Event: time 1358967249.514382, type 3 (EV_ABS), code 9 (ABS_GAS), value 2
Event: time 1358967249.514382, -------------- SYN_REPORT ------------
Event: time 1358967249.626189, type 3 (EV_ABS), code 9 (ABS_GAS), value 3
Event: time 1358967249.626189, -------------- SYN_REPORT ------------
--

Testjoystick reports
--
Joystick has 6 axes, 1 hats, 0 balls, and 17 buttons
Joystick 0 axis 5 value: 32767
Joystick 0 axis 5 value: 0
Joystick 0 axis 5 value: -32768
Joystick 0 axis 5 value: 0
Joystick 0 axis 5 value: 32767
Joystick 0 axis 5 value: 0
Joystick 0 axis 5 value: -32768
--

The attached patch 'shifts' the coef[], so that 1/2 values can be
computed/seen and allows testjoystick to report correctly.
--
Joystick has 6 axes, 1 hats, 0 balls, and 17 buttons
Joystick 0 axis 5 value: -10923
Joystick 0 axis 5 value: 10922
Joystick 0 axis 5 value: 32767
Joystick 0 axis 5 value: 10922
Joystick 0 axis 5 value: -10923
Joystick 0 axis 5 value: -32768
Joystick 0 axis 5 value: -10923
Joystick 0 axis 5 value: 10922
Joystick 0 axis 5 value: 32767
--

Cheers,
Simon

Mon, 11 Feb 2013 16:45:24 -0800Fix for dropped joystick events contributed by Simon <simon@mungewell.org>
Sam Lantinga <slouken@libsdl.org> [Mon, 11 Feb 2013 16:45:24 -0800] rev 6844
Fix for dropped joystick events contributed by Simon <simon@mungewell.org>

In my system SDL2 is dropping a chunk of joystick events, which result in
a 'stuck brake/accelerator' whilst playing a racing simulator. This
basically means SDL2 is unsuitable for use at this point...

The patch below detects this situation and forces a re-read of all
attached joystick axis - thus resync to the correct/current pedal
positions.

Mon, 11 Feb 2013 11:21:54 -0800tree 97aca305664b
Sam Lantinga <slouken@libsdl.org> [Mon, 11 Feb 2013 11:21:54 -0800] rev 6843
tree 97aca305664b
parent 6a9ca692cd65
author Edward Rudd <urkle@outoforder.cc> 1358030048 18000
committer Edward Rudd <urkle@outoforder.cc> 1358030048 18000
revision 6822
branch default

rework and fix handling of hat to button mappings

- doesn't assume it's always mapped to dpad
- properly handles multiple hats (up to 4)
- properly handles multiple presses (e.g. up and right)
- properly handles multiple gamepads

Mon, 11 Feb 2013 11:21:19 -0800tree 0c86a223596d
Sam Lantinga <slouken@libsdl.org> [Mon, 11 Feb 2013 11:21:19 -0800] rev 6842
tree 0c86a223596d
parent 44e12dd8ee8e
author Edward Rudd <urkle@outoforder.cc> 1358030047 18000
committer Edward Rudd <urkle@outoforder.cc> 1358030047 18000
revision 6821
branch default

Fix a bad mapping from "axis" to "button"

Mon, 11 Feb 2013 11:20:49 -0800tree 8cbca1e6b293
Sam Lantinga <slouken@libsdl.org> [Mon, 11 Feb 2013 11:20:49 -0800] rev 6841
tree 8cbca1e6b293
parent 7ddddb71cec9
author Edward Rudd <urkle@outoforder.cc> 1358030045 18000
committer Edward Rudd <urkle@outoforder.cc> 1358030045 18000
revision 6820
branch default

Consolidate iterating the SupportedControllers array

also fix memory leak when controller mapping not found

Mon, 11 Feb 2013 11:09:55 -0800Fixed building SDL under Xcode
Sam Lantinga <slouken@libsdl.org> [Mon, 11 Feb 2013 11:09:55 -0800] rev 6840
Fixed building SDL under Xcode

Fri, 08 Feb 2013 07:14:50 -0800Add SDL_test test suite; add fuzzer test cases; fix fuzzer bug; fix compiler warnings
Andreas Schiffler <aschiffler@ferzkopp.net> [Fri, 08 Feb 2013 07:14:50 -0800] rev 6839
Add SDL_test test suite; add fuzzer test cases; fix fuzzer bug; fix compiler warnings

Fri, 08 Feb 2013 01:12:48 -0800Fixed bug 1711 - Comment in "manifest" element within android-project/AndroidManifest.xml is the source of troubles
Sam Lantinga <slouken@libsdl.org> [Fri, 08 Feb 2013 01:12:48 -0800] rev 6838
Fixed bug 1711 - Comment in "manifest" element within android-project/AndroidManifest.xml is the source of troubles

ny00@outlook.com

Let me quote the following opening tag from
android-project/AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<!-- Replace org.libsdl.app with the identifier of your game, e.g.
com.gamemaker.game
-->
package="org.libsdl.app"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">

The comment (with the text "Replace org.libsdl.app with...") seems to be a
cause of troubles. Here are a few examples I've spotted:

1) While using nkd-build from android-ndk-r8d, I receive the following error:

Invalid attribute name: <!-- replace org.libsdl.app with the identifier of your
game, e.g.
com.gamemaker.game
--
/home/ny00123/util/android-ndk-r8d/build/gmsl/__gmsl:512: *** non-numeric
second argument to `wordlist' function: ''. Stop.

2) Repeating this but with android-ndk-r6b (an earlier revision), it reduces to
a warning and actual complication is not halted.

3) Following the instructions in README.android and using Eclipse (from a
recently downloaded ADT Bundle), I cannot seem to be able to create an Android
project from existing sources (one of the SDL test apps for now).
* On a side note, I can't find where I may choose the "Build Target" before
clicking "Finish", but it does not seem to be related to this bug report.
Anyway, following the choice of the project path and a click on "Finish",
nothing seems to occur.
If I rather do so after removing the above comment from AndroidManifest.xml,
though, the project appears on Eclipse as expected once I click on "Finish".

Fri, 08 Feb 2013 01:04:07 -0800Fixed bug 1682 - Resize collapses window instantly to a size of 0 x 124.
Sam Lantinga <slouken@libsdl.org> [Fri, 08 Feb 2013 01:04:07 -0800] rev 6837
Fixed bug 1682 - Resize collapses window instantly to a size of 0 x 124.

Marco Schmidt

After sizing my main window (the only window in my application) through
grabbing the window border with the mouse the window collapses instantly to a
size of 0 x 124. In my application I can not resize the window to a normal size
again.

I tried to reproduce the problem - and here a the minimal steps I found.

I'm running WIN8 x64, VS2012Pro, HG SDL-2.0 tip, WIN32-Build.

Minimal steps to reproduce my problem:

- open solution SDL_VS2012
- make testdraw2 the start project
- pass command line option --resize to the debuggee testdraw2
- starting the application testdraw2
- try to resize the window
- the application window resizes to a minimal size 0 x 124.
- the application crashes to divide by zero .... (this is only the aftermath
but a unhandled error condition)

Fri, 08 Feb 2013 00:54:08 -0800Fixed bug 1689 - Leaks galore in OS X Cocoa code.
Sam Lantinga <slouken@libsdl.org> [Fri, 08 Feb 2013 00:54:08 -0800] rev 6836
Fixed bug 1689 - Leaks galore in OS X Cocoa code.

Edward Rudd

This is to document the various leaks I'm finding in the Cocoa code in SDL 2.