Skip to content

Commit

Permalink
Updater: Show error when trying to launch directly
Browse files Browse the repository at this point in the history
  • Loading branch information
spycrab committed May 5, 2018
1 parent 58b96ee commit 45995ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Core/Updater/Main.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 45995ea

Please sign in to comment.