mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-09 09:41:12 +00:00
Minor code cleanup & remove some unneeded resolution info from logs.
This commit is contained in:
parent
599644e885
commit
35f2937fd1
2 changed files with 13 additions and 25 deletions
34
src/screen.c
34
src/screen.c
|
@ -368,16 +368,13 @@ void SCR_CheckDefaultMode(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cv_fullscreen.value == 0)
|
CONS_Printf(M_GetText("Default resolution: %d x %d\n"), cv_scr_width.value, cv_scr_height.value);
|
||||||
{
|
CONS_Printf(M_GetText("Windowed resolution: %d x %d\n"), cv_scr_width_w.value, cv_scr_height_w.value);
|
||||||
CONS_Printf(M_GetText("Default windowed resolution: %d x %d (%d bits)\n"), cv_scr_width_w.value, cv_scr_height_w.value, cv_scr_depth.value);
|
CONS_Printf(M_GetText("Default bit depth: %d bits\n"), cv_scr_depth.value);
|
||||||
setmodeneeded = VID_GetModeForSize(cv_scr_width_w.value, cv_scr_height_w.value) + 1; // see note above
|
if (cv_fullscreen.value)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CONS_Printf(M_GetText("Default resolution: %d x %d (%d bits)\n"), cv_scr_width.value, cv_scr_height.value, cv_scr_depth.value);
|
|
||||||
setmodeneeded = VID_GetModeForSize(cv_scr_width.value, cv_scr_height.value) + 1; // see note above
|
setmodeneeded = VID_GetModeForSize(cv_scr_width.value, cv_scr_height.value) + 1; // see note above
|
||||||
}
|
else
|
||||||
|
setmodeneeded = VID_GetModeForSize(cv_scr_width_w.value, cv_scr_height_w.value) + 1; // see note above
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_renderer.value != (signed)rendermode)
|
if (cv_renderer.value != (signed)rendermode)
|
||||||
|
@ -395,17 +392,8 @@ void SCR_CheckDefaultMode(void)
|
||||||
// sets the modenum as the new default video mode to be saved in the config file
|
// sets the modenum as the new default video mode to be saved in the config file
|
||||||
void SCR_SetDefaultMode(void)
|
void SCR_SetDefaultMode(void)
|
||||||
{
|
{
|
||||||
// remember the default screen size
|
CV_SetValue(cv_fullscreen.value ? &cv_scr_width : &cv_scr_width_w, vid.width);
|
||||||
if (cv_fullscreen.value == 0)
|
CV_SetValue(cv_fullscreen.value ? &cv_scr_height : &cv_scr_height_w, vid.height);
|
||||||
{
|
|
||||||
CV_SetValue(&cv_scr_width_w, vid.width);
|
|
||||||
CV_SetValue(&cv_scr_height_w, vid.height);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CV_SetValue(&cv_scr_width, vid.width);
|
|
||||||
CV_SetValue(&cv_scr_height, vid.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change fullscreen on/off according to cv_fullscreen
|
// Change fullscreen on/off according to cv_fullscreen
|
||||||
|
@ -420,10 +408,10 @@ void SCR_ChangeFullscreen(void)
|
||||||
if (graphics_started)
|
if (graphics_started)
|
||||||
{
|
{
|
||||||
VID_PrepareModeList();
|
VID_PrepareModeList();
|
||||||
if (cv_fullscreen.value == 0)
|
if (cv_fullscreen.value)
|
||||||
setmodeneeded = VID_GetModeForSize(cv_scr_width_w.value, cv_scr_height_w.value) + 1;
|
|
||||||
else
|
|
||||||
setmodeneeded = VID_GetModeForSize(cv_scr_width.value, cv_scr_height.value) + 1;
|
setmodeneeded = VID_GetModeForSize(cv_scr_width.value, cv_scr_height.value) + 1;
|
||||||
|
else
|
||||||
|
setmodeneeded = VID_GetModeForSize(cv_scr_width_w.value, cv_scr_height_w.value) + 1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1795,7 +1795,7 @@ void I_StartupGraphics(void)
|
||||||
borderlesswindow = M_CheckParm("-borderless");
|
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);
|
||||||
VID_Command_ModeList_f();
|
//VID_Command_ModeList_f();
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode == render_opengl)
|
if (rendermode == render_opengl)
|
||||||
|
@ -1843,7 +1843,7 @@ void I_StartupGraphics(void)
|
||||||
realwidth = (Uint16)vid.width;
|
realwidth = (Uint16)vid.width;
|
||||||
realheight = (Uint16)vid.height;
|
realheight = (Uint16)vid.height;
|
||||||
|
|
||||||
VID_Command_Info_f();
|
//VID_Command_Info_f();
|
||||||
SDLdoUngrabMouse();
|
SDLdoUngrabMouse();
|
||||||
|
|
||||||
SDL_RaiseWindow(window);
|
SDL_RaiseWindow(window);
|
||||||
|
|
Loading…
Reference in a new issue