shithub: choc

Download patch

ref: dccc76cfd0dda5b6756372451c5738cc129d3e85
parent: 81d5f811e9d3d1c672978790da10c91d3a8d7663
author: Fabian Greffrath <[email protected]>
date: Mon Mar 17 13:31:59 EDT 2014

Add PNG screenshots to advanced video options menu.

--- a/src/m_config.c
+++ b/src/m_config.c
@@ -814,6 +814,12 @@
     CONFIG_VARIABLE_INT(show_endoom),
 
     //!
+    // If non-zero, save screenshots in PNG format.
+    //
+
+    CONFIG_VARIABLE_INT(png_screenshots),
+
+    //!
     // @game doom strife
     //
     // If non-zero, the Vanilla savegame limit is enforced; if the
@@ -1434,12 +1440,6 @@
     //
 
     CONFIG_VARIABLE_KEY(key_multi_msgplayer8),
-
-    //!
-    // If non-zero, save screenshots in PNG format.
-    //
-
-    CONFIG_VARIABLE_INT(png_screenshots),
 };
 
 static default_collection_t extra_defaults =
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -32,6 +32,7 @@
 #include "mode.h"
 
 #include "display.h"
+#include "config.h"
 
 extern void RestartTextscreen(void);
 
@@ -561,6 +562,12 @@
                       TXT_NewCheckBox("Show ENDOOM screen on exit",
                                       &show_endoom));
     }
+
+#ifdef HAVE_LIBPNG
+    TXT_AddWidget(window,
+                  TXT_NewCheckBox("Save screenshots in PNG format",
+                                  &png_screenshots));
+#endif
 
     TXT_SignalConnect(ar_checkbox, "changed", GenerateModesTable, modes_table);
 }