[win] Fix opening files from File Explorer in the running instance through DDE messages

This commit is contained in:
David Capello 2020-04-16 11:19:39 -03:00
parent 58e78ad886
commit 7482024827
2 changed files with 8 additions and 5 deletions

2
laf

@ -1 +1 @@
Subproject commit ab5d043a54aa6ccb52b7f9abbec312172f324012 Subproject commit 55a3acb0bf6f30a50023dbdf04c2813423064702

View File

@ -217,6 +217,8 @@ App::App(AppMod* mod)
int App::initialize(const AppOptions& options) int App::initialize(const AppOptions& options)
{ {
os::System* system = os::instance();
#ifdef ENABLE_UI #ifdef ENABLE_UI
m_isGui = options.startUI() && !options.previewCLI(); m_isGui = options.startUI() && !options.previewCLI();
#else #else
@ -228,12 +230,13 @@ int App::initialize(const AppOptions& options)
#ifdef _WIN32 #ifdef _WIN32
if (options.disableWintab() || if (options.disableWintab() ||
!preferences().experimental.loadWintabDriver()) { !preferences().experimental.loadWintabDriver()) {
os::instance()->useWintabAPI(false); system->useWintabAPI(false);
} }
#endif #endif
os::instance()->setAppMode(m_isGui ? os::AppMode::GUI: system->setAppName(get_app_name());
os::AppMode::CLI); system->setAppMode(m_isGui ? os::AppMode::GUI:
os::AppMode::CLI);
if (m_isGui) if (m_isGui)
m_uiSystem.reset(new ui::UISystem); m_uiSystem.reset(new ui::UISystem);
@ -330,7 +333,7 @@ int App::initialize(const AppOptions& options)
return code; return code;
} }
os::instance()->finishLaunching(); system->finishLaunching();
return 0; return 0;
} }