Skip to content

Commit 5066a82

Browse files
authored
Merge branch 'master' into bugfix/melee-sync
2 parents 6cf23c9 + 8f85924 commit 5066a82

File tree

816 files changed

+98693
-85580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

816 files changed

+98693
-85580
lines changed

Client/cefweb/CWebCore.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,15 @@ void CWebCore::OnPostScreenshot()
479479
}
480480
}
481481

482+
void CWebCore::OnFPSLimitChange(std::uint16_t fps)
483+
{
484+
dassert(g_pCore->GetNetwork() != nullptr); // Ensure network module is loaded
485+
for (auto& webView : m_WebViews)
486+
{
487+
webView->GetCefBrowser()->GetHost()->SetWindowlessFrameRate(fps);
488+
}
489+
}
490+
482491
void CWebCore::ProcessInputMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
483492
{
484493
if (!m_pFocusedWebView ||

Client/cefweb/CWebCore.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ class CWebCore : public CWebCoreInterface
9696
void OnPreScreenshot();
9797
void OnPostScreenshot();
9898

99+
void OnFPSLimitChange(std::uint16_t fps) override;
100+
99101
bool SetGlobalAudioVolume(float fVolume);
100102

101103
bool UpdateListsFromMaster();

Client/cefweb/CWebView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void CWebView::Initialise()
5454
{
5555
// Initialise the web session (which holds the actual settings) in in-memory mode
5656
CefBrowserSettings browserSettings;
57-
browserSettings.windowless_frame_rate = g_pCore->GetFrameRateLimit();
57+
browserSettings.windowless_frame_rate = g_pCore->GetFPSLimiter()->GetFPSTarget();
5858
browserSettings.javascript_access_clipboard = cef_state_t::STATE_DISABLED;
5959
browserSettings.javascript_dom_paste = cef_state_t::STATE_DISABLED;
6060
browserSettings.webgl = cef_state_t::STATE_ENABLED;

0 commit comments

Comments
 (0)