Skip to content

Commit

Permalink
openvr: Fix trackpad mode with fps limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Jul 10, 2024
1 parent 4662719 commit 2e12ec9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Backends/OpenVRBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ extern std::string g_reshade_effect;

extern gamescope::ConVar<bool> cv_hdr_enabled;

extern uint64_t g_SteamCompMgrLimitedAppRefreshCycle;

static LogScope openvr_log("openvr");

static bool GetVulkanInstanceExtensionsRequired( std::vector< std::string > &outInstanceExtensionList );
Expand Down Expand Up @@ -1046,7 +1048,7 @@ namespace gamescope
wlserver_mousebutton( BTN_LEFT, true, ++m_uFakeTimestamp );
wlserver_unlock();

sleep_for_nanos( mHzToRefreshCycle( g_nOutputRefresh ) + 1'000'000 );
sleep_for_nanos( g_SteamCompMgrLimitedAppRefreshCycle + 1'000'000 );

wlserver_lock();
wlserver_mousebutton( BTN_LEFT, false, ++m_uFakeTimestamp );
Expand Down
4 changes: 2 additions & 2 deletions src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ update_runtime_info();

bool g_bAllowVRR = false;

static uint64_t g_SteamCompMgrLimitedAppRefreshCycle = 16'666'666;
static uint64_t g_SteamCompMgrAppRefreshCycle = 16'666'666;
uint64_t g_SteamCompMgrLimitedAppRefreshCycle = 16'666'666;
uint64_t g_SteamCompMgrAppRefreshCycle = 16'666'666;

static const gamescope_color_mgmt_t k_ScreenshotColorMgmt =
{
Expand Down

0 comments on commit 2e12ec9

Please sign in to comment.