mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[dxvk] Add config option to enable the HUD
This commit is contained in:
parent
4fd41f8550
commit
af15d85baa
11
dxvk.conf
11
dxvk.conf
@ -210,4 +210,13 @@
|
||||
# - Auto: Don't change the default
|
||||
# - True, False: Always enable / disable
|
||||
|
||||
# dxvk.useEarlyDiscard = Auto
|
||||
# dxvk.useEarlyDiscard = Auto
|
||||
|
||||
|
||||
# Sets enabled HUD elements
|
||||
#
|
||||
# Behaves like the DXVK_HUD environment variable if the
|
||||
# environment variable is not set, otherwise it will be
|
||||
# ignored. The syntax is identical.
|
||||
|
||||
# dxvk.hud =
|
||||
|
@ -8,6 +8,7 @@ namespace dxvk {
|
||||
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
||||
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
||||
useEarlyDiscard = config.getOption<Tristate>("dxvk.useEarlyDiscard", Tristate::Auto);
|
||||
hud = config.getOption<std::string>("dxvk.hud", "");
|
||||
}
|
||||
|
||||
}
|
@ -21,6 +21,9 @@ namespace dxvk {
|
||||
/// Shader-related options
|
||||
Tristate useRawSsbo;
|
||||
Tristate useEarlyDiscard;
|
||||
|
||||
/// HUD elements
|
||||
std::string hud;
|
||||
};
|
||||
|
||||
}
|
@ -59,8 +59,13 @@ namespace dxvk::hud {
|
||||
|
||||
|
||||
Rc<Hud> Hud::createHud(const Rc<DxvkDevice>& device) {
|
||||
HudConfig config(env::getEnvVar("DXVK_HUD"));
|
||||
|
||||
std::string hudElements = env::getEnvVar("DXVK_HUD");
|
||||
|
||||
if (hudElements.empty())
|
||||
hudElements = device->config().hud;
|
||||
|
||||
HudConfig config(hudElements);
|
||||
|
||||
return !config.elements.isClear()
|
||||
? new Hud(device, config)
|
||||
: nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user