Skip to content

Commit

Permalink
Add config key to have extras overlay be hidden by default
Browse files Browse the repository at this point in the history
Adds an additional config key "hidden_on_launch". Causes the extras overlay to be initialized in a hidden state which remains toggleable using the defined hotkey (default Alt + Shift + N) as usual.
  • Loading branch information
IsmetBesic authored and megai2 committed Sep 11, 2021
1 parent 2236542 commit 6c356a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions d912pxy/d912pxy_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ typedef enum d912pxy_config_value {
PXY_CFG_VFS_PACK_DATA,
PXY_CFG_VFS_WRITE_MASK,
PXY_CFG_EXTRAS_ENABLE,
PXY_CFG_EXTRAS_HIDDEN_ON_LAUNCH,
PXY_CFG_EXTRAS_FPS_LIMIT,
PXY_CFG_EXTRAS_FPS_LIMIT_INACTIVE,
PXY_CFG_EXTRAS_SHOW_FPS,
Expand Down Expand Up @@ -275,6 +276,7 @@ class d912pxy_config
{L"vfs", L"pack_data", L"0"},//PXY_CFG_VFS_PACK_DATA
{L"vfs", L"write_mask", L"0"},//PXY_CFG_VFS_WRITE_MASK
{L"extras", L"enable", L"1"},//PXY_CFG_EXTRAS_ENABLE
{L"extras", L"hidden_on_launch", L"0"},//PXY_CFG_EXTRAS_HIDDEN_ON_LAUNCH
{L"extras", L"fps_limit", L"0"},//PXY_CFG_EXTRAS_FPS_LIMIT,
{L"extras", L"fps_limit_inactive", L"0"},//PXY_CFG_EXTRAS_FPS_LIMIT_INACTIVE,
{L"extras", L"show_fps", L"1"},//PXY_CFG_EXTRAS_SHOW_FPS,
Expand Down
2 changes: 2 additions & 0 deletions d912pxy/d912pxy_extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ void d912pxy_extras::Init()
{
NonCom_Init(L"extras");

if (d912pxy_s.config.GetValueUI32(PXY_CFG_EXTRAS_HIDDEN_ON_LAUNCH)) overlayShowMode = eoverlay_hide;

activeTargetFrameTime = d912pxy_helper::SafeDiv(1000, d912pxy_s.config.GetValueUI32(PXY_CFG_EXTRAS_FPS_LIMIT));
inactiveTargetFrameTime = d912pxy_helper::SafeDiv(1000, d912pxy_s.config.GetValueUI32(PXY_CFG_EXTRAS_FPS_LIMIT_INACTIVE));

Expand Down

0 comments on commit 6c356a4

Please sign in to comment.