Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type or link
should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe disabled??
DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " << SDL_JoystickNumAxes(JOYSTICK)) ;
DISPLAYMSG("Number of Buttons: " << SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " << SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }–
sdl

There are a number of issues related to this. SDL right now is using the
Joystick WinMM functions that are very unstable and bugged under the new
operating systems (WinME and Win2K). The SDL code really needs to be
reworked with DirectInput.
I’ve tried to use them, but eventually put my own Dinput stuff in, it’s been
the only way to make QA guys happy :)—
Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per conto di
sdl at lee-morgan.net
Inviato: martedi 12 giugno 2001 9.23
A: SDL list
Oggetto: [SDL] Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type or link
should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe disabled??
DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " << SDL_JoystickNumAxes(JOYSTICK)) ;
DISPLAYMSG("Number of Buttons: " <<
SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " << SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }


sdl

“Giovanni Bajo” writes:

There are a number of issues related to this. SDL right now is using the
Joystick WinMM functions that are very unstable and bugged under the new
operating systems (WinME and Win2K). The SDL code really needs to be
reworked with DirectInput.
I’ve tried to use them, but eventually put my own Dinput stuff in, it’s been
the only way to make QA guys happy :slight_smile:

I don’t suppose there’s any chance of folding it into SDL!?! I did a
cursory read through of DirectInput stuff in dx7. Has it changed much?,
was it difficult to add?.

Cheers

Lee> —

Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per conto di
@Lee_Morgan
Inviato: martedi 12 giugno 2001 9.23
A: SDL list
Oggetto: [SDL] Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type or link
should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe disabled??
DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " << SDL_JoystickNumAxes(JOYSTICK)) ;
DISPLAYMSG("Number of Buttons: " <<
SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " << SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }


sdl


sdl

If SDL team is happy with this, I can try to submit my own DInput joystick
routines—
Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per conto di
sdl at lee-morgan.net
Inviato: mercoledi 13 giugno 2001 4.49
A: sdl at lokigames.com
Oggetto: Re: [SDL] Win32 Joystick undetected? (SDL 1.2)

“Giovanni Bajo” <@Giovanni_Bajo> writes:

There are a number of issues related to this. SDL right now is using the
Joystick WinMM functions that are very unstable and bugged under the new
operating systems (WinME and Win2K). The SDL code really needs to be
reworked with DirectInput.
I’ve tried to use them, but eventually put my own Dinput stuff
in, it’s been
the only way to make QA guys happy :slight_smile:

I don’t suppose there’s any chance of folding it into SDL!?! I did a
cursory read through of DirectInput stuff in dx7. Has it changed much?,
was it difficult to add?.

Cheers

Lee


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com
[mailto:owner-sdl at lokigames.com]Per conto di

sdl at lee-morgan.net
Inviato: martedi 12 giugno 2001 9.23
A: SDL list
Oggetto: [SDL] Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type or link
should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe disabled??
DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " << SDL_JoystickNumAxes(JOYSTICK)) ;
DISPLAYMSG("Number of Buttons: " <<
SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " << SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }


sdl


sdl

Make sure the DirectInput is only activated if directx is the video
target and that a traditional windib/winmm is also possible, for
operating systems that don’t/can’t have DirectX installed. (ie: NT4)–

Olivier A. Dagenais - Software Architect and Developer

“Giovanni Bajo” wrote in message
news:IPEOJAKHBCEGDKCHCFEMMECMDHAA.bagio at prograph.it

If SDL team is happy with this, I can try to submit my own DInput
joystick
routines


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per
conto di

sdl at lee-morgan.net
Inviato: mercoledi 13 giugno 2001 4.49
A: sdl at lokigames.com
Oggetto: Re: [SDL] Win32 Joystick undetected? (SDL 1.2)

“Giovanni Bajo” writes:

There are a number of issues related to this. SDL right now is
using the

Joystick WinMM functions that are very unstable and bugged under
the new

operating systems (WinME and Win2K). The SDL code really needs
to be

reworked with DirectInput.
I’ve tried to use them, but eventually put my own Dinput stuff
in, it’s been
the only way to make QA guys happy :slight_smile:

I don’t suppose there’s any chance of folding it into SDL!?! I did
a

cursory read through of DirectInput stuff in dx7. Has it changed
much?,

was it difficult to add?.

Cheers

Lee


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com
[mailto:owner-sdl at lokigames.com]Per conto di

sdl at lee-morgan.net
Inviato: martedi 12 giugno 2001 9.23
A: SDL list
Oggetto: [SDL] Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type or
link

should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe
disabled??

DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " <<
SDL_JoystickNumAxes(JOYSTICK)) ;

DISPLAYMSG("Number of Buttons: " <<
SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " <<
SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }


sdl


sdl

Why? One may want to use GDI as video target but DirectInput as input.
I’d rather use DInput for joys whenever it is available, and automatically
fallback to mmjoy where it is not.—
Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per conto di
Olivier Dagenais
Inviato: mercoled? 13 giugno 2001 13.16
A: sdl at lokigames.com
Oggetto: [SDL] Re: Win32 Joystick undetected? (SDL 1.2)

Make sure the DirectInput is only activated if directx is the video
target and that a traditional windib/winmm is also possible, for
operating systems that don’t/can’t have DirectX installed. (ie: NT4)

Olivier A. Dagenais - Software Architect and Developer

“Giovanni Bajo” <@Giovanni_Bajo> wrote in message
news:IPEOJAKHBCEGDKCHCFEMMECMDHAA.@Giovanni_Bajo

If SDL team is happy with this, I can try to submit my own DInput
joystick
routines


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per
conto di

sdl at lee-morgan.net
Inviato: mercoledi 13 giugno 2001 4.49
A: sdl at lokigames.com
Oggetto: Re: [SDL] Win32 Joystick undetected? (SDL 1.2)

“Giovanni Bajo” <@Giovanni_Bajo> writes:

There are a number of issues related to this. SDL right now is
using the

Joystick WinMM functions that are very unstable and bugged under
the new

operating systems (WinME and Win2K). The SDL code really needs
to be

reworked with DirectInput.
I’ve tried to use them, but eventually put my own Dinput stuff
in, it’s been
the only way to make QA guys happy :slight_smile:

I don’t suppose there’s any chance of folding it into SDL!?! I did
a

cursory read through of DirectInput stuff in dx7. Has it changed
much?,

was it difficult to add?.

Cheers

Lee


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com
[mailto:owner-sdl at lokigames.com]Per conto di

sdl at lee-morgan.net
Inviato: martedi 12 giugno 2001 9.23
A: SDL list
Oggetto: [SDL] Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type or
link

should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe
disabled??

DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " <<
SDL_JoystickNumAxes(JOYSTICK)) ;

DISPLAYMSG("Number of Buttons: " <<
SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " <<
SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }


sdl


sdl

If SDL team is happy with this, I can try to submit my own DInput joystick
routines

That would be great. Make sure that you test them with a variety of
platforms and hardware configurations.

Thanks!
-Sam Lantinga, Lead Programmer, Loki Software, Inc.

Ah, this would work too. I just wanted to make sure this wasn’t going
to be a DX7-only DirectInput joystick patch and that there was some
way of specifying if one is going to be less usable on certain
platforms. For example, one of my soundcards doesn’t support
DirectSound very well at 44KHz, 16-bit, Stereo, so I have to use
WaveOut… If I don’t have a DirectInput-certified device but it
still works with the traditional mechanism, I’d like to be able to use
it.–

Olivier A. Dagenais - Software Architect and Developer

“Giovanni Bajo” wrote in message
news:IPEOJAKHBCEGDKCHCFEMKEDHDHAA.bagio at prograph.it

Why? One may want to use GDI as video target but DirectInput as
input.
I’d rather use DInput for joys whenever it is available, and
automatically
fallback to mmjoy where it is not.

Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per
conto di

Olivier Dagenais
Inviato: mercoled? 13 giugno 2001 13.16
A: sdl at lokigames.com
Oggetto: [SDL] Re: Win32 Joystick undetected? (SDL 1.2)

Make sure the DirectInput is only activated if directx is the
video

target and that a traditional windib/winmm is also possible, for
operating systems that don’t/can’t have DirectX installed. (ie:
NT4)


Olivier A. Dagenais - Software Architect and Developer

“Giovanni Bajo” wrote in message
news:IPEOJAKHBCEGDKCHCFEMMECMDHAA.bagio at prograph.it

If SDL team is happy with this, I can try to submit my own
DInput

joystick

routines


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com
[mailto:owner-sdl at lokigames.com]Per

conto di

sdl at lee-morgan.net
Inviato: mercoledi 13 giugno 2001 4.49
A: sdl at lokigames.com
Oggetto: Re: [SDL] Win32 Joystick undetected? (SDL 1.2)

“Giovanni Bajo” writes:

There are a number of issues related to this. SDL right now
is

using the

Joystick WinMM functions that are very unstable and bugged
under

the new

operating systems (WinME and Win2K). The SDL code really
needs

to be

reworked with DirectInput.
I’ve tried to use them, but eventually put my own Dinput
stuff

in, it’s been

the only way to make QA guys happy :slight_smile:

I don’t suppose there’s any chance of folding it into SDL!?! I
did

a

cursory read through of DirectInput stuff in dx7. Has it
changed

much?,

was it difficult to add?.

Cheers

Lee


Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

  • Black holes are generated when God divides by zero -

-----Messaggio originale-----
Da: owner-sdl at lokigames.com
[mailto:owner-sdl at lokigames.com]Per conto di

sdl at lee-morgan.net
Inviato: martedi 12 giugno 2001 9.23
A: SDL list
Oggetto: [SDL] Win32 Joystick undetected? (SDL 1.2)

Hi,

I’m unable to detect a joystick on win32 (98SE)

I’m using a M$ sidewinder Precision 2 on a USB link.

I presume SDL makes use of DirectInput ??? and so the type
or

link

should be mostly unimportant ???

SDL_NumJoysticks also always returns 0.

Is the joystick code working on Win32?

Cheers

Lee

Code is as documentation

SDL_InitSubSystem(SDL_INIT_JOYSTICK);
DISPLAYMSG( SDL_GetError() ) ;

// DISPLAY( SDL_NumJoysticks() ) ;
// if(SDL_NumJoysticks()>0){
JOYSTICK = SDL_JoystickOpen(0);
if(JOYSTICK) {
SDL_JoystickEventState(SDL_ENABLE) ; // !!events maybe
disabled??

DISPLAYMSG(“Opened Joystick 0”) ;
DISPLAYMSG("Name: " << SDL_JoystickName(0)) ;
DISPLAYMSG("Number of Axes: " <<
SDL_JoystickNumAxes(JOYSTICK)) ;

DISPLAYMSG("Number of Buttons: " <<
SDL_JoystickNumButtons(JOYSTICK)) ;
DISPLAYMSG("Number of Balls: " <<
SDL_JoystickNumBalls(JOYSTICK)) ;

} else
DISPLAYMSG(“Couldn’t open Joystick 0”) ;
// }


sdl


sdl

Sam Lantinga writes:

If SDL team is happy with this, I can try to submit my own DInput joystick
routines

That would be great. Make sure that you test them with a variety of
platforms and hardware configurations.

I’ve got a Win98SE, WinME (&linux) with a USB Sidewinder Precision
2 - if you haven’t got any access to these config’s to test with.

I’ve also got W2000 but its uninstalled as yet.> Thanks!

-Sam Lantinga, Lead Programmer, Loki Software, Inc.


sdl