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
dc6f798a
Commit
dc6f798a
authored
10 years ago
by
Alam Ed Arias
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/master' into next
parents
c97eef23
5b07cf8f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sdl/i_system.c
+2
-0
2 additions, 0 deletions
src/sdl/i_system.c
src/sdl/i_video.c
+10
-74
10 additions, 74 deletions
src/sdl/i_video.c
with
12 additions
and
74 deletions
src/sdl/i_system.c
+
2
−
0
View file @
dc6f798a
...
...
@@ -1519,6 +1519,7 @@ static int joy_open2(const char *fname)
void
I_InitJoystick
(
void
)
{
I_ShutdownJoystick
();
SDL_SetHintWithPriority
(
"SDL_XINPUT_ENABLED"
,
"0"
,
SDL_HINT_OVERRIDE
);
if
(
!
strcmp
(
cv_usejoystick
.
string
,
"0"
)
||
M_CheckParm
(
"-nojoy"
))
return
;
if
(
joy_open
(
cv_usejoystick
.
string
)
!=
-
1
)
...
...
@@ -1534,6 +1535,7 @@ void I_InitJoystick(void)
void
I_InitJoystick2
(
void
)
{
I_ShutdownJoystick2
();
SDL_SetHintWithPriority
(
"SDL_XINPUT_ENABLED"
,
"0"
,
SDL_HINT_OVERRIDE
);
if
(
!
strcmp
(
cv_usejoystick2
.
string
,
"0"
)
||
M_CheckParm
(
"-nojoy"
))
return
;
if
(
joy_open2
(
cv_usejoystick2
.
string
)
!=
-
1
)
...
...
This diff is collapsed.
Click to expand it.
src/sdl/i_video.c
+
10
−
74
View file @
dc6f798a
...
...
@@ -83,7 +83,7 @@
#endif
// maximum number of windowed modes (see windowedModes[][])
#define MAXWINMODES (1
7
)
#define MAXWINMODES (1
8
)
/** \brief
*/
...
...
@@ -148,6 +148,7 @@ static INT32 windowedModes[MAXWINMODES][2] =
{
1920
,
1200
},
// 1.60,6.00
{
1920
,
1080
},
// 1.66
{
1680
,
1050
},
// 1.60,5.25
{
1600
,
1200
},
// 1.33
{
1600
,
900
},
// 1.66
{
1366
,
768
},
// 1.66
{
1440
,
900
},
// 1.60,4.50
...
...
@@ -629,50 +630,20 @@ static void VID_Command_Info_f (void)
static
void
VID_Command_ModeList_f
(
void
)
{
SDL2STUB
();
#if 0
#if !defined (DC) && !defined (_WIN32_WCE) && !defined (_PSP) && !defined(GP2X)
INT32 i;
#ifdef HWRENDER
if (rendermode == render_opengl)
modeList = SDL_ListModes(NULL, SDL_OPENGL|SDL_FULLSCREEN);
else
#endif
modeList = SDL_ListModes(NULL, surfaceFlagsF|SDL_HWSURFACE); //Alam: At least hardware surface
if (modeList == (SDL_Rect **)0 && cv_fullscreen.value)
{
CONS_Printf("%s", M_GetText("No video modes present\n"));
cv_fullscreen.value = 0;
}
else if (modeList != (SDL_Rect **)0)
// List windowed modes
INT32
i
=
0
;
CONS_Printf
(
"NOTE: Under SDL2, all modes are supported on all platforms.
\n
"
);
CONS_Printf
(
"Under opengl, fullscreen only supports native desktop resolution.
\n
"
);
CONS_Printf
(
"Under software, the mode is stretched up to desktop resolution.
\n
"
);
for
(
i
=
0
;
i
<
MAXWINMODES
;
i
++
)
{
numVidModes = 0;
if (modeList == (SDL_Rect **)-1)
numVidModes = -1; // should not happen with fullscreen modes
else while (modeList[numVidModes])
numVidModes++;
CONS_Printf
(
"%2d: %dx%d
\n
"
,
i
,
windowedModes
[
i
][
0
],
windowedModes
[
i
][
1
]);
}
CONS_Printf(M_GetText("Found %d FullScreen Video Modes:\n"), numVidModes);
for (i=0 ; i<numVidModes; i++)
{ // fullscreen modes
INT32 modeNum = firstEntry + i;
if (modeNum >= numVidModes)
break;
CONS_Printf(M_GetText("%dx%d and "),
modeList[modeNum]->w,
modeList[modeNum]->h);
}
CONS_Printf("%s", M_GetText("None\n"));
#endif
#endif
}
static
void
VID_Command_Mode_f
(
void
)
{
SDL2STUB
();
#if 0
INT32
modenum
;
if
(
COM_Argc
()
!=
2
)
...
...
@@ -687,7 +658,6 @@ static void VID_Command_Mode_f (void)
CONS_Printf
(
M_GetText
(
"Video mode not present
\n
"
));
else
setmodeneeded
=
modenum
+
1
;
// request vid mode change
#endif
}
#if 0
...
...
@@ -1614,37 +1584,6 @@ static inline void SDLESSet(void)
SDL2STUB
();
}
static
void
SDLWMSet
(
void
)
{
SDL2STUB
();
#if 0
#ifdef RPC_NO_WINDOWS_H
SDL_SysWMinfo SDLWM;
memset(&SDLWM,0,sizeof (SDL_SysWMinfo));
SDL_VERSION(&SDLWM.version)
if (SDL_GetWMInfo(&SDLWM))
vid.WndParent = SDLWM.window;
else
vid.WndParent = INVALID_HANDLE_VALUE;
if (vid.WndParent != INVALID_HANDLE_VALUE)
{
SetFocus(vid.WndParent);
ShowWindow(vid.WndParent, SW_SHOW);
}
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
#endif
SDL_EventState(SDL_VIDEORESIZE, SDL_IGNORE);
#endif
}
#if 0
static void* SDLGetDirect(void)
{
// you can not use the video memory in pixels member in fullscreen mode
return NULL;
}
#endif
INT32
VID_SetMode
(
INT32
modeNum
)
{
SDLdoUngrabMouse
();
...
...
@@ -1652,7 +1591,7 @@ INT32 VID_SetMode(INT32 modeNum)
vid
.
recalc
=
1
;
vid
.
bpp
=
1
;
if
(
modeNum
>=
0
&&
modeNum
<
MAXWINMODES
-
1
)
if
(
modeNum
>=
0
&&
modeNum
<
MAXWINMODES
)
{
vid
.
width
=
windowedModes
[
modeNum
][
0
];
vid
.
height
=
windowedModes
[
modeNum
][
1
];
...
...
@@ -1757,7 +1696,6 @@ static void Impl_SetWindowName(const char *title)
{
return
;
}
SDL2STUB
();
SDL_SetWindowTitle
(
window
,
title
);
}
...
...
@@ -1959,8 +1897,6 @@ void I_StartupGraphics(void)
if
(
!
disable_mouse
)
SDL_ShowCursor
(
SDL_DISABLE
);
SDLdoUngrabMouse
();
SDLWMSet
();
graphics_started
=
true
;
}
...
...
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