commit cb3520a3dac5d67904d21604a786fcb31baaaf02
Author: Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Mon Nov 2 11:40:00 2015 +0100
Commit: Fabian Greffrath <fabian@greffrath.com>
CommitDate: Mon Nov 2 11:40:00 2015 +0100
disk icon: Make displaying the disk activity indicator optional
---
src/doom/d_main.c | 1 +
src/i_video.c | 6 +++++-
src/i_video.h | 1 +
src/m_config.c | 9 +++++++++
src/setup/display.c | 13 +++++++++++++
src/strife/d_main.c | 1 +
6 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index 1d3eb1dc..9dabb931 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -370,6 +370,7 @@ void D_BindVariables(void)
M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit);
M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit);
M_BindIntVariable("show_endoom", &show_endoom);
+ M_BindIntVariable("show_diskicon", &show_diskicon);
// Multiplayer chat macros
diff --git a/src/i_video.c b/src/i_video.c
index 61cfcdd8..91b6a7f9 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -171,6 +171,10 @@ int novert = 0;
int png_screenshots = 0;
+// Display disk activity indicator.
+
+int show_diskicon = 1;
+
// if true, I_VideoBuffer is screen->pixels
static boolean native_surface;
@@ -955,7 +959,7 @@ void I_FinishUpdate (void)
I_VideoBuffer[ (SCREENHEIGHT-1)*SCREENWIDTH + i] = 0x0;
}
- if (disk_indicator == disk_on)
+ if (show_diskicon && disk_indicator == disk_on)
{
V_BeginRead();
}
diff --git a/src/i_video.h b/src/i_video.h
index 49ccb607..46144d2b 100644
--- a/src/i_video.h
+++ b/src/i_video.h
@@ -151,5 +151,6 @@ extern int screen_height;
extern int screen_bpp;
extern int fullscreen;
extern int aspect_ratio_correct;
+extern int show_diskicon;
#endif
diff --git a/src/m_config.c b/src/m_config.c
index 3393b57f..61f90a53 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -847,6 +847,15 @@ static default_t extra_defaults_list[] =
CONFIG_VARIABLE_INT(show_endoom),
+ //!
+ // @game doom strife
+ //
+ // If non-zero, a disk activity indicator is displayed when data is read
+ // from disk. If zero, the disk activity indicator is not displayed.
+ //
+
+ CONFIG_VARIABLE_INT(show_diskicon),
+
//!
// If non-zero, save screenshots in PNG format.
//
diff --git a/src/setup/display.c b/src/setup/display.c
index e94db94e..4fbee1e8 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -106,6 +106,7 @@ static int usegamma = 0;
int graphical_startup = 1;
int show_endoom = 1;
+int show_diskicon = 1;
int png_screenshots = 0;
// These are the last screen width/height values that were chosen by the
@@ -559,6 +560,13 @@ static void AdvancedDisplayConfig(TXT_UNCAST_ARG(widget),
&show_endoom));
}
+ if (gamemission == doom || gamemission == strife)
+ {
+ TXT_AddWidget(window,
+ TXT_NewCheckBox("Show disk activity indicator",
+ &show_diskicon));
+ }
+
#ifdef HAVE_LIBPNG
TXT_AddWidget(window,
TXT_NewCheckBox("Save screenshots in PNG format",
@@ -725,6 +733,11 @@ void BindDisplayVariables(void)
M_BindIntVariable("show_endoom", &show_endoom);
}
+ if (gamemission == doom || gamemission == strife)
+ {
+ M_BindIntVariable("show_diskicon", &show_diskicon);
+ }
+
if (gamemission == heretic || gamemission == hexen || gamemission == strife)
{
M_BindIntVariable("graphical_startup", &graphical_startup);
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 1fb808b7..984d460b 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -442,6 +442,7 @@ void D_BindVariables(void)
M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit);
M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit);
M_BindIntVariable("show_endoom", &show_endoom);
+ M_BindIntVariable("show_diskicon", &show_diskicon);
M_BindIntVariable("graphical_startup", &graphical_startup);
M_BindStringVariable("back_flat", &back_flat);