Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
005b5027
Commit
005b5027
authored
10 years ago
by
Eidolon
Browse files
Options
Downloads
Patches
Plain Diff
sdl2: limit fullscreen resolution in OpenGL
parent
88907222
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sdl2/i_video.c
+9
-8
9 additions, 8 deletions
src/sdl2/i_video.c
with
9 additions
and
8 deletions
src/sdl2/i_video.c
+
9
−
8
View file @
005b5027
...
...
@@ -185,14 +185,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
{
wasfullscreen
=
SDL_TRUE
;
SDL_SetWindowFullscreen
(
window
,
SDL_WINDOW_FULLSCREEN_DESKTOP
);
// Logical fullscreen is not implemented yet for OpenGL, so...
// Special case handling
if
(
rendermode
==
render_opengl
)
{
int
sdlw
,
sdlh
;
SDL_GetWindowSize
(
window
,
&
sdlw
,
&
sdlh
);
VID_SetMode
(
VID_GetModeForSize
(
sdlw
,
sdlh
));
}
}
else
if
(
!
fullscreen
&&
wasfullscreen
)
{
...
...
@@ -217,6 +209,15 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
if
(
rendermode
==
render_opengl
)
{
int
sdlw
,
sdlh
;
SDL_GetWindowSize
(
window
,
&
sdlw
,
&
sdlh
);
// Logical fullscreen is not implemented yet for OpenGL, so...
// Special case handling
if
(
USE_FULLSCREEN
&&
width
!=
sdlw
&&
height
!=
sdlh
)
{
VID_SetMode
(
VID_GetModeForSize
(
sdlw
,
sdlh
));
return
;
}
OglSdlSurface
(
vid
.
width
,
vid
.
height
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment