Show Posts
|
|
Pages: [1]
|
|
1
|
Java Game APIs & Engines / JInput / Button state recognition prior to Java start-up
|
on: 2008-05-15 23:13:12
|
|
Maybe this question was answered already, but regarding button state polling, let's say I have a single-button controller with the button locked in the PRESSED position. I then start up a Java program that kicks off a thread that does a getPollData() on the component. I'm seeing that the value returned by getPollData() is 0.0 and not 1.0. Only after my Java app has loaded can I toggle the button and see getPollData() return 1.0 when pressed and 0.0 when released. Is there a way in JInput to determine if a button is pressed/released immediately on start-up of my app, without having to rely on "changes" in button state? Thanks.
|
|
|
|
|
2
|
Java Game APIs & Engines / JInput / Re: Getting Additional Controller Information
|
on: 2008-01-10 14:16:24
|
|
Endolf, do you know if anyone else has been having problems getting the getPortNumber() method to work in Controller? If I can't rely on the Controller array order, getPortNumber() seems to be my only other option at this point, and I still can't seem to get it working on Windows or Linux. Thanks for the help.
|
|
|
|
|
3
|
Java Game APIs & Engines / JInput / Re: Getting Additional Controller Information
|
on: 2008-01-09 14:12:27
|
|
I fully intend to use the headset as a game controller, albeit single-button for the PTT. In fact, it's recognized as an "installed game controller" in the Control Panel. I'm handling the audio portion with Java's sound package's Mixer objects. For now, I was just wondering whether there was any correlation between the driver instance # for the headset (which is also a game controller) in the registry and the order in which Controller objects were returned in the array after a getControllers() call (since getPortNumber() doesn't seem to be working). Or should I take another approach to determining the array ordering? Thanks again for the help.
|
|
|
|
|
4
|
Java Game APIs & Engines / JInput / Re: Getting Additional Controller Information
|
on: 2008-01-08 17:59:11
|
|
I think I'm already plugging directly into the USB ports actually, and no such luck using the getPortNumber() method. My ultimate goal is to predetermine the ordering of the returned Controller array based on USB push-to-talk (PTT) headset devices I have plugged in. I'm using a Java program called jUSB to obtain the Vendor ID and Product ID of headsets I have plugged in. I can also determine the driver "instance" of the attached headsets. For example, everytime I attach a USB headset into a USB port on my computer for the first time, an entry gets placed into the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ USB folder of my registry. The Driver field for the entry is:
{36FC9E60-C465-11CF-8056-444553540000} \ xxxx
, where the value xxxx seems to get incremented each time a headset is intially plugged into a USB port that has never had a headset before. One pseudo-pattern I'm seeing right now is that if one USB port has instance (x) of the headset driver, and the second port has instance (x+1), then the lower-numbered instance (i.e. the first USB port) will have its PTT button status correspond to the first Controller in the Controller array.
I say it's a pseudo-pattern because it's consistent about 90% of the time for devices with identical vendor and product IDs. However, I also have to account for a monaural headset that has the same vendor ID but different product ID. If I have one of these monaural headsets plugged in and another of a different kind plugged in, the monaural headset's PTT button status ALWAYS seems to get placed first into the Controller array.
Am I just spinning my wheels with this approach? I was hoping there would be an easier way. Thanks for the help.
|
|
|
|
|
7
|
Java Game APIs & Engines / JInput / Getting Additional Controller Information
|
on: 2008-01-04 21:55:28
|
|
Hello,
Has any headway been made regarding JInput and its ability to provide handling for multiple Controllers of the exact same type? For example, when you receive back an array of Controllers after calling getControllers(), would it be possible to obtain the USB Bus/Port Number (or any other info) that the controller is attached to?
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|