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
424d6531
Commit
424d6531
authored
10 years ago
by
Alam Ed Arias
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'Furyhunter/sdl2' into sdl2
parents
d438a8f8
b429cce3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sdl2/i_video.c
+13
-5
13 additions, 5 deletions
src/sdl2/i_video.c
with
13 additions
and
5 deletions
src/sdl2/i_video.c
+
13
−
5
View file @
424d6531
...
@@ -133,6 +133,7 @@ static SDL_bool mousegrabok = SDL_TRUE;
...
@@ -133,6 +133,7 @@ static SDL_bool mousegrabok = SDL_TRUE;
static
SDL_bool
videoblitok
=
SDL_FALSE
;
static
SDL_bool
videoblitok
=
SDL_FALSE
;
static
SDL_bool
exposevideo
=
SDL_FALSE
;
static
SDL_bool
exposevideo
=
SDL_FALSE
;
static
SDL_bool
usesdl2soft
=
SDL_FALSE
;
static
SDL_bool
usesdl2soft
=
SDL_FALSE
;
static
SDL_bool
borderlesswindow
=
SDL_FALSE
;
// SDL2 vars
// SDL2 vars
SDL_Window
*
window
;
SDL_Window
*
window
;
...
@@ -246,6 +247,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
...
@@ -246,6 +247,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
}
}
else
else
{
{
bpp
=
32
;
sw_texture_format
=
SDL_PIXELFORMAT_RGBA8888
;
sw_texture_format
=
SDL_PIXELFORMAT_RGBA8888
;
}
}
...
@@ -1386,6 +1388,7 @@ void I_FinishUpdate(void)
...
@@ -1386,6 +1388,7 @@ void I_FinishUpdate(void)
SDL_UpdateTexture
(
texture
,
&
rect
,
vidSurface
->
pixels
,
vidSurface
->
pitch
);
SDL_UpdateTexture
(
texture
,
&
rect
,
vidSurface
->
pixels
,
vidSurface
->
pitch
);
SDL_UnlockSurface
(
vidSurface
);
SDL_UnlockSurface
(
vidSurface
);
}
}
SDL_RenderClear
(
renderer
);
SDL_RenderCopy
(
renderer
,
texture
,
NULL
,
NULL
);
SDL_RenderCopy
(
renderer
,
texture
,
NULL
,
NULL
);
SDL_RenderPresent
(
renderer
);
SDL_RenderPresent
(
renderer
);
}
}
...
@@ -1659,7 +1662,12 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
...
@@ -1659,7 +1662,12 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
if
(
fullscreen
)
if
(
fullscreen
)
{
{
flags
=
SDL_WINDOW_FULLSCREEN_DESKTOP
;
flags
|=
SDL_WINDOW_FULLSCREEN_DESKTOP
;
}
if
(
borderlesswindow
)
{
flags
|=
SDL_WINDOW_BORDERLESS
;
}
}
#ifdef HWRENDER
#ifdef HWRENDER
...
@@ -1818,10 +1826,10 @@ void I_StartupGraphics(void)
...
@@ -1818,10 +1826,10 @@ void I_StartupGraphics(void)
{
{
rendermode
=
render_soft
;
rendermode
=
render_soft
;
}
}
if
(
M_CheckParm
(
"-softblit"
))
{
usesdl2soft
=
M_CheckParm
(
"-softblit"
);
usesdl2soft
=
SDL_TRUE
;
borderlesswindow
=
M_CheckParm
(
"-borderless"
)
;
}
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
SDLESSet
();
SDLESSet
();
VID_Command_ModeList_f
();
VID_Command_ModeList_f
();
...
...
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