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
75061793
Commit
75061793
authored
10 years ago
by
Alam Ed Arias
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'Furyhunter/sdl2' into sdl2
parents
0870d628
0d82e3b5
Branches
Branches containing commit
Tags
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
+29
-37
29 additions, 37 deletions
src/sdl2/i_video.c
with
29 additions
and
37 deletions
src/sdl2/i_video.c
+
29
−
37
View file @
75061793
...
...
@@ -1835,28 +1835,6 @@ void I_StartupGraphics(void)
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
SDLESSet
();
VID_Command_ModeList_f
();
// Create window
Impl_CreateWindow
(
USE_FULLSCREEN
);
Impl_SetWindowName
(
"SRB2"
);
vid
.
buffer
=
NULL
;
// For software mode
vid
.
width
=
BASEVIDWIDTH
;
// Default size for startup
vid
.
height
=
BASEVIDHEIGHT
;
// BitsPerPixel is the SDL interface's
vid
.
recalc
=
true
;
// Set up the console stufff
vid
.
direct
=
NULL
;
// Maybe direct access?
vid
.
bpp
=
1
;
// This is the game engine's Bpp
vid
.
WndParent
=
NULL
;
//For the window?
#ifdef HAVE_TTF
I_ShutdownTTF
();
#endif
// Window icon
#ifdef HAVE_IMAGE
icoSurface
=
IMG_ReadXPMFromArray
(
SDL_icon_xpm
);
#endif
Impl_SetWindowIcon
();
#ifdef HWRENDER
if
(
M_CheckParm
(
"-opengl"
)
||
rendermode
==
render_opengl
)
{
...
...
@@ -1889,25 +1867,39 @@ void I_StartupGraphics(void)
// check gl renderer lib
if
(
HWD
.
pfnGetRenderVersion
()
!=
VERSION
)
I_Error
(
"%s"
,
M_GetText
(
"The version of the renderer doesn't match the version of the executable
\n
Be sure you have installed SRB2 properly.
\n
"
));
vid
.
width
=
BASEVIDWIDTH
;
vid
.
height
=
BASEVIDHEIGHT
;
if
(
HWD
.
pfnInit
(
I_Error
))
// let load the OpenGL library
if
(
!
HWD
.
pfnInit
(
I_Error
))
// let load the OpenGL library
{
if
(
!
OglSdlSurface
(
vid
.
width
,
vid
.
height
))
{
rendermode
=
render_soft
;
}
}
else
rendermode
=
render_soft
;
}
}
#else
rendermode
=
render_soft
;
//force software mode when there no HWRENDER code
#endif
if
(
render_soft
==
rendermode
)
{
VID_SetMode
(
VID_GetModeForSize
(
BASEVIDWIDTH
,
BASEVIDHEIGHT
));
}
// Fury: we do window initialization after GL setup to allow
// SDL_GL_LoadLibrary to work well on Windows
// Create window
Impl_CreateWindow
(
USE_FULLSCREEN
);
Impl_SetWindowName
(
"SRB2"
);
vid
.
buffer
=
NULL
;
// For software mode
vid
.
width
=
BASEVIDWIDTH
;
// Default size for startup
vid
.
height
=
BASEVIDHEIGHT
;
// BitsPerPixel is the SDL interface's
vid
.
recalc
=
true
;
// Set up the console stufff
vid
.
direct
=
NULL
;
// Maybe direct access?
vid
.
bpp
=
1
;
// This is the game engine's Bpp
vid
.
WndParent
=
NULL
;
//For the window?
#ifdef HAVE_TTF
I_ShutdownTTF
();
#endif
// Window icon
#ifdef HAVE_IMAGE
icoSurface
=
IMG_ReadXPMFromArray
(
SDL_icon_xpm
);
#endif
Impl_SetWindowIcon
();
VID_SetMode
(
VID_GetModeForSize
(
BASEVIDWIDTH
,
BASEVIDHEIGHT
));
if
(
M_CheckParm
(
"-nomousegrab"
))
mousegrabok
=
SDL_FALSE
;
else
if
(
M_CheckParm
(
"-mousewarp"
)
||
SDL_SetRelativeMouseMode
(
SDL_TRUE
)
==
-
1
)
...
...
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