Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Richard Gobeille
EDuke32
Commits
d753d281
Commit
d753d281
authored
Apr 22, 2022
by
Richard Gobeille
Browse files
engine: only redetect video modes if the window was actually moved to a different display
parent
bb844c12
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/build/src/sdlayer.cpp
View file @
d753d281
...
...
@@ -2671,13 +2671,17 @@ int32_t handleevents_pollsdl(void)
case
SDL_WINDOWEVENT_MOVED
:
{
if
(
fullscreen
)
break
;
g_windowPos
.
x
=
ev
.
window
.
data1
;
g_windowPos
.
y
=
ev
.
window
.
data2
;
g_windowPos
=
{
ev
.
window
.
data1
,
ev
.
window
.
data2
};
g_windowPosValid
=
true
;
r_displayindex
=
SDL_GetWindowDisplayIndex
(
sdl_window
);
modeschecked
=
0
;
videoGetModes
();
int
displayindex
=
SDL_GetWindowDisplayIndex
(
sdl_window
);
if
(
r_displayindex
!=
displayindex
||
!
modeschecked
)
{
r_displayindex
=
displayindex
;
modeschecked
=
0
;
videoGetModes
();
}
break
;
}
case
SDL_WINDOWEVENT_RESIZED
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment