Skip to content

Commit

Permalink
[hud] Respect dxvk.hud configuration option again
Browse files Browse the repository at this point in the history
This was accidentally dropped during the HUD refactor. Fixes #1279.
  • Loading branch information
doitsujin committed Dec 17, 2019
1 parent e527b96 commit a265af7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/dxvk/hud/dxvk_hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace dxvk::hud {
Hud::Hud(
const Rc<DxvkDevice>& device)
: m_device (device),
m_renderer (device) {
m_renderer (device),
m_hudItems (device) {
// Set up constant state
m_rsState.polygonMode = VK_POLYGON_MODE_FILL;
m_rsState.cullMode = VK_CULL_MODE_BACK_BIT;
Expand Down
5 changes: 4 additions & 1 deletion src/dxvk/hud/dxvk_hud_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ namespace dxvk::hud {
}


HudItemSet::HudItemSet() {
HudItemSet::HudItemSet(const Rc<DxvkDevice>& device) {
std::string configStr = env::getEnvVar("DXVK_HUD");

if (configStr.empty())
configStr = device->config().hud;

if (configStr == "full") {
// Just enable everything
m_enableFull = true;
Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/hud/dxvk_hud_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace dxvk::hud {

public:

HudItemSet();
HudItemSet(const Rc<DxvkDevice>& device);

~HudItemSet();

Expand Down

0 comments on commit a265af7

Please sign in to comment.