Skip to content

Commit

Permalink
Fix ColorOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
RimuruChan committed Sep 22, 2022
1 parent 94a4d97 commit e2bb800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LLPreLoader/src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ void loadDlls();

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
SetConsoleCP(CP_UTF8);

// Do not use SetConsoleOutputCP here, it will cause color output to be broken
system("chcp 65001 > nul");
// For #683, Change CWD to current module path
auto buffer = new wchar_t[MAX_PATH];
GetModuleFileName(hModule, buffer, MAX_PATH);
Expand Down

0 comments on commit e2bb800

Please sign in to comment.