mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Switch to new browser panel code
This commit is contained in:
parent
24bcfacea5
commit
940fd23cb4
|
@ -76,9 +76,11 @@ using namespace std;
|
|||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
#include <browser-panel.hpp>
|
||||
static CREATE_BROWSER_WIDGET_PROC create_browser_widget = nullptr;
|
||||
#endif
|
||||
|
||||
struct QCef;
|
||||
QCef *cef = nullptr;
|
||||
|
||||
namespace {
|
||||
|
||||
template <typename OBSRef>
|
||||
|
@ -1531,7 +1533,7 @@ void OBSBasic::OBSInit()
|
|||
obs_post_load_modules();
|
||||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
create_browser_widget = obs_browser_init_panel();
|
||||
cef = obs_browser_init_panel();
|
||||
#endif
|
||||
|
||||
CheckForSimpleModeX264Fallback();
|
||||
|
@ -1763,7 +1765,7 @@ void OBSBasic::OnFirstLoad()
|
|||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
/* Attempt to load init screen if available */
|
||||
if (create_browser_widget) {
|
||||
if (cef) {
|
||||
WhatsNewInfoThread *wnit = new WhatsNewInfoThread();
|
||||
if (wnit) {
|
||||
connect(wnit, &WhatsNewInfoThread::Result,
|
||||
|
@ -1874,7 +1876,7 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
|
|||
dlg.setWindowTitle("What's New");
|
||||
dlg.resize(700, 600);
|
||||
|
||||
QCefWidget *cefWidget = create_browser_widget(nullptr, info_url);
|
||||
QCefWidget *cefWidget = cef->create_widget(nullptr, info_url);
|
||||
if (!cefWidget) {
|
||||
return;
|
||||
}
|
||||
|
@ -2243,6 +2245,11 @@ OBSBasic::~OBSBasic()
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
delete cef;
|
||||
cef = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void OBSBasic::SaveProjectNow()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit da0b4493093230f076fb429d2fcda82f3ce1b247
|
||||
Subproject commit 5c882868f153f4754ddc68f48da320ad4c70a410
|
Loading…
Reference in a new issue