From 2f67325278637a349bb86fa6fc388e527a75a5c9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 24 Nov 2008 19:01:09 +0000 Subject: 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 --- src/setup/display.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'src/setup/display.c') 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 #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); +} + -- cgit v1.2.3