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
afa113f1
Commit
afa113f1
authored
Feb 26, 2018
by
Evan Ramos
Browse files
Use the user's desktop resolution, fullscreen, as the default, instead of 1024x768 windowed.
From-SVN: r6704
parent
1e50ebdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/build/src/sdlayer.cpp
View file @
afa113f1
...
...
@@ -474,7 +474,11 @@ int main(int argc, char *argv[])
#elif defined(HAVE_GTK2)
// Pre-initialize SDL video system in order to make sure XInitThreads() is called
// before GTK starts talking to X11.
SDL_Init
(
SDL_INIT_VIDEO
);
uint32_t
inited
=
SDL_WasInit
(
SDL_INIT_VIDEO
);
if
(
inited
==
0
)
SDL_Init
(
SDL_INIT_VIDEO
);
else
if
(
!
(
inited
&
SDL_INIT_VIDEO
))
SDL_InitSubSystem
(
SDL_INIT_VIDEO
);
gtkbuild_init
(
&
argc
,
&
argv
);
#endif
...
...
@@ -597,7 +601,14 @@ int32_t initsystem(void)
if
(
sdlayer_checkversion
())
return
-
1
;
if
(
SDL_Init
(
sdlinitflags
))
int32_t
err
=
0
;
uint32_t
inited
=
SDL_WasInit
(
sdlinitflags
);
if
(
inited
==
0
)
err
=
SDL_Init
(
sdlinitflags
);
else
if
((
inited
&
sdlinitflags
)
!=
sdlinitflags
)
err
=
SDL_InitSubSystem
(
sdlinitflags
&
~
inited
);
if
(
err
)
{
initprintf
(
"Initialization failed! (%s)
\n
Non-interactive mode enabled
\n
"
,
SDL_GetError
());
novideo
=
1
;
...
...
source/duke3d/src/config.cpp
View file @
afa113f1
...
...
@@ -133,6 +133,10 @@ void CONFIG_SetDefaultKeys(const char (*keyptr)[MAXGAMEFUNCLEN])
}
}
#if defined SDL_TARGET && SDL_TARGET > 1
# include "sdl_inc.h"
#endif
void
CONFIG_SetDefaults
(
void
)
{
// JBF 20031211
...
...
@@ -152,11 +156,28 @@ void CONFIG_SetDefaults(void)
ud
.
config
.
ScreenWidth
=
droidinfo
.
screen_width
;
ud
.
config
.
ScreenHeight
=
droidinfo
.
screen_height
;
#else
ud
.
config
.
ScreenWidth
=
1024
;
ud
.
config
.
ScreenHeight
=
768
;
# if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
uint32_t
inited
=
SDL_WasInit
(
SDL_INIT_VIDEO
);
if
(
inited
==
0
)
SDL_Init
(
SDL_INIT_VIDEO
);
else
if
(
!
(
inited
&
SDL_INIT_VIDEO
))
SDL_InitSubSystem
(
SDL_INIT_VIDEO
);
SDL_DisplayMode
dm
;
if
(
SDL_GetDesktopDisplayMode
(
0
,
&
dm
)
==
0
)
{
ud
.
config
.
ScreenWidth
=
dm
.
w
;
ud
.
config
.
ScreenHeight
=
dm
.
h
;
}
else
# endif
{
ud
.
config
.
ScreenWidth
=
1024
;
ud
.
config
.
ScreenHeight
=
768
;
}
#endif
ud
.
config
.
ScreenMode
=
0
;
ud
.
config
.
ScreenMode
=
1
;
#ifdef USE_OPENGL
ud
.
config
.
ScreenBPP
=
32
;
...
...
LeoD
@LeoD
mentioned in issue
#25
·
Apr 30, 2020
mentioned in issue
#25
mentioned in issue #25
Toggle commit list
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