remove opening the first proj

This commit is contained in:
seraphima
2024-06-20 12:50:14 +02:00
parent 0c83e632ed
commit 1e28cb8c40

View File

@@ -50,11 +50,9 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm
return 1;
}
Project projectToLaunch = projects[0];
Project projectToLaunch{};
std::string idStr(cmdline);
std::wstring id(idStr.begin(), idStr.end());
Logger::info(L"command line: {}", id);
if (!id.empty())
{
for (const auto& proj : projects)
@@ -67,6 +65,12 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm
}
}
if (projectToLaunch.id.empty())
{
Logger::info(L"Project {} not found", id);
return 1;
}
Logger::info(L"Launch Project {} : {}", projectToLaunch.name, projectToLaunch.id);
// launch apps