LWJGL 1.0beta Released

Started by Matzon, June 02, 2006, 21:46:47

Previous topic - Next topic

elias

Quote from: "Rich"
Quote from: "Matzon"We're going to do a beta or two since there still are some issues to be fixed.

Is there somewhere I should be reporting bugs?  If there is, let me know and I'll post bug reports there rather than bothering you here.

I've discovered that, at least on an Intel-based Mac, the following code will never return true:

if (Keyboard.isStateKeySet(Keyboard.KEY_CAPITAL) == Keyboard.STATE_ON) {


The code above seems to work fine on Windows XP Pro.

While doing some experimentation, I found I could watch Keyboard.isKeyDown(Keyboard.KEY_CAPITAL) return true when the caps lock key is pressed, however.

isStateKeySet was only ever implemented for Windows. Instead I've removed it, since Toolkit.getLockingKeyState() does exactly the same thing, and is supported on all platforms).

- elias

Rich

Quote from: "elias"
Quote from: "Rich"I've discovered that, at least on an Intel-based Mac, the following code will never return true:

if (Keyboard.isStateKeySet(Keyboard.KEY_CAPITAL) == Keyboard.STATE_ON) {


The code above seems to work fine on Windows XP Pro.

While doing some experimentation, I found I could watch Keyboard.isKeyDown(Keyboard.KEY_CAPITAL) return true when the caps lock key is pressed, however.

isStateKeySet was only ever implemented for Windows. Instead I've removed it, since Toolkit.getLockingKeyState() does exactly the same thing, and is supported on all platforms).

- elias

I just tried this and found that it fails on my Intel iMac, as it always throws an UnsupportedOperationException.  I didn't try it elsewhere, as failure on one platform is enough to rule it out for me.  Right now, I just use:

Keyboard.isKeyDown(Keyboard.KEY_CAPITAL) || Keyboard.isStateKeySet(Keyboard.KEY_CAPITAL) == Keyboard.STATE_ON


to do the check.  This seems to work on Mac, Windows & Linux.  Ideally, however, Keyboard.isStateKeySet would be implemented on all three instead.

elias

Quote from: "Rich"Ideally, however, Keyboard.isStateKeySet would be implemented on all three instead.

I agree and that's why I removed the isStateKeySet. If someone figures out how to make it work reliably across platforms, then I'm open to re-introducing it.

- elias