TestJoystick - rewriten for SDL2]

Hi all,
Under SDL2 the ‘test/testjoystick.c’ has been broken for a while - #if’ed
with a ‘fixme’ note.

So I fixed it. Enjoy
Simon

-------------- next part --------------
A non-text attachment was scrubbed…
Name: testjoystick.c
Type: text/x-csrc
Size: 7691 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120913/f3cb5563/attachment.c

Under SDL2 the ‘test/testjoystick.c’ has been broken for a while - #if’ed
with a ‘fixme’ note.

So I fixed it. Enjoy

We just fixed this a few weeks ago:

 http://hg.libsdl.org/SDL/rev/c294faf5fce5
 http://hg.libsdl.org/SDL/rev/efdf44f20799

…is there anything we should grab from your version?

Thanks,
–ryan.

Hi Ryan,
Fixed already…? Oh well, I think I learnt something in the exercise.

I based my varient on the ‘common.c’ stuff, which detects multiple renders
and various screen sizes. Depending on the views of the SDL dev’s that
might be a between way to go.

If so desired, I can merge the two versions to produce a patch sometime
next week.
Simon.

Yeah, I’ve been trying to base all the new SDL tests on common.c so they
have a good set of starting code framework and command line options. Feel
free to tackle it at your leisure!On Fri, Sep 14, 2012 at 9:47 AM, wrote:

Hi Ryan,
Fixed already…? Oh well, I think I learnt something in the exercise.

I based my varient on the ‘common.c’ stuff, which detects multiple renders
and various screen sizes. Depending on the views of the SDL dev’s that
might be a between way to go.

If so desired, I can merge the two versions to produce a patch sometime
next week.
Simon.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It would be great if this “test wrapper” was part of SDL2? That way
anyone (i.e. SDL_xyz test code) can use the same “common” API for
tests/sample code.On 9/23/2012 5:36 PM, Sam Lantinga wrote:

Yeah, I’ve been trying to base all the new SDL tests on common.c so
they have a good set of starting code framework and command line
options. Feel free to tackle it at your leisure!

On Fri, Sep 14, 2012 at 9:47 AM, <simon at mungewell.org <mailto:simon at mungewell.org>> wrote:

Hi Ryan,
Fixed already...? Oh well, I think I learnt something in the exercise.

I based my varient on the 'common.c' stuff, which detects multiple
renders
and various screen sizes. Depending on the views of the SDL dev's that
might be a between way to go.

If so desired, I can merge the two versions to produce a patch
sometime
next week.
Simon.

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

You mean an official part of the API and included in the shared library?

The file itself is zlib licensed and can be easily dropped into any
project… ?On Sun, Sep 23, 2012 at 9:01 PM, Andreas Schiffler wrote:

It would be great if this “test wrapper” was part of SDL2? That way
anyone (i.e. SDL_xyz test code) can use the same “common” API for
tests/sample code.

On 9/23/2012 5:36 PM, Sam Lantinga wrote:

Yeah, I’ve been trying to base all the new SDL tests on common.c so they
have a good set of starting code framework and command line options. Feel
free to tackle it at your leisure!

On Fri, Sep 14, 2012 at 9:47 AM, wrote:

Hi Ryan,
Fixed already…? Oh well, I think I learnt something in the exercise.

I based my varient on the ‘common.c’ stuff, which detects multiple renders
and various screen sizes. Depending on the views of the SDL dev’s that
might be a between way to go.

If so desired, I can merge the two versions to produce a patch sometime
next week.
Simon.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Attached is a patch for testjoystick to use the common state stuff, made
against the Oct4 snapshot (SDL-2.0.0-6559). I’ve also attached the
complete file.

Note Makefile will need to be patched to include 'commmon.c’
Simon

Hi Ryan,
Fixed already…? Oh well, I think I learnt something in the exercise.

I based my varient on the ‘common.c’ stuff, which detects multiple renders
and various screen sizes. Depending on the views of the SDL dev’s that
might be a between way to go.

If so desired, I can merge the two versions to produce a patch sometime
next week.
Simon.

-------------- next part --------------
A non-text attachment was scrubbed…
Name: testjoystick_common.patch
Type: text/x-patch
Size: 8388 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20121013/d59fbf8b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed…
Name: testjoystick.c
Type: text/x-csrc
Size: 8069 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20121013/d59fbf8b/attachment.c

Thanks, your patch is in!
http://hg.libsdl.org/SDL/rev/ab57cc69dcc0On Sat, Oct 13, 2012 at 7:34 PM, wrote:

Attached is a patch for testjoystick to use the common state stuff, made
against the Oct4 snapshot (SDL-2.0.0-6559). I’ve also attached the
complete file.

Note Makefile will need to be patched to include 'commmon.c’
Simon

Hi Ryan,
Fixed already…? Oh well, I think I learnt something in the exercise.

I based my varient on the ‘common.c’ stuff, which detects multiple
renders
and various screen sizes. Depending on the views of the SDL dev’s that
might be a between way to go.

If so desired, I can merge the two versions to produce a patch sometime
next week.
Simon.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org