66#include < ctime>
77#include < string>
88
9+ #include " common-code/ConsoleUtils.h"
10+
911// TODO:
1012// Change the clock date back to the realtime value when the process (setup.exe) is being closed/terminated.
1113// Current Workaround, sync the Time between PC and Time Server over the Settings, to change it back to the current timedate
@@ -70,9 +72,8 @@ int main() {
7072 printf (" When you done playing your DEV7 game, set the Date back to the one you currently have.\n " );
7173
7274 if (!success) {
73- std::cerr << " Failed to execute Loader7.exe." << std::endl;
74- std::cout << " Press Enter to exit\n " << std::endl;
75- std::cin.get ();
75+ fprintf (stderr, " Failed to execute %s." , loaderExeName);
76+ TaskExecution::pressEnterToExit ();
7677 return 1 ;
7778 }
7879
@@ -87,9 +88,8 @@ int main() {
8788 success = CreateProcess (NULL , devExePath, NULL , NULL , FALSE , 0 , NULL , NULL , &si, &pi);
8889
8990 if (!success) {
90- std::cerr << " Failed to execute Dev7VM.EXE." << std::endl;
91- std::cout << " Press Enter to exit\n " << std::endl;
92- std::cin.get ();
91+ fprintf (stderr, " Failed to execute Dev7VM.EXE." );
92+ TaskExecution::pressEnterToExit ();
9393 return 1 ;
9494 }
9595
@@ -101,8 +101,7 @@ int main() {
101101
102102 // Close process and thread handles
103103 printf (" When you done playing your DEV7 game, set the Date back to the one you currently have.\n " );
104- printf (" Pres Enter to exit Y2K38Patcher\n " );
105- std::cin.get ();
104+ TaskExecution::pressEnterToExit ();
106105 CloseHandle (pi.hProcess );
107106 CloseHandle (pi.hThread );
108107
0 commit comments