[*] UWP args(?)

This commit is contained in:
Reece Wilson 2024-04-10 13:09:32 +01:00
parent 9742db62d3
commit c6a1eb3f1e

View File

@ -27,7 +27,7 @@ namespace Aurora::CmdLine
for (int i = 0; i < argc; i++)
{
gEntrypointString.push_back(argv[0]);
gEntrypointString.push_back(argv[i]);
}
}
@ -72,10 +72,10 @@ namespace Aurora::CmdLine
{
AuList<AuString> ret;
#if defined(AURORA_PLATFORM_WIN32)
auto cmd = GetCommandLineW();
SysAssert(cmd);
#if defined(AURORA_PLATFORM_WIN32)
if (!pCommandLineToArgvW)
{
@ -83,13 +83,20 @@ namespace Aurora::CmdLine
}
int count {};
auto temp = pCommandLineToArgvW(cmd, &count);
auto pTemp = pCommandLineToArgvW(cmd, &count);
for (int i = 0; i < count; i++)
{
ret.push_back(Locale::ConvertFromWChar(temp[i]));
ret.push_back(Locale::ConvertFromWChar(pTemp[i]));
}
LocalFree(pTemp);
#elif defined(__argc) || defined(_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY)
InitCommandLineArguments(__argc, __argv);
return gEntrypointString;
#else
// https://github.com/wine-mirror/wine/blob/7ec5f555b05152dda53b149d5994152115e2c623/dlls/shell32/shell32_main.c#L58