diff options
author | Holger Zickner <[email protected]> | 2004-12-14 00:11:10 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2004-12-14 00:11:10 +0000 |
commit | cadbb63200c0b4634ca2c323c1b8310ed64b90ab (patch) | |
tree | 080b0abe7f10ab75dfedab4f8f8cd078e3770e2f /src/jake2/client | |
parent | a762a826574cb72f19ccbe1870688ff1b6010b77 (diff) |
merge LWJGL input system changes
Diffstat (limited to 'src/jake2/client')
-rw-r--r-- | src/jake2/client/VID.java | 24 | ||||
-rw-r--r-- | src/jake2/client/refexport_t.java | 5 |
2 files changed, 22 insertions, 7 deletions
diff --git a/src/jake2/client/VID.java b/src/jake2/client/VID.java index b77128b..5dc39d5 100644 --- a/src/jake2/client/VID.java +++ b/src/jake2/client/VID.java @@ -2,7 +2,7 @@ * VID.java * Copyright (C) 2003 * - * $Id: VID.java,v 1.9 2004-08-23 20:49:12 hzi Exp $ + * $Id: VID.java,v 1.10 2004-12-14 00:11:10 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -33,7 +33,6 @@ import jake2.qcommon.*; import jake2.render.Renderer; import jake2.sound.S; import jake2.sys.IN; -import jake2.sys.KBD; import jake2.util.Vargs; import java.awt.Dimension; @@ -155,7 +154,7 @@ public class VID extends Globals { static void FreeReflib() { if (Globals.re != null) { - KBD.Close(); + Globals.re.getKeyboardHandler().Close(); IN.Shutdown(); } @@ -173,7 +172,7 @@ public class VID extends Globals { if ( reflib_active ) { - KBD.Close(); + Globals.re.getKeyboardHandler().Close(); IN.Shutdown(); Globals.re.Shutdown(); @@ -221,7 +220,7 @@ public class VID extends Globals { } /* Init KBD */ - KBD.Init(); + Globals.re.getKeyboardHandler().Init(); Com.Printf( "------------------------------------\n"); reflib_active = true; @@ -329,7 +328,7 @@ public class VID extends Globals { { if ( reflib_active ) { - KBD.Close(); + Globals.re.getKeyboardHandler().Close(); IN.Shutdown(); Globals.re.Shutdown(); @@ -345,6 +344,7 @@ public class VID extends Globals { static final int REF_OPENGL_JOGL = 0; static final int REF_OPENGL_FASTJOGL =1; + static final int REF_OPENGL_LWJGL =2; static cvar_t gl_mode; static cvar_t gl_driver; @@ -531,6 +531,12 @@ public class VID extends Globals { if (gl_driver.modified) vid_ref.modified = true; break; + case REF_OPENGL_LWJGL : + Cvar.Set( "vid_ref", "lwjgl" ); + Cvar.Set( "gl_driver", "lwjgl" ); + if (gl_driver.modified) + vid_ref.modified = true; + break; } Menu.ForceMenuOff(); @@ -565,6 +571,7 @@ public class VID extends Globals { // "[Mesa 3-D glX ]", "[OpenGL jogl ]", "[OpenGL fastjogl]", + "[OpenGL lwjgl]", null }; static final String[] yesno_names = @@ -658,6 +665,11 @@ public class VID extends Globals { s_current_menu_index = OPENGL_MENU; s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_FASTJOGL; } + else if ( vid_ref.string.equalsIgnoreCase("lwjgl")) + { + s_current_menu_index = OPENGL_MENU; + s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_LWJGL; + } // else if (strcmp( vid_ref->string, "softx" ) == 0 ) // { // s_current_menu_index = SOFTWARE_MENU; diff --git a/src/jake2/client/refexport_t.java b/src/jake2/client/refexport_t.java index 340a8c0..a5c3b25 100644 --- a/src/jake2/client/refexport_t.java +++ b/src/jake2/client/refexport_t.java @@ -2,7 +2,7 @@ * refexport_t.java * Copyright (C) 2003 * - * $Id: refexport_t.java,v 1.2 2004-07-15 14:37:35 hzi Exp $ + * $Id: refexport_t.java,v 1.3 2004-12-14 00:11:10 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -29,6 +29,7 @@ package jake2.client; import jake2.qcommon.xcommand_t; import jake2.render.image_t; import jake2.render.model_t; +import jake2.sys.KBD; import java.awt.Dimension; import java.awt.DisplayMode; @@ -107,4 +108,6 @@ public interface refexport_t { int apiVersion(); DisplayMode[] getModeList(); + + KBD getKeyboardHandler(); } |