summaryrefslogtreecommitdiff
path: root/src/setup/display.c
diff options
context:
space:
mode:
authorSimon Howard2008-11-24 19:01:09 +0000
committerSimon Howard2008-11-24 19:01:09 +0000
commit2f67325278637a349bb86fa6fc388e527a75a5c9 (patch)
tree43654566eb557d5f909ed45b16b86c3346a1798c /src/setup/display.c
parent09f98f80fc8ed9e42ea937804618952f03244bde (diff)
downloadchocolate-doom-2f67325278637a349bb86fa6fc388e527a75a5c9.tar.gz
chocolate-doom-2f67325278637a349bb86fa6fc388e527a75a5c9.tar.bz2
chocolate-doom-2f67325278637a349bb86fa6fc388e527a75a5c9.zip
Make chocolate-setup use m_controls.c definitions for config file
keyboard/mouse/joystick variables. Make other configuration file variables static and add bind functions. Subversion-branch: /branches/raven-branch Subversion-revision: 1387
Diffstat (limited to 'src/setup/display.c')
-rw-r--r--src/setup/display.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/setup/display.c b/src/setup/display.c
index 5e9d4fcf..efb659a3 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -22,6 +22,7 @@
#include <string.h>
#include "textscreen.h"
+#include "m_config.h"
#include "display.h"
@@ -65,14 +66,14 @@ static screen_mode_t *screen_modes_fullscreen = NULL;
static int vidmode = 0;
-char *video_driver = "";
-int autoadjust_video_settings = 1;
-int aspect_ratio_correct = 1;
-int fullscreen = 1;
-int screen_width = 320;
-int screen_height = 200;
-int startup_delay = 1000;
-int show_endoom = 1;
+static char *video_driver = "";
+static int autoadjust_video_settings = 1;
+static int aspect_ratio_correct = 1;
+static int fullscreen = 1;
+static int screen_width = 320;
+static int screen_height = 200;
+static int startup_delay = 1000;
+static int show_endoom = 1;
// These are the last screen width/height values that were chosen by the
// user. These are used when finding the "nearest" mode, so when
@@ -436,3 +437,17 @@ void ConfigDisplay(void)
GenerateModesTable(NULL, modes_table);
}
+void BindDisplayVariables(void)
+{
+ M_BindVariable("autoadjust_video_settings", &autoadjust_video_settings);
+ M_BindVariable("aspect_ratio_correct", &aspect_ratio_correct);
+ M_BindVariable("fullscreen", &fullscreen);
+ M_BindVariable("screen_width", &screen_width);
+ M_BindVariable("screen_height", &screen_height);
+ M_BindVariable("startup_delay", &startup_delay);
+ M_BindVariable("video_driver", &video_driver);
+
+ // doom, heretic only:
+ M_BindVariable("show_endoom", &show_endoom);
+}
+