Minor changes

This commit is contained in:
Sezz 2025-03-25 15:05:07 +11:00
parent 78e8d34c00
commit c2c6b5f072
2 changed files with 7 additions and 3 deletions

View file

@ -79,7 +79,8 @@ private:
bool _shortenedCalls = false;
std::string _consoleInput = "";
std::string _consoleInput = {};
void PerformConsoleInput();
std::string GetRequestedPath() const;

View file

@ -240,8 +240,7 @@ bool GenerateDummyLevel(const std::string& levelPath)
unsigned CALLBACK ConsoleInput(void*)
{
std::string input;
auto input = std::string();
while (!ThreadEnded)
{
if (!std::getline(std::cin, input))
@ -427,10 +426,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// Hide console window if mode isn't debug.
#ifndef _DEBUG
if (!DebugMode)
{
FreeConsole();
}
else
#endif
{
ConsoleThreadHandle = BeginThread(ConsoleInput, ConsoleThreadID);
}
// Clear application structure.
memset(&App, 0, sizeof(WINAPP));