Skip to content

Commit 418ff82

Browse files
committed
Merge branch 'master' into for-0.56.0/sync
2 parents 8716a06 + 11e6b88 commit 418ff82

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

src/common/Defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3939

4040
#define PRODUCT_APPID "net.unvanquished.Unvanquished"
4141

42-
#define PRODUCT_VERSION "0.55.4"
42+
#define PRODUCT_VERSION "0.55.5"
4343

4444
/** Default base package */
4545
#define DEFAULT_BASE_PAK PRODUCT_NAME_LOWER

src/engine/client/cl_scrn.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Maryland 20850 USA.
3737
#include "client.h"
3838
#include "qcommon/q_unicode.h"
3939

40+
#if defined(__APPLE__) && defined(BUILD_GRAPHICAL_CLIENT)
41+
#include <SDL3/SDL.h>
42+
#endif
43+
4044
bool scr_initialized; // ready to draw
4145

4246
/*
@@ -299,6 +303,16 @@ void SCR_UpdateScreen()
299303

300304
recursive = 1;
301305

306+
#if defined(__APPLE__) && defined(BUILD_GRAPHICAL_CLIENT)
307+
if ( cls.state == connstate_t::CA_LOADING )
308+
{
309+
// Mitigate #1812. Calling SDL_PumpEvents 3 times makes the loading screen frames show up,
310+
// except the first one.
311+
SDL_PumpEvents();
312+
SDL_PumpEvents();
313+
SDL_PumpEvents();
314+
}
315+
#endif
302316
// If there is no VM, there are also no rendering commands issued. Stop the renderer in
303317
// that case.
304318
if ( cgvm.IsActive() )

src/engine/sys/sdl_glimp.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -988,10 +988,7 @@ static bool GLimp_RecreateWindowWhenChange( const bool fullscreen, const bool bo
988988

989989
if ( fullscreen != currentFullscreen )
990990
{
991-
Uint32 flags = fullscreen ? SDL_WINDOW_FULLSCREEN : 0;
992-
int sdlToggled = SDL_SetWindowFullscreen( window, flags );
993-
994-
if ( sdlToggled < 0 )
991+
if ( !SDL_SetWindowFullscreen( window, fullscreen ) )
995992
{
996993
GLimp_DestroyWindowIfExists();
997994

@@ -2914,7 +2911,6 @@ void GLimp_HandleCvars()
29142911

29152912
if ( Util::optional<bool> wantFullscreen = r_fullscreen.GetModifiedValue() )
29162913
{
2917-
int sdlToggled = false;
29182914
bool needToToggle = true;
29192915
bool fullscreen = !!( SDL_GetWindowFlags( window ) & SDL_WINDOW_FULLSCREEN );
29202916

@@ -2923,10 +2919,7 @@ void GLimp_HandleCvars()
29232919

29242920
if ( needToToggle )
29252921
{
2926-
Uint32 flags = *wantFullscreen ? SDL_WINDOW_FULLSCREEN : 0;
2927-
sdlToggled = SDL_SetWindowFullscreen( window, flags );
2928-
2929-
if ( sdlToggled < 0 )
2922+
if ( !SDL_SetWindowFullscreen( window, *wantFullscreen ) )
29302923
{
29312924
Log::Warn( "SDL_SetWindowFullscreen failed: %s", SDL_GetError() );
29322925
Log::Warn( "Trying vid_restart" );

0 commit comments

Comments
 (0)