Rise
The Vieneo Province
Toggle main menu visibility
Loading...
Searching...
No Matches
TerrainSurfaceDetail.h
Go to the documentation of this file.
1
#pragma once
2
#include <windows.h>
3
#include <cwchar>
4
5
namespace
TerrainSurfaceDetail
6
{
7
// Live A/B gate: at most twice a second, once per frame, never per tile.
8
inline
bool
Enabled
()
9
{
10
static
const
bool
disabledAtLaunch = wcsstr(GetCommandLineW(), L
"--terrain-detail-off"
) !=
nullptr
;
11
if
(disabledAtLaunch)
return
false
;
12
static
ULONGLONG nextCheck = 0;
13
static
bool
enabled =
true
;
14
const
ULONGLONG now = GetTickCount64();
15
if
(now >= nextCheck)
16
{
17
enabled = GetFileAttributesW(L
"terrain-detail.off"
) == INVALID_FILE_ATTRIBUTES;
18
nextCheck = now + 500;
19
}
20
return
enabled;
21
}
22
}
TerrainSurfaceDetail
Definition
TerrainSurfaceDetail.h:6
TerrainSurfaceDetail::Enabled
bool Enabled()
Definition
TerrainSurfaceDetail.h:8
Viewscreen
TerrainSurfaceDetail.h
Generated on
for Rise by
1.18.0