Skip to content

Commit

Permalink
tweak(client): get pureLevel numerically
Browse files Browse the repository at this point in the history
  • Loading branch information
LWSS committed Sep 19, 2023
1 parent 9057092 commit 4699c87
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions code/client/shared/PureModeState.h
Expand Up @@ -20,13 +20,10 @@ inline int GetPureLevel()
std::wstring_view cli = (sharedData->initCommandLine[0]) ? sharedData->initCommandLine : GetCommandLineW();
pureLevel = 0;

if (cli.find(L"pure_1") != std::string_view::npos)
size_t found = cli.find(L"-pure_");
if (found != std::wstring_view::npos)
{
pureLevel = 1;
}
else if (cli.find(L"pure_2") != std::string_view::npos)
{
pureLevel = 2;
pureLevel = _wtoi(&cli[found + 6]);
}

return pureLevel;
Expand Down

0 comments on commit 4699c87

Please sign in to comment.