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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_Config.m_GfxScreen = Index;
|
||||||
g_Config.m_GfxDesktopWidth = DisplayMode.w;
|
g_Config.m_GfxDesktopWidth = DisplayMode.w;
|
||||||
g_Config.m_GfxDesktopHeight = DisplayMode.h;
|
g_Config.m_GfxDesktopHeight = DisplayMode.h;
|
||||||
|
|
||||||
|
|
|
@ -3929,8 +3929,10 @@ void CClient::SwitchWindowScreen(int Index)
|
||||||
int IsFullscreen = g_Config.m_GfxFullscreen;
|
int IsFullscreen = g_Config.m_GfxFullscreen;
|
||||||
int IsBorderless = g_Config.m_GfxBorderless;
|
int IsBorderless = g_Config.m_GfxBorderless;
|
||||||
|
|
||||||
if(Graphics()->SetWindowScreen(Index))
|
if(!Graphics()->SetWindowScreen(Index))
|
||||||
g_Config.m_GfxScreen = Index;
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SetWindowParams(3, false); // prevent DDNet to get stretch on monitors
|
SetWindowParams(3, false); // prevent DDNet to get stretch on monitors
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue