mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Update screen index config variable after moving window
The wrong screen was shown in the settings when moving the window to another screen while in windowed mode.
This commit is contained in:
parent
86bf5424e3
commit
e4dddb95ce
|
@ -1539,6 +1539,7 @@ bool CGraphicsBackend_SDL_GL::UpdateDisplayMode(int Index)
|
|||
return false;
|
||||
}
|
||||
|
||||
g_Config.m_GfxScreen = Index;
|
||||
g_Config.m_GfxDesktopWidth = DisplayMode.w;
|
||||
g_Config.m_GfxDesktopHeight = DisplayMode.h;
|
||||
|
||||
|
|
|
@ -3929,8 +3929,10 @@ void CClient::SwitchWindowScreen(int Index)
|
|||
int IsFullscreen = g_Config.m_GfxFullscreen;
|
||||
int IsBorderless = g_Config.m_GfxBorderless;
|
||||
|
||||
if(Graphics()->SetWindowScreen(Index))
|
||||
g_Config.m_GfxScreen = Index;
|
||||
if(!Graphics()->SetWindowScreen(Index))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetWindowParams(3, false); // prevent DDNet to get stretch on monitors
|
||||
|
||||
|
|
Loading…
Reference in a new issue