Restore old Mouse.create/Keyboard.create behavior which is to ignore create() when already created.

This commit is contained in:
Elias Naur 2006-11-16 12:29:52 +00:00
parent 1bb95e94f4
commit 70e3294b7b
2 changed files with 2 additions and 2 deletions

View file

@ -290,7 +290,7 @@ public class Keyboard {
*/
private static void create(InputImplementation impl) throws LWJGLException {
if (created)
throw new IllegalStateException("Destroy the Keyboard first.");
return;
if (!initialized)
initialize();
implementation = impl;

View file

@ -249,7 +249,7 @@ public class Mouse {
*/
private static void create(InputImplementation impl) throws LWJGLException {
if (created)
throw new IllegalStateException("Destroy the mouse first.");
return;
if (!initialized)
initialize();
implementation = impl;