Show console in window mode

This commit is contained in:
momo5502 2022-05-11 20:21:25 +02:00
parent 7a9c19e0fd
commit b09cf1130e
2 changed files with 23 additions and 14 deletions

View File

@ -35,8 +35,8 @@ html_frame::html_frame()
if (needs_restart) if (needs_restart)
{ {
//utils::nt::relaunch_self(); utils::nt::relaunch_self();
//utils::nt::terminate(0); utils::nt::terminate(0);
} }
} }

View File

@ -78,7 +78,8 @@ std::filesystem::path extract_driver()
void unsafe_main(const int /*argc*/, char* /*argv*/[]) void unsafe_main(const int /*argc*/, char* /*argv*/[])
{ {
launcher().run(); //launcher().run();
//return;
const auto driver_file = extract_driver(); const auto driver_file = extract_driver();
@ -150,5 +151,13 @@ int main(const int argc, char* argv[])
int __stdcall WinMain(HINSTANCE, HINSTANCE, char*, int) int __stdcall WinMain(HINSTANCE, HINSTANCE, char*, int)
{ {
AllocConsole();
AttachConsole(GetCurrentProcessId());
FILE* fp;
freopen_s(&fp, "conin$", "r", stdin);
freopen_s(&fp, "conout$", "w", stdout);
freopen_s(&fp, "conout$", "w", stderr);
return main(__argc, __argv); return main(__argc, __argv);
} }