From 40ce444015308479ff0e938e228e75835b2db950 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 17 Dec 2019 19:21:29 +0000 Subject: [PATCH] Fix some compile issues. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5595 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/snd_al.c | 49 ++++++++++++++++++++------------------- imgtool.c | 2 ++ plugins/avplug/avencode.c | 5 ++-- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/engine/client/snd_al.c b/engine/client/snd_al.c index deb2f8785..acc62d1b3 100644 --- a/engine/client/snd_al.c +++ b/engine/client/snd_al.c @@ -50,34 +50,35 @@ We also have no doppler with WebAudio. #define AL_APIENTRY #endif -#define palGetError alGetError -#define palSourcef alSourcef -#define palSourcei alSourcei -#define palSourcePlayv alSourcePlayv -#define palSourceStopv alSourceStopv -#define palSourcePlay alSourcePlay -#define palSourceStop alSourceStop -#define palDopplerFactor alDopplerFactor -#define palGenBuffers alGenBuffers -#define palIsBuffer alIsBuffer -#define palBufferData alBufferData -#define palDeleteBuffers alDeleteBuffers -#define palListenerfv alListenerfv -#define palSourcefv alSourcefv -#define palGetString alGetString -#define palGenSources alGenSources -#define palListenerf alListenerf -#define palDeleteBuffers alDeleteBuffers -#define palDeleteSources alDeleteSources -#define palSpeedOfSound alSpeedOfSound -#define palDistanceModel alDistanceModel -#define palGetSourcei alGetSourcei +#define palGetError alGetError +#define palSourcef alSourcef +#define palSourcei alSourcei +#define palSourcePlayv alSourcePlayv +#define palSourceStopv alSourceStopv +#define palSourcePlay alSourcePlay +#define palSourceStop alSourceStop +#define palDopplerFactor alDopplerFactor +#define palGenBuffers alGenBuffers +#define palIsBuffer alIsBuffer +#define palBufferData alBufferData +#define palDeleteBuffers alDeleteBuffers +#define palListenerfv alListenerfv +#define palSourcefv alSourcefv +#define palGetString alGetString +#define palGenSources alGenSources +#define palIsSource alIsSource +#define palListenerf alListenerf +#define palDeleteBuffers alDeleteBuffers +#define palDeleteSources alDeleteSources +#define palSpeedOfSound alSpeedOfSound +#define palDistanceModel alDistanceModel +#define palGetSourcei alGetSourcei #define palSourceQueueBuffers alSourceQueueBuffers #define palSourceUnqueueBuffers alSourceUnqueueBuffers -#define palcOpenDevice alcOpenDevice -#define palcCloseDevice alcCloseDevice +#define palcOpenDevice alcOpenDevice +#define palcCloseDevice alcCloseDevice #define palcCreateContext alcCreateContext #define palcDestroyContext alcDestroyContext #define palcMakeContextCurrent alcMakeContextCurrent diff --git a/imgtool.c b/imgtool.c index 0fb0f2357..e7f3e880b 100644 --- a/imgtool.c +++ b/imgtool.c @@ -266,7 +266,9 @@ void QDECL Q_strncpyz(char *d, const char *s, int n) void VARGS Q_vsnprintfz (char *dest, size_t size, const char *fmt, va_list argptr) { #ifdef _WIN32 +#undef _vsnprintf _vsnprintf (dest, size, fmt, argptr); +#define _vsnprintf unsafe_vsnprintf #else #ifdef _DEBUG if ((size_t)vsnprintf (dest, size, fmt, argptr) > size-1) diff --git a/plugins/avplug/avencode.c b/plugins/avplug/avencode.c index ceb5f0ce7..73de973c2 100644 --- a/plugins/avplug/avencode.c +++ b/plugins/avplug/avencode.c @@ -824,9 +824,9 @@ qboolean AVEnc_Init(void) ffmpeg_format_force = cvarfuncs->GetNVFDG(ENCODERNAME"_format_force", "", 0, "Forces the output container format. If blank, will guess based upon filename extension.", ENCODERNAME); ffmpeg_videocodec = cvarfuncs->GetNVFDG(ENCODERNAME"_videocodec", "", 0, "Forces which video encoder to use. If blank, guesses based upon container defaults.\nCommon names are libx264 (software), x264_nvenc (hardware accelerated)", ENCODERNAME); ffmpeg_videobitrate = cvarfuncs->GetNVFDG(ENCODERNAME"_videobitrate", "", 0, "Specifies the target video bitrate", ENCODERNAME); - ffmpeg_videoforcewidth = cvarfuncs->GetNVFDG(ENCODERNAME"_videoforcewidth", "", 0, "Rescales the input video width. Best to leave blank in order to record the video at the native resolution.", ENCODERNAME); + ffmpeg_videoforcewidth = cvarfuncs->GetNVFDG(ENCODERNAME"_videoforcewidth", "", 0, "Rescales the input video width. Best to leave blank in order to record the video at the native resolution.", ENCODERNAME); ffmpeg_videoforceheight = cvarfuncs->GetNVFDG(ENCODERNAME"_videoforceheight", "", 0, "Rescales the input video height. Best to leave blank in order to record the video at the native resolution.", ENCODERNAME); - ffmpeg_videopreset = cvarfuncs->GetNVFDG(ENCODERNAME"_videopreset", "veryfast", 0, "Specifies which codec preset to use, for codecs that support such presets.", ENCODERNAME); + ffmpeg_videopreset = cvarfuncs->GetNVFDG(ENCODERNAME"_videopreset", "veryfast", 0, "Specifies which codec preset to use, for codecs that support such presets.", ENCODERNAME); ffmpeg_video_crf = cvarfuncs->GetNVFDG(ENCODERNAME"_video_crf", "", 0, "Specifies the 'Constant Rate Factor' codec setting.\nA value of 0 is 'lossless', a value of 51 is 'worst quality posible', a value of 23 is default.", ENCODERNAME); ffmpeg_audiocodec = cvarfuncs->GetNVFDG(ENCODERNAME"_audiocodec", "", 0, "Forces which audio encoder to use. If blank, guesses based upon container defaults.", ENCODERNAME); ffmpeg_audiobitrate = cvarfuncs->GetNVFDG(ENCODERNAME"_audiobitrate", "", 0, "Specifies the target audio bitrate", ENCODERNAME); @@ -835,6 +835,7 @@ qboolean AVEnc_Init(void) { // cmdfuncs->AddCommand(ENCODERNAME"_configure"); cmdfuncs->AddCommand(ENCODERNAME"_nvidia"); + cmdfuncs->AddCommand(ENCODERNAME"_defaults"); } return true;