diff --git a/source/console.c b/source/console.c index d808e3e..1cc60c8 100644 --- a/source/console.c +++ b/source/console.c @@ -1286,7 +1286,7 @@ void LOG_Init(quakeparms_t *parms) return; inittime = time(NULL); - strftime(session, sizeof(session), "%m/%" PRIi32 "/%Y %H:%M:%S", localtime(&inittime)); + strftime(session, sizeof(session), "%m/%u/%Y %H:%M:%S", localtime(&inittime)); q_snprintf(logfilename, sizeof(logfilename), "%s/qconsole.log", parms->basedir); // unlink (logfilename); diff --git a/source/pr_exec.c b/source/pr_exec.c index eaf49ad..b1c5b21 100644 --- a/source/pr_exec.c +++ b/source/pr_exec.c @@ -391,8 +391,8 @@ void PR_ExecuteProgram(func_t fnum) CASE(OP_EQ_V) OPC->flt = OPA->vec[0] == OPB->vec[0] && - OPA->vec[1] == OPB->vec[1] && - OPA->vec[2] == OPB->vec[2]; + OPA->vec[1] == OPB->vec[1] && + OPA->vec[2] == OPB->vec[2]; BREAK CASE(OP_EQ_S) OPC->flt = !strcmp(PR_GetString(OPA->string), PR_GetString(OPB->string)); @@ -402,8 +402,8 @@ void PR_ExecuteProgram(func_t fnum) CASE(OP_NE_V) OPC->flt = OPA->vec[0] != OPB->vec[0] || - OPA->vec[1] != OPB->vec[1] || - OPA->vec[2] != OPB->vec[2]; + OPA->vec[1] != OPB->vec[1] || + OPA->vec[2] != OPB->vec[2]; BREAK CASE(OP_NE_S) OPC->flt = strcmp(PR_GetString(OPA->string), PR_GetString(OPB->string)); diff --git a/source/sdl/gl_vidsdl.c b/source/sdl/gl_vidsdl.c index 8781db7..7081d3c 100644 --- a/source/sdl/gl_vidsdl.c +++ b/source/sdl/gl_vidsdl.c @@ -415,7 +415,7 @@ This is passed to SDL_SetWindowDisplayMode to specify a pixel format with the requested bpp. If we didn't care about bpp we could just pass NULL. ================ */ -static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int32_t width, int32_t height, int32_t refreshrate, int32_t bpp) +static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int32_t width, int32_t height, int32_t refreshrate, uint32_t bpp) { static SDL_DisplayMode mode; const int32_t sdlmodes = SDL_GetNumDisplayModes(0); @@ -426,9 +426,7 @@ static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int32_t width, int32_t height, i if(SDL_GetDisplayMode(0, i, &mode) != 0) continue; - if(mode.w == width && mode.h == height - && SDL_BITSPERPIXEL(mode.format) == bpp - && mode.refresh_rate == refreshrate) + if(mode.w == width && mode.h == height && SDL_BITSPERPIXEL(mode.format) == bpp && mode.refresh_rate == refreshrate) { return &mode; } diff --git a/source/unix/sys_sdl_unix.c b/source/unix/sys_sdl_unix.c index 2fd3e50..794d737 100644 --- a/source/unix/sys_sdl_unix.c +++ b/source/unix/sys_sdl_unix.c @@ -230,7 +230,7 @@ static char const *Sys_GetUserDir(void) char const *system_dir; if((system_dir = getenv("XDG_DATA_HOME"))) - q_snprintf(user_dir, sizeof(user_dir), "%s/%s/%s", home_dir, system_dir, app_name); + q_snprintf(user_dir, sizeof(user_dir), "%s/%s", system_dir, app_name); else { if(!(home_dir = Sys_GetHomeDir()))