ProfileScope(“OBSApp::OBSInit”);
setAttribute(Qt::AA_UseHighDpiPixmaps);
qRegisterMetaType();
if (!StartupOBS(locale.c_str(), GetProfilerNameStore()))
return false;
#ifdef _WIN32
bool browserHWAccel =
config_get_bool(globalConfig, “General”, “BrowserHWAccel”);
obs_data_t *settings = obs_data_create();
obs_data_set_bool(settings, "BrowserHWAccel", browserHWAccel);
obs_apply_private_data(settings);
obs_data_release(settings);
blog(LOG_INFO, "Current Date/Time: %s",
CurrentDateTimeString().c_str());
blog(LOG_INFO, "Browser Hardware Acceleration: %s",
browserHWAccel ? "true" : "false");
#endif
blog(LOG_INFO, "Portable mode: %s", portable_mode ? "true" : "false");
setQuitOnLastWindowClosed(false);
mainWindow = new OBSBasic();
mainWindow->setAttribute(Qt::WA_DeleteOnClose, true);
connect(mainWindow, SIGNAL(destroyed()), this, SLOT(quit()));
mainWindow->OBSInit();
connect(this, &QGuiApplication::applicationStateChanged,
[this](Qt::ApplicationState state) {
ResetHotkeyState(state == Qt::ApplicationActive);
});
ResetHotkeyState(applicationState() == Qt::ApplicationActive);