diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 49ac9dc8e..27c5abe01 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -895,7 +895,7 @@ void D_RegisterClientCommands(void) COM_AddCommand("minigen", M_MinimapGenerate); CV_RegisterVar(&cv_screenshot_colorprofile); - CV_RegisterVar(&cv_moviemode); + CV_RegisterVar(&cv_lossless_recorder); #ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES M_AVRecorder_AddCommands(); @@ -2503,7 +2503,7 @@ static void Command_Stopdemo_f(void) static void Command_StartMovie_f(void) { - M_StartMovie(cv_moviemode.value); + M_StartMovie(cv_lossless_recorder.value); } static void Command_StopMovie_f(void) diff --git a/src/k_menu.h b/src/k_menu.h index 305722615..caefb7eba 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -561,8 +561,6 @@ extern consvar_t cv_autorecord; void M_SetMenuDelay(UINT8 i); -void Moviemode_mode_Onchange(void); - void M_SortServerList(void); void M_MapMenuControls(event_t *ev); diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 5ae80e81e..0e3a8a060 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -114,8 +114,8 @@ typedef off_t off64_t; consvar_t cv_screenshot_colorprofile = CVAR_INIT ("screenshot_colorprofile", "Yes", CV_SAVE, CV_YesNo, NULL); -static CV_PossibleValue_t moviemode_cons_t[] = {{MM_GIF, "GIF"}, {MM_APNG, "aPNG"}, {MM_SCREENSHOT, "Screenshots"}, {MM_AVRECORDER, "WebM"}, {0, NULL}}; -consvar_t cv_moviemode = CVAR_INIT ("moviemode_mode", "WebM", CV_SAVE|CV_CALL, moviemode_cons_t, Moviemode_mode_Onchange); +static CV_PossibleValue_t lossless_recorder_cons_t[] = {{MM_GIF, "GIF"}, {MM_APNG, "aPNG"}, {MM_SCREENSHOT, "Screenshots"}, {0, NULL}}; +consvar_t cv_lossless_recorder = CVAR_INIT ("lossless_recorder", "GIF", CV_SAVE, lossless_recorder_cons_t, NULL); static CV_PossibleValue_t zlib_mem_level_t[] = { {1, "(Min Memory) 1"}, @@ -1866,7 +1866,7 @@ boolean M_ScreenshotResponder(event_t *ev) } else { - M_StartMovie(static_cast(cv_moviemode.value)); + M_StartMovie(static_cast(cv_lossless_recorder.value)); } break; diff --git a/src/m_misc.h b/src/m_misc.h index 558a5904b..f11617612 100644 --- a/src/m_misc.h +++ b/src/m_misc.h @@ -43,7 +43,7 @@ typedef enum { extern moviemode_t moviemode; extern consvar_t cv_screenshot_colorprofile; -extern consvar_t cv_moviemode; +extern consvar_t cv_lossless_recorder; extern consvar_t cv_zlib_memory, cv_zlib_level, cv_zlib_strategy, cv_zlib_window_bits; extern consvar_t cv_zlib_memorya, cv_zlib_levela, cv_zlib_strategya, cv_zlib_window_bitsa; extern consvar_t cv_apng_delay, cv_apng_downscale; diff --git a/src/menus/options-1.c b/src/menus/options-1.c index 0d2cdb341..b853c89a6 100644 --- a/src/menus/options-1.c +++ b/src/menus/options-1.c @@ -100,9 +100,6 @@ void M_InitOptions(INT32 choice) // So that pause doesn't go to the main menu... OPTIONS_MainDef.prevMenu = currentMenu; - // This will disable or enable the textboxes of the affected menus before we get to them. - Moviemode_mode_Onchange(); - M_SetupNextMenu(&OPTIONS_MainDef, false); } diff --git a/src/menus/options-data-screenshots.c b/src/menus/options-data-screenshots.c index 1693c9400..d67c2dc5e 100644 --- a/src/menus/options-data-screenshots.c +++ b/src/menus/options-data-screenshots.c @@ -9,19 +9,23 @@ menuitem_t OPTIONS_DataScreenshot[] = { +#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES {IT_HEADER, "MOVIE RECORDING (F9)", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "Recording Format", "What file format will movies will be recorded in?", - NULL, {.cvar = &cv_moviemode}, 0, 0}, - -#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES {IT_STRING | IT_CVAR, "Real-Time Data", "If enabled, shows fps, duration and filesize of recording in real-time.", NULL, {.cvar = &cv_movie_showfps}, 0, 0}, -#else - {IT_SPACE | IT_NOTHING, NULL, NULL, - NULL, {NULL}, 0, 0}, #endif + + {IT_SPACE | IT_NOTHING, NULL, NULL, + NULL, {NULL}, 0, 0}, + + {IT_HEADER, "LOSSLESS RECORDING (F10)", NULL, + NULL, {NULL}, 0, 0}, + + {IT_STRING | IT_CVAR, "Recording Format", "What file format will lossless recordings use?", + NULL, {.cvar = &cv_lossless_recorder}, 0, 0}, + }; menu_t OPTIONS_DataScreenshotDef = { @@ -39,10 +43,3 @@ menu_t OPTIONS_DataScreenshotDef = { NULL, NULL, }; - -void Moviemode_mode_Onchange(void) -{ - // opt 3 in a 0 based array, you get the idea... - OPTIONS_DataScreenshot[2].status = - (cv_moviemode.value == MM_AVRECORDER ? IT_CVAR|IT_STRING : IT_DISABLED); -}