Fix autoclose command + condition to pause the console only if no debugger and no autoclose
This commit is contained in:
@@ -498,15 +498,15 @@ JulietApplication& GetEditorApplication()
|
||||
return EditorApplication;
|
||||
}
|
||||
|
||||
int JulietMain(int, wchar_t**)
|
||||
int JulietMain(int argc, wchar_t** argv)
|
||||
{
|
||||
if (__argc > 1)
|
||||
if (argc > 1)
|
||||
{
|
||||
for (int i = 1; i < __argc; ++i)
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
if (strcmp(__argv[i], "-autoclose") == 0 && (i + 1 < __argc))
|
||||
if (wcscmp(argv[i], L"-autoclose") == 0 && (i + 1 < argc))
|
||||
{
|
||||
int frames = atoi(__argv[i + 1]);
|
||||
int frames = _wtoi(argv[i + 1]);
|
||||
EditorApplication.SetAutoCloseFrameCount(frames);
|
||||
}
|
||||
}
|
||||
@@ -516,7 +516,7 @@ int JulietMain(int, wchar_t**)
|
||||
|
||||
// Pause here to not close the console window immediatly on stop
|
||||
// Only pause if not in auto-close mode
|
||||
if (EditorApplication.GetAutoCloseFrameCount() == -1)
|
||||
if (EditorApplication.GetAutoCloseFrameCount() == -1 && !Debug::IsDebuggerPresent())
|
||||
{
|
||||
system("PAUSE");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user