fix: destroy keyboard before GL is destroyed

This commit is contained in:
Brian Matzon 2003-05-04 17:36:57 +00:00
parent 702d541fc6
commit 20291ac913
1 changed files with 3 additions and 3 deletions

View File

@ -202,6 +202,7 @@ public class FullScreenWindowedTest {
if (Keyboard.isKeyDown(Keyboard.KEY_F)) {
try {
Keyboard.destroy();
gl.destroy();
Display.setDisplayMode(mode);
@ -211,7 +212,6 @@ public class FullScreenWindowedTest {
glInit();
Keyboard.destroy();
Keyboard.create();
} catch (Exception e) {
e.printStackTrace();
@ -221,6 +221,7 @@ public class FullScreenWindowedTest {
//check for window key
if (Keyboard.isKeyDown(Keyboard.KEY_W)) {
try {
Keyboard.destroy();
gl.destroy();
Display.resetDisplayMode();
@ -230,7 +231,6 @@ public class FullScreenWindowedTest {
glInit();
Keyboard.destroy();
Keyboard.create();
} catch (Exception e) {
e.printStackTrace();
@ -284,8 +284,8 @@ public class FullScreenWindowedTest {
* Cleans up the test
*/
private void cleanup() {
gl.destroy();
Keyboard.destroy();
gl.destroy();
}
/**