diff options
author | Anton Fedchin <anightik@gmail.com> | 2018-02-20 11:13:29 +0300 |
---|---|---|
committer | Anton Fedchin <anightik@gmail.com> | 2018-02-20 11:13:29 +0300 |
commit | 8fb27e99142d83d71f1840393e096183b00ef770 (patch) | |
tree | 4b5db834a51851efb1d9d16e79959c9c82199c43 | |
parent | 810f55def4f5e85a41f22890dc0117bc79d9ae8b (diff) |
[win10] Win10App: prohibit app pre-launching
-rw-r--r-- | xbmc/platform/win10/Win10App.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xbmc/platform/win10/Win10App.cpp b/xbmc/platform/win10/Win10App.cpp index 9b895c4c4f..9ad59a9de7 100644 --- a/xbmc/platform/win10/Win10App.cpp +++ b/xbmc/platform/win10/Win10App.cpp @@ -136,8 +136,18 @@ void App::OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ m_argv.clear(); push_back(m_argv, std::string("dummy")); + if (args->Kind == ActivationKind::Launch) + { + auto launchArgs = static_cast<LaunchActivatedEventArgs^>(args); + if (launchArgs->PrelaunchActivated) + { + // opt-out of Prelaunch + CoreApplication::Exit(); + return; + } + } // Check for protocol activation - if (args->Kind == ActivationKind::Protocol) + else if (args->Kind == ActivationKind::Protocol) { auto protocolArgs = static_cast< ProtocolActivatedEventArgs^>(args); Platform::String^ argval = protocolArgs->Uri->ToString(); |