Skip to content

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Sep 13, 2025

No description provided.

@Glavo Glavo requested a review from Copilot September 14, 2025 08:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the default behavior for verbose logging output in the HMCL launcher by inverting the logic to enable verbose output by default unless explicitly disabled.

  • Changes the verbose output flag logic from opt-in to opt-out behavior
  • Now enables verbose logging by default unless the environment variable is explicitly set to "false"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


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.
@Glavo Glavo merged commit d057239 into HMCL-dev:main Sep 14, 2025
1 check passed
@Glavo Glavo deleted the debug branch September 14, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant