mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Add r_togglecomposition cvar on Windows for Roma Loom.
r_togglecomposition: enable/disable toggle of desktop composition when initializing screen modes default value: 1 git-svn-id: https://svn.eduke32.com/eduke32@3371 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
05a550c08d
commit
a4bbf30c3a
1 changed files with 19 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
|
#include "osd.h"
|
||||||
#include "winbits.h"
|
#include "winbits.h"
|
||||||
|
|
||||||
#ifndef DEBUGGINGAIDS
|
#ifndef DEBUGGINGAIDS
|
||||||
|
@ -34,6 +35,8 @@ static OSVERSIONINFOEX osv;
|
||||||
|
|
||||||
static HMODULE nedhandle = NULL;
|
static HMODULE nedhandle = NULL;
|
||||||
|
|
||||||
|
static int32_t togglecomp = 1;
|
||||||
|
|
||||||
//
|
//
|
||||||
// CheckWinVersion() -- check to see what version of Windows we happen to be running under
|
// CheckWinVersion() -- check to see what version of Windows we happen to be running under
|
||||||
//
|
//
|
||||||
|
@ -207,6 +210,21 @@ void win_open(void)
|
||||||
|
|
||||||
void win_init(void)
|
void win_init(void)
|
||||||
{
|
{
|
||||||
|
uint32_t i;
|
||||||
|
|
||||||
|
cvar_t cvars_win[] =
|
||||||
|
{
|
||||||
|
{ "r_togglecomposition","r_togglecomposition: enable/disable toggle of desktop composition when initializing screen modes",(void *) &togglecomp, CVAR_BOOL, 0, 1 },
|
||||||
|
};
|
||||||
|
|
||||||
|
for (i=0; i<sizeof(cvars_win)/sizeof(cvars_win[0]); i++)
|
||||||
|
{
|
||||||
|
if (OSD_RegisterCvar(&cvars_win[i]))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
OSD_RegisterFunction(cvars_win[i].name, cvars_win[i].desc, osdcmd_cvar_set);
|
||||||
|
}
|
||||||
|
|
||||||
win_printversion();
|
win_printversion();
|
||||||
|
|
||||||
if (nedhandle)
|
if (nedhandle)
|
||||||
|
@ -215,7 +233,7 @@ void win_init(void)
|
||||||
|
|
||||||
void win_setvideomode(int32_t c)
|
void win_setvideomode(int32_t c)
|
||||||
{
|
{
|
||||||
if (osv.dwMajorVersion >= 6 && osv.dwMinorVersion < 2)
|
if (togglecomp && osv.dwMajorVersion == 6 && osv.dwMinorVersion < 2)
|
||||||
ToggleDesktopComposition(c < 16);
|
ToggleDesktopComposition(c < 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue