UI: Move frontend API initialization to constructor

master
jp9000 2018-06-01 22:42:11 -07:00
parent 26d5560da3
commit 4fd22f1316
1 changed files with 4 additions and 4 deletions

View File

@ -129,6 +129,8 @@ static void AddExtraModulePaths()
#endif
}
extern obs_frontend_callbacks *InitializeAPIInterface(OBSBasic *main);
OBSBasic::OBSBasic(QWidget *parent)
: OBSMainWindow (parent),
ui (new Ui::OBSBasic)
@ -137,6 +139,8 @@ OBSBasic::OBSBasic(QWidget *parent)
setAcceptDrops(true);
api = InitializeAPIInterface(this);
ui->setupUi(this);
ui->previewDisabledLabel->setVisible(false);
@ -1335,8 +1339,6 @@ static void AddProjectorMenuMonitors(QMenu *parent, QObject *target,
#define SHUTDOWN_SEPARATOR \
"==== Shutting down =================================================="
extern obs_frontend_callbacks *InitializeAPIInterface(OBSBasic *main);
#define UNSUPPORTED_ERROR \
"Failed to initialize video:\n\nRequired graphics API functionality " \
"not found. Your GPU may not be supported."
@ -1402,8 +1404,6 @@ void OBSBasic::OBSInit()
InitOBSCallbacks();
InitHotkeys();
api = InitializeAPIInterface(this);
AddExtraModulePaths();
blog(LOG_INFO, "---------------------------------");
obs_load_all_modules();