Permalink
Browse files

Merge pull request #6759 from spycrab/updater_warn_launch

Updater: Show error when trying to launch directly
  • Loading branch information...
leoetlino committed May 6, 2018
2 parents 3f087e2 + 45995ea commit 34899e8e71af38c55c5b9aebd2c6ebe907b13b41
Showing with 9 additions and 0 deletions.
  1. +9 −0 Source/Core/Updater/Main.cpp
@@ -670,6 +670,15 @@ void FatalError(const std::string& message)
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
if (lstrlenW(pCmdLine) == 0)
{
MessageBox(nullptr,
L"This updater is not meant to be launched directly. Configure Auto-Update in "
"Dolphin's settings instead.",
L"Error", MB_ICONERROR);
return 1;
}
std::optional<Options> maybe_opts = ParseCommandLine(pCmdLine);
if (!maybe_opts)
return 1;

0 comments on commit 34899e8

Please sign in to comment.