diff --git a/changelog.txt b/changelog.txt index 6d7a687..130ce14 100644 --- a/changelog.txt +++ b/changelog.txt @@ -25,6 +25,8 @@ chg: with r_backend GL3, depth fade with MSAA now requires GLSL 4.00 at a minimu chg: with r_backend GL3, alpha to coverage now requires GLSL 4.00 at a minimum +fix: the Linux/FreeBSD client could crash during start-up + fix: with r_backend D3D11, the alpha channel's blend factors now match the original Q3 behavior this affects shaders that use the following blendFunc modes: GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA examples: jumppads on cpm3a and cpmctf3, jumppad trims on q3wcp14, shiny walls on q3wcp9 diff --git a/code/linux/sdl_core.cpp b/code/linux/sdl_core.cpp index 4a0df93..04b8ef2 100644 --- a/code/linux/sdl_core.cpp +++ b/code/linux/sdl_core.cpp @@ -370,13 +370,18 @@ static void sdl_X11( const XEvent* event ) static void sdl_Event( const SDL_Event* event ) { + // Note that CVar checks are necessary here because event polling + // can actually start before the main loop does, + // i.e. CVars can be uninitialized by the time we get here. + switch (event->type) { case SDL_QUIT: Com_Quit(0); break; case SDL_KEYDOWN: - if (sdl_focused && Sys_Milliseconds() - sdl_focusTime >= in_focusDelay->integer) + // the CVar check means we'll ignore all keydown events until the main loop starts + if (in_focusDelay != NULL && sdl_focused && Sys_Milliseconds() - sdl_focusTime >= in_focusDelay->integer) sdl_Key(&event->key, qtrue); break;