aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/client
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2005-05-26 16:56:33 +0000
committerHolger Zickner <[email protected]>2005-05-26 16:56:33 +0000
commitc96baeae8717b80e23afabd4abdfb5aff0e8cbcc (patch)
tree5d0849dc34b79ed36c1f59353ac6ea5ae5361071 /src/jake2/client
parent152b65e3999ba7a618cdf934c830351f2f76cff2 (diff)
merge last changes from 0.9.4 branch
Diffstat (limited to 'src/jake2/client')
-rw-r--r--src/jake2/client/VID.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/jake2/client/VID.java b/src/jake2/client/VID.java
index b095e74..4b39403 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.15 2005-04-07 15:29:21 cawe Exp $
+ * $Id: VID.java,v 1.16 2005-05-26 16:56:33 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -255,23 +255,31 @@ public class VID extends Globals {
Globals.cl.refresh_prepped = false;
Globals.cls.disable_screen = 1.0f; // true;
- String defaultName = Renderer.getDefaultName();
if ( !LoadRefresh( vid_ref.string ) )
{
- if ( vid_ref.string.equals(defaultName) ) {
+ String renderer;
+ if (vid_ref.string.equals(Renderer.getPreferedName())) {
+ // try the default renderer as fallback after prefered
+ renderer = Renderer.getDefaultName();
+ } else {
+ // try the prefered renderer as first fallback
+ renderer = Renderer.getPreferedName();
+ }
+ if ( vid_ref.string.equals(Renderer.getDefaultName())) {
+ renderer = vid_ref.string;
Com.Printf("Refresh failed\n");
gl_mode = Cvar.Get( "gl_mode", "0", 0 );
if (gl_mode.value != 0.0f) {
Com.Printf("Trying mode 0\n");
Cvar.SetValue("gl_mode", 0);
if ( !LoadRefresh( vid_ref.string ) )
- Com.Error(Defines.ERR_FATAL, "Couldn't fall back to " + defaultName +" refresh!");
+ Com.Error(Defines.ERR_FATAL, "Couldn't fall back to " + renderer +" refresh!");
} else
- Com.Error(Defines.ERR_FATAL, "Couldn't fall back to " + defaultName +" refresh!");
+ Com.Error(Defines.ERR_FATAL, "Couldn't fall back to " + renderer +" refresh!");
}
- Cvar.Set("vid_ref", defaultName);
+ Cvar.Set("vid_ref", renderer);
/*
* drop the console if we fail to load a refresh