mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Com_game_f: try execing quake.rc automatically..
Not convinced there are any issues with this, and it solves these problems: - change to new gamedir without execing quake.rc and exit: the config.cfg in the new gamedir will be clobbered with the settings from the previous gamedir. - discrepancy between -game command line arg and "game" command. Video mode is locked during the "exec quake.rc" to prevent the mode from changing. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1417 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
d8719d6e4f
commit
50c52ae0eb
3 changed files with 22 additions and 2 deletions
|
@ -2207,8 +2207,10 @@ static void COM_Game_f (void)
|
|||
DemoList_Rebuild ();
|
||||
|
||||
Con_Printf("\"game\" changed to \"%s\"\n", COM_SkipPath(com_gamedir));
|
||||
Con_Printf("enter \"exec quake.rc\" to load new configs\n");
|
||||
//Cbuf_InsertText ("exec quake.rc\n");
|
||||
|
||||
VID_Lock ();
|
||||
Cbuf_AddText ("exec quake.rc\n");
|
||||
Cbuf_AddText ("vid_unlock\n");
|
||||
}
|
||||
else //Diplay the current gamedir
|
||||
Con_Printf("\"game\" is \"%s\"\n", COM_SkipPath(com_gamedir));
|
||||
|
|
|
@ -851,6 +851,22 @@ static void VID_Unlock (void)
|
|||
VID_SyncCvars();
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
VID_Lock -- ericw
|
||||
|
||||
Subsequent changes to vid_* mode settings, and vid_restart commands, will
|
||||
be ignored until the "vid_unlock" command is run.
|
||||
|
||||
Used when changing gamedirs so the current settings override what was saved
|
||||
in the config.cfg.
|
||||
================
|
||||
*/
|
||||
void VID_Lock (void)
|
||||
{
|
||||
vid_locked = true;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
//
|
||||
// OPENGL STUFF
|
||||
|
@ -1757,6 +1773,7 @@ void VID_SyncCvars (void)
|
|||
}
|
||||
Cvar_SetValueQuick (&vid_bpp, VID_GetCurrentBPP());
|
||||
Cvar_SetQuick (&vid_fullscreen, VID_GetFullscreen() ? "1" : "0");
|
||||
Cvar_SetQuick (&vid_desktopfullscreen, VID_GetDesktopFullscreen() ? "1" : "0");
|
||||
Cvar_SetQuick (&vid_vsync, VID_GetVSync() ? "1" : "0");
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ void VID_Toggle (void);
|
|||
void *VID_GetWindow (void);
|
||||
qboolean VID_HasMouseOrInputFocus (void);
|
||||
qboolean VID_IsMinimized (void);
|
||||
void VID_Lock (void);
|
||||
|
||||
#endif /* __VID_DEFS_H */
|
||||
|
||||
|
|
Loading…
Reference in a new issue