mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Move frontend API initialization to constructor
This commit is contained in:
parent
26d5560da3
commit
4fd22f1316
|
@ -129,6 +129,8 @@ static void AddExtraModulePaths()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern obs_frontend_callbacks *InitializeAPIInterface(OBSBasic *main);
|
||||||
|
|
||||||
OBSBasic::OBSBasic(QWidget *parent)
|
OBSBasic::OBSBasic(QWidget *parent)
|
||||||
: OBSMainWindow (parent),
|
: OBSMainWindow (parent),
|
||||||
ui (new Ui::OBSBasic)
|
ui (new Ui::OBSBasic)
|
||||||
|
@ -137,6 +139,8 @@ OBSBasic::OBSBasic(QWidget *parent)
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
|
api = InitializeAPIInterface(this);
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->previewDisabledLabel->setVisible(false);
|
ui->previewDisabledLabel->setVisible(false);
|
||||||
|
|
||||||
|
@ -1335,8 +1339,6 @@ static void AddProjectorMenuMonitors(QMenu *parent, QObject *target,
|
||||||
#define SHUTDOWN_SEPARATOR \
|
#define SHUTDOWN_SEPARATOR \
|
||||||
"==== Shutting down =================================================="
|
"==== Shutting down =================================================="
|
||||||
|
|
||||||
extern obs_frontend_callbacks *InitializeAPIInterface(OBSBasic *main);
|
|
||||||
|
|
||||||
#define UNSUPPORTED_ERROR \
|
#define UNSUPPORTED_ERROR \
|
||||||
"Failed to initialize video:\n\nRequired graphics API functionality " \
|
"Failed to initialize video:\n\nRequired graphics API functionality " \
|
||||||
"not found. Your GPU may not be supported."
|
"not found. Your GPU may not be supported."
|
||||||
|
@ -1402,8 +1404,6 @@ void OBSBasic::OBSInit()
|
||||||
InitOBSCallbacks();
|
InitOBSCallbacks();
|
||||||
InitHotkeys();
|
InitHotkeys();
|
||||||
|
|
||||||
api = InitializeAPIInterface(this);
|
|
||||||
|
|
||||||
AddExtraModulePaths();
|
AddExtraModulePaths();
|
||||||
blog(LOG_INFO, "---------------------------------");
|
blog(LOG_INFO, "---------------------------------");
|
||||||
obs_load_all_modules();
|
obs_load_all_modules();
|
||||||
|
|
Loading…
Reference in a new issue