mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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
|
# - Auto: Don't change the default
|
||||||
# - True, False: Always enable / disable
|
# - 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);
|
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
||||||
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
||||||
useEarlyDiscard = config.getOption<Tristate>("dxvk.useEarlyDiscard", 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
|
/// Shader-related options
|
||||||
Tristate useRawSsbo;
|
Tristate useRawSsbo;
|
||||||
Tristate useEarlyDiscard;
|
Tristate useEarlyDiscard;
|
||||||
|
|
||||||
|
/// HUD elements
|
||||||
|
std::string hud;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
@ -59,8 +59,13 @@ namespace dxvk::hud {
|
|||||||
|
|
||||||
|
|
||||||
Rc<Hud> Hud::createHud(const Rc<DxvkDevice>& device) {
|
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()
|
return !config.elements.isClear()
|
||||||
? new Hud(device, config)
|
? new Hud(device, config)
|
||||||
: nullptr;
|
: nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user