Skip to content

Commit 4246776

Browse files
committed
Give screenshots taken in menu more descriptive filenames
1 parent a64f179 commit 4246776

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

releasenotes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Both zooming and panning, using the keyboard, mouse or controller, are now smoother.
2323
* A bug is fixed whereby if the <kbd><b>ENTER</b></kbd> key was bound to an action using the `bind` CCMD, when pressed it would also still show the previous player message.
2424
* A bug is fixed whereby strings of commands bound to mouse buttons using the `bind` CCMD wouldn’t always execute.
25-
* Screenshots taken when the palette displayed by the `palette` CCMD is shown are now saved as `Palette.png`.
25+
* Screenshots taken while a menu is open or the `palette` CCMD is in use now have more descriptive filenames.
2626
* Texture offsets are now corrected in certain maps built with [*ZDBSP*](https://zdoom.org/wiki/ZDBSP) extended nodes.
2727
* A bug is fixed whereby the `con_timestampformat`, `english`, `r_detail` and `units` CVARs couldn’t be changed in the console. These CVARs also weren’t being reset when vanilla mode was enabled.
2828
* The `playername` CVAR can now be changed back to its default of `“”` in the console.

src/m_menu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static int blurtic = -1;
114114
static int functionkey;
115115

116116
// current menudef
117-
static menu_t *currentmenu;
117+
menu_t *currentmenu;
118118

119119
int menuspindirection;
120120
int menuspinspeed;
@@ -342,7 +342,7 @@ static menuitem_t OptionsMenu[] =
342342
{ 1, "M_CONSOL", &M_Console, &s_M_CONSOLE }
343343
};
344344

345-
static menu_t OptionsDef =
345+
menu_t OptionsDef =
346346
{
347347
opt_end,
348348
&MainDef,
@@ -405,7 +405,7 @@ static menuitem_t SoundMenu[] =
405405
{ -1, "", NULL, NULL }
406406
};
407407

408-
static menu_t SoundDef =
408+
menu_t SoundDef =
409409
{
410410
sound_end,
411411
&OptionsDef,

src/m_menu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ extern bool helpscreen;
121121
extern bool palettescreen;
122122
extern bool quitting;
123123
extern bool reopenautomap;
124+
extern menu_t *currentmenu;
124125
extern int menuspindirection;
125126
extern int menuspinspeed;
126127
extern int quicksaveslot;
@@ -130,7 +131,9 @@ extern menu_t ExpDef;
130131
extern menu_t LoadDef;
131132
extern menu_t MainDef;
132133
extern menu_t NewDef;
134+
extern menu_t OptionsDef;
133135
extern menu_t SaveDef;
136+
extern menu_t SoundDef;
134137
extern bool customepisodes;
135138
extern uint64_t controllerwait;
136139
extern uint64_t mousewait;

src/v_video.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,24 @@ bool V_ScreenShot(void)
20332033
else if (helpscreen)
20342034
M_StringCopy(mapname, "Help", sizeof(mapname));
20352035
else if (menuactive)
2036-
M_StringCopy(mapname, "Menu", sizeof(mapname));
2036+
{
2037+
if (currentmenu == &MainDef)
2038+
M_StringCopy(mapname, "Main Menu", sizeof(mapname));
2039+
else if (currentmenu == &EpiDef)
2040+
M_StringCopy(mapname, "Episode Menu", sizeof(mapname));
2041+
else if (currentmenu == &ExpDef)
2042+
M_StringCopy(mapname, "Expansion Menu", sizeof(mapname));
2043+
else if (currentmenu == &NewDef)
2044+
M_StringCopy(mapname, "Skill Level Menu", sizeof(mapname));
2045+
else if (currentmenu == &LoadDef)
2046+
M_StringCopy(mapname, "Load Game Menu", sizeof(mapname));
2047+
else if (currentmenu == &SaveDef)
2048+
M_StringCopy(mapname, "Save Game Menu", sizeof(mapname));
2049+
else if (currentmenu == &OptionsDef)
2050+
M_StringCopy(mapname, "Options Menu", sizeof(mapname));
2051+
else if (currentmenu == &SoundDef)
2052+
M_StringCopy(mapname, "Sound Volume Menu", sizeof(mapname));
2053+
}
20372054
else if (automapactive)
20382055
M_StringCopy(mapname, "Automap", sizeof(mapname));
20392056
else if (paused)

0 commit comments

Comments
 (0)