X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_video_libavw.c;h=83f4921c35677005afeb608254a0697add198831;hb=88c327860915994aa345724a0373e0e1c0950c2a;hp=abdc2e2cd46623b24bea02bc17fb86508bab598d;hpb=1c1815eb9e51362d831d2faa4d34bd88138a2d2b;p=xonotic%2Fdarkplaces.git diff --git a/cl_video_libavw.c b/cl_video_libavw.c index abdc2e2c..83f4921c 100644 --- a/cl_video_libavw.c +++ b/cl_video_libavw.c @@ -117,9 +117,9 @@ typedef struct libavwstream_s } libavwstream_t; -cvar_t cl_video_libavw_minwidth = {CVAR_SAVE, "cl_video_libavw_minwidth", "0", "if videos width is lesser than minimal, thay will be upscaled"}; -cvar_t cl_video_libavw_minheight = {CVAR_SAVE, "cl_video_libavw_minheight", "0", "if videos height is lesser than minimal, thay will be upscaled"}; -cvar_t cl_video_libavw_scaler = {CVAR_SAVE, "cl_video_libavw_scaler", "1", "selects a scaler for libavcode played videos. Scalers are: 0 - bilinear, 1 - bicubic, 2 - x, 3 - point, 4 - area, 5 - bicublin, 6 - gauss, 7 - sinc, 8 - lanczos, 9 - spline."}; +cvar_t cl_video_libavw_minwidth = {CF_ARCHIVE, "cl_video_libavw_minwidth", "0", "if videos width is lesser than minimal, thay will be upscaled"}; +cvar_t cl_video_libavw_minheight = {CF_ARCHIVE, "cl_video_libavw_minheight", "0", "if videos height is lesser than minimal, thay will be upscaled"}; +cvar_t cl_video_libavw_scaler = {CF_ARCHIVE, "cl_video_libavw_scaler", "1", "selects a scaler for libavcode played videos. Scalers are: 0 - bilinear, 1 - bicubic, 2 - x, 3 - point, 4 - area, 5 - bicublin, 6 - gauss, 7 - sinc, 8 - lanczos, 9 - spline."}; // video extensions const char* libavw_extensions[] = @@ -355,16 +355,16 @@ static void libavw_message(int level, const char *message) Con_Printf(CON_ERROR "LibAvcodec panic: %s\n", message); } -qboolean LibAvW_OpenLibrary(void) +qbool LibAvW_OpenLibrary(void) { int errorcode; // COMMANDLINEOPTION: Video: -nolibavw disables libavcodec wrapper support - if (COM_CheckParm("-nolibavw")) + if (Sys_CheckParm("-nolibavw")) return false; // load DLL's - Sys_LoadLibrary(dllnames_libavw, &libavw_dll, libavwfuncs); + Sys_LoadDependency(dllnames_libavw, &libavw_dll, libavwfuncs); if (!libavw_dll) return false; @@ -372,7 +372,7 @@ qboolean LibAvW_OpenLibrary(void) if ((errorcode = qLibAvW_Init(&libavw_message))) { Con_Printf(CON_ERROR "LibAvW failed to initialize: %s\n", qLibAvW_ErrorString(errorcode)); - Sys_UnloadLibrary(&libavw_dll); + Sys_FreeLibrary(&libavw_dll); } Cvar_RegisterVariable(&cl_video_libavw_minwidth); @@ -384,5 +384,5 @@ qboolean LibAvW_OpenLibrary(void) void LibAvW_CloseLibrary(void) { - Sys_UnloadLibrary(&libavw_dll); + Sys_FreeLibrary(&libavw_dll); }