Skip to content

Commit

Permalink
steamcompmgr: Handle external overlays better for steamcompmgr_user_h…
Browse files Browse the repository at this point in the history
…as_any_game_open
  • Loading branch information
misyltoad committed Dec 3, 2023
1 parent baf211f commit b5e14ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,11 @@ window_is_steam( steamcompmgr_win_t *w )

bool g_bChangeDynamicRefreshBasedOnGameOpenRatherThanActive = false;

bool steamcompmgr_window_should_limit_fps( steamcompmgr_win_t *w )
{
return w && !window_is_steam( w ) && !w->isOverlay && !w->isExternalOverlay;
}

static bool
steamcompmgr_user_has_any_game_open()
{
Expand All @@ -1070,18 +1075,13 @@ steamcompmgr_user_has_any_game_open()
if (!server->ctx)
continue;

if (server->ctx->focus.focusWindow && !window_is_steam(server->ctx->focus.focusWindow))
if (steamcompmgr_window_should_limit_fps( server->ctx->focus.focusWindow ))
return true;
}

return false;
}

bool steamcompmgr_window_should_limit_fps( steamcompmgr_win_t *w )
{
return w && !window_is_steam( w ) && !w->isOverlay && !w->isExternalOverlay;
}

bool steamcompmgr_window_should_refresh_switch( steamcompmgr_win_t *w )
{
if ( g_bChangeDynamicRefreshBasedOnGameOpenRatherThanActive )
Expand Down

0 comments on commit b5e14ba

Please sign in to comment.