From 4699c873fe24f8cc778290bc367519392afd28cf Mon Sep 17 00:00:00 2001 From: LWSS Date: Tue, 19 Sep 2023 11:57:16 -0700 Subject: [PATCH] tweak(client): get pureLevel numerically --- code/client/shared/PureModeState.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/client/shared/PureModeState.h b/code/client/shared/PureModeState.h index 36b81b6ae1..b525ccdf0e 100644 --- a/code/client/shared/PureModeState.h +++ b/code/client/shared/PureModeState.h @@ -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;