diff --git a/browser-app.cpp b/browser-app.cpp index 576a3f7b8..fb1c3a8a6 100644 --- a/browser-app.cpp +++ b/browser-app.cpp @@ -147,7 +147,12 @@ void BrowserApp::ExecuteJSFunction(CefRefPtr browser, std::vector names; browser->GetFrameNames(names); for (auto &name : names) { - CefRefPtr frame = browser->GetFrame(name); + CefRefPtr frame = +#if CHROME_VERSION_BUILD >= 6261 + browser->GetFrameByName(name); +#else + browser->GetFrame(name); +#endif CefRefPtr context = frame->GetV8Context(); context->Enter(); @@ -346,7 +351,12 @@ bool BrowserApp::OnProcessMessageReceived(CefRefPtr browser, std::vector names; browser->GetFrameNames(names); for (auto &name : names) { - CefRefPtr frame = browser->GetFrame(name); + CefRefPtr frame = +#if CHROME_VERSION_BUILD >= 6261 + browser->GetFrameByName(name); +#else + browser->GetFrame(name); +#endif CefRefPtr context = frame->GetV8Context(); context->Enter(); diff --git a/obs-browser-page/obs-browser-page-main.cpp b/obs-browser-page/obs-browser-page-main.cpp index 6a3906c5d..97bf0ee61 100644 --- a/obs-browser-page/obs-browser-page-main.cpp +++ b/obs-browser-page/obs-browser-page-main.cpp @@ -79,8 +79,10 @@ int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) std::thread shutdown_check; CefMainArgs mainArgs(nullptr); +#if CHROME_VERSION_BUILD < 5615 if (!SetHighDPIv2Scaling()) CefEnableHighDPISupport(); +#endif CefRefPtr command_line = CefCommandLine::CreateCommandLine(); diff --git a/obs-browser-plugin.cpp b/obs-browser-plugin.cpp index 188958efe..8cf67e013 100644 --- a/obs-browser-plugin.cpp +++ b/obs-browser-plugin.cpp @@ -748,9 +748,12 @@ bool obs_module_load(void) os_event_init(&cef_started_event, OS_EVENT_TYPE_MANUAL); -#ifdef _WIN32 +#if defined(_WIN32) && CHROME_VERSION_BUILD < 5615 /* CefEnableHighDPISupport doesn't do anything on OS other than Windows. Would also crash macOS at this point as CEF is not directly linked */ CefEnableHighDPISupport(); +#endif + +#ifdef _WIN32 EnumAdapterCount(); #else #if defined(__APPLE__) && !defined(ENABLE_BROWSER_LEGACY)