shithub: choc

Download patch

ref: cb3520a3dac5d67904d21604a786fcb31baaaf02
parent: bba2a845a5ce3b6aabbe6f801636910819302289
author: Fabian Greffrath <[email protected]>
date: Mon Nov 2 06:40:00 EST 2015

disk icon: Make displaying the disk activity indicator optional

--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -370,6 +370,7 @@
     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
 
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -171,6 +171,10 @@
 
 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 @@
 	    I_VideoBuffer[ (SCREENHEIGHT-1)*SCREENWIDTH + i] = 0x0;
     }
 
-    if (disk_indicator == disk_on)
+    if (show_diskicon && disk_indicator == disk_on)
     {
 	V_BeginRead();
     }
--- a/src/i_video.h
+++ b/src/i_video.h
@@ -151,5 +151,6 @@
 extern int screen_bpp;
 extern int fullscreen;
 extern int aspect_ratio_correct;
+extern int show_diskicon;
 
 #endif
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -848,6 +848,15 @@
     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.
     //
 
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -106,6 +106,7 @@
 
 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 @@
                                       &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",
@@ -723,6 +731,11 @@
      || gamemission == strife)
     {
         M_BindIntVariable("show_endoom",               &show_endoom);
+    }
+
+    if (gamemission == doom || gamemission == strife)
+    {
+        M_BindIntVariable("show_diskicon",             &show_diskicon);
     }
 
     if (gamemission == heretic || gamemission == hexen || gamemission == strife)
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -442,6 +442,7 @@
     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);