Change swtruecolor cvar to take effect immediately
This commit is contained in:
parent
e929eec80f
commit
b9d7a98aec
4 changed files with 30 additions and 19 deletions
|
|
@ -311,10 +311,18 @@ void I_RestoreWindowedPos ()
|
|||
MoveWindow (Window, winx, winy, winw, winh, TRUE);
|
||||
}
|
||||
|
||||
CVAR (Bool, swtruecolor, false, CVAR_ARCHIVE)
|
||||
|
||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||
|
||||
CUSTOM_CVAR(Bool, swtruecolor, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
||||
{
|
||||
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
||||
// way to force a CreateFramebuffer call without a lot of refactoring.
|
||||
NewWidth = screen->GetWidth();
|
||||
NewHeight = screen->GetHeight();
|
||||
NewBits = DisplayBits;
|
||||
setmodeneeded = true;
|
||||
}
|
||||
|
||||
CUSTOM_CVAR (Bool, fullscreen, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
||||
{
|
||||
NewWidth = screen->GetWidth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue