Changed 3ZB2 game DLL to use inline Q_vsnprintf() function instead of abstracting _vsnprintf().

Changed missionpack and Zaero game DLLs to use _MSC_VER insead of _WIN32 macro for using Q_vsnprintf() inline function.
This commit is contained in:
Knightmare66 2021-03-11 22:57:01 -05:00
parent 2b1aff408d
commit 751fbac9de
3 changed files with 9 additions and 4 deletions

View file

@ -51,8 +51,13 @@ typedef enum {false, true} qboolean;
#endif
// from Quake3 source
#ifdef WIN32
#define Q_vsnprintf _vsnprintf
#ifdef _MSC_VER // _WIN32
//#define Q_vsnprintf _vsnprintf
__inline int Q_vsnprintf (char *Dest, size_t Count, const char *Format, va_list Args) {
int ret = _vsnprintf(Dest, Count, Format, Args);
Dest[Count-1] = 0; // null terminate
return ret;
}
#else
// TODO: do we need Mac define?
#define Q_vsnprintf vsnprintf

View file

@ -65,7 +65,7 @@ typedef enum {false, true} qboolean;
#endif
// from Quake3 source
#ifdef WIN32
#ifdef _MSC_VER // _WIN32
//#define Q_vsnprintf _vsnprintf
__inline int Q_vsnprintf (char *Dest, size_t Count, const char *Format, va_list Args) {
int ret = _vsnprintf(Dest, Count, Format, Args);

View file

@ -53,7 +53,7 @@ typedef enum {false, true} qboolean;
#endif
// from Quake3 source
#ifdef WIN32
#ifdef _MSC_VER // _WIN32
//#define Q_vsnprintf _vsnprintf
__inline int Q_vsnprintf (char *Dest, size_t Count, const char *Format, va_list Args) {
int ret = _vsnprintf(Dest, Count, Format, Args);