Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HMCL/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "java.h"

int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) {
HLVerboseOutput = HLGetEnvVar(L"HMCL_LAUNCHER_VERBOSE_OUTPUT").value_or(L"") == L"true";
HLVerboseOutput = HLGetEnvVar(L"HMCL_LAUNCHER_VERBOSE_OUTPUT").value_or(L"") != L"false";
Copy link

Copilot AI Sep 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic change from opt-in to opt-out for verbose output could impact users who rely on the current quiet default behavior. Consider using a more explicit approach like checking for both 'true' and 'false' values, with a clear documented default, to make the behavior more predictable.

Suggested change
HLVerboseOutput = HLGetEnvVar(L"HMCL_LAUNCHER_VERBOSE_OUTPUT").value_or(L"") != L"false";
// Explicitly check for "true" or "1" (case-insensitive), default to false
auto verboseEnv = HLGetEnvVar(L"HMCL_LAUNCHER_VERBOSE_OUTPUT");
std::wstring verboseValue = verboseEnv.value_or(L"");
std::transform(verboseValue.begin(), verboseValue.end(), verboseValue.begin(), ::towlower);
HLVerboseOutput = (verboseValue == L"true" || verboseValue == L"1");

Copilot uses AI. Check for mistakes.

LPCWSTR javaExecutableName;
if (HLAttachConsole()) {
Expand Down