Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions browser-mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ void DoCefMessageLoop(int)
});
}

void DoCefMessageLoopTimer(float ms)
void DoCefMessageLoopTimer(float interval)
{
cefTimer = [NSTimer
scheduledTimerWithTimeInterval:ms
scheduledTimerWithTimeInterval:interval
repeats:YES
block:^(NSTimer *) {
CefDoMessageLoopWork();
Expand Down
3 changes: 2 additions & 1 deletion obs-browser-plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ extern "C" EXPORT void obs_browser_initialize(obs_data_t *settings)

ExecuteTask([&settings]() {
BrowserInit(settings);
DoCefMessageLoopTimer(0.01f); // Do not block the main queue so we avoid calling CefRunMessageLoop()
const float interval = 0.01f; // 10ms, for ex. 16.6ms = 60fps. We want a bit more than 60fps to keep CEF happy?
DoCefMessageLoopTimer(interval); // Do not block the main queue so we avoid calling CefRunMessageLoop()
});
#else
auto binded_fn = bind(BrowserManagerThread, settings);
Expand Down
Loading