Controllers

Started by kevglass, August 29, 2004, 17:14:01

Previous topic - Next topic

kevglass

I quite like c) because it means any development is shared (i.e. macos!) Unfortunately it might require some changes in the JInput world becuase I know they had to work round not being able to get access to the AWT window (sic!).

However, I suspect some sort of "Context" object could be used in JInput to allow it to work with any window provider...

Kev

elias

I don't like c) because of the hidden window and all that crap. HID is simple and "crossplatform". In fact, I already have a mac os x (hid.c in native/macosx)  implementation of HID for mouse and keyboard from the time I experimented with input.

- elias

kevglass

Having done a bit more research:

1) HID is just a hardware standard? There's no common software API? (Maybe everyone else knew this, but it was news to me :))
2) The linux JInput plugin requires no window at all, so lwjgl could pick that up with no penalty

Kev

Endolf

Hi
 I can confirm, that the linux plugin requires no window at all. infact, one of the ways I tested it was to ssh into my dev box and fiddle with the gamepad (the joys of wireless gamepads). It's all console compatable :)

Endolf

P.S. After a longish discussion with KevGlass a solution to the plugin usability option has emerged, I'm putting it to the JInput list now to see how they take it. It means that each platform will have 1 jar and 1 native lib, rather than 3 jars, a native lib, and a system property or stange dir structure.

elias

Sounds good, but doesn't the win32 version use a hidden window? I've also heard about problems regarding JInput<->LWJGL input interactions. I think it was rgrzywinski.

- elias

elias

And if we are to use JInput for LWJGL Controller support, it would almost certainly be required that the native library can be merged into the lwjgl library at compile time (same goes for the jar, but that's a lesser problem I guess). Is that possible?

- elias

kevglass

The windows version currently uses a hidden window. However, the trade might be that someone implements a windows plugin for JInput that doesn't use a window (like the current LWJGL impl).

Since the JInput license is BSD I don't see any reason why the LWJGL build can't drag any source it requires into the build ;)

Kev

Endolf

Quote from: "elias"Sounds good, but doesn't the win32 version use a hidden window?

Yup, but looking at it, I'm not sure it needs to any more, tested ok without one for just a mouse and a keyboard, but no access to a joystick right now. Anyone willing/wanting to test let me know :)

QuoteI've also heard about problems regarding JInput<->LWJGL input interactions. I think it was rgrzywinski.

I've not heard of this at all though.

Endolf

Endolf

Quote from: "elias"And if we are to use JInput for LWJGL Controller support, it would almost certainly be required that the native library can be merged into the lwjgl library at compile time (same goes for the jar, but that's a lesser problem I guess). Is that possible?

I see no reason why not. The source is BSD, mingw and directx8+ is the only windows compile time requirements.

Endolf

Erestar


elias

Is there any reason why directx 8 is required (along with the window)? Couldn't JInput on win32 be implemented in win32 with the HID interface?

- elias

Endolf

Because it's not just HID devices that are supported, game port joysticks, non usb keyboards and mice etc. Same goes for linux.

Endolf

kevglass

Nothing to stop the implementation of a JInput plugin for windows that just used DirectInput (i.e. Not 8) ?

Kev

Endolf

Maybe it should read 'DirectInput from directx8+ required', the rest of directx is unimportant, but we use some features that were not present before directx 8. Seeing as LWJGL is a gaming lib, and most gaming machines can cope with dx8 (and will almost certainly have it installed, most are on 9 by now I imagine) that dependency shouldn't be an issue. Unless i'm missing something here?. The window seems to have been needed in the past, but I've done a quick test and don't seem to need it, I posted a message somewhere I think saying that i think it's no longer needed, but need to do some more testing.

Endolf

kevglass

Ah ha, even better! So, if LWJGL were to use JInput plugins wrapped up in some nice easy shell there could be support for multiple controllers on Windows, Linux and at least a start on the MacOS one?

And as and when someone with access to a Mac gets the chance to sort out input there JInput would benefit from a complete Mac Plugin?

Kev