Fix phantom window freezing desktop on some systems
This commit is contained in:
parent
4a84210998
commit
c3fb744f47
2 changed files with 5 additions and 6 deletions
|
|
@ -3,6 +3,7 @@
|
|||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2005-2016 Christoph Oelckers et.al.
|
||||
** Copyright 2017-2025 GZDoom Maintainers and Contributors
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -446,11 +447,6 @@ IVideo *gl_CreateVideo()
|
|||
SystemBaseFrameBuffer::SystemBaseFrameBuffer (void *, bool fullscreen)
|
||||
: DFrameBuffer (vid_defwidth, vid_defheight)
|
||||
{
|
||||
if (Priv::window != nullptr)
|
||||
{
|
||||
SDL_SetWindowFullscreen(Priv::window, fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
|
||||
SDL_ShowWindow(Priv::window);
|
||||
}
|
||||
}
|
||||
|
||||
int SystemBaseFrameBuffer::GetClientWidth()
|
||||
|
|
@ -485,6 +481,7 @@ bool SystemBaseFrameBuffer::IsFullscreen ()
|
|||
|
||||
void SystemBaseFrameBuffer::ToggleFullscreen(bool yes)
|
||||
{
|
||||
SDL_ShowWindow(Priv::window);
|
||||
SDL_SetWindowFullscreen(Priv::window, yes ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
|
||||
if ( !yes )
|
||||
{
|
||||
|
|
@ -565,7 +562,7 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void *hMonitor, bool fullscreen)
|
|||
for ( ; glvers[glveridx][0] > 0; ++glveridx)
|
||||
{
|
||||
Priv::SetupPixelFormat(0, glvers[glveridx]);
|
||||
Priv::CreateWindow(SDL_WINDOW_OPENGL | (fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0));
|
||||
Priv::CreateWindow(SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN | (fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0));
|
||||
|
||||
if (Priv::window == nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
// Copyright 1993-1996 id Software
|
||||
// Copyright 1999-2016 Randy Heit
|
||||
// Copyright 2002-2016 Christoph Oelckers
|
||||
// Copyright 2017-2025 GZDoom Maintainers and Contributors
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -3539,6 +3540,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allw
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
setmodeneeded = true;
|
||||
}
|
||||
|
||||
// [SP] Force vanilla transparency auto-detection to re-detect our game lumps now
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue