PresentMon icon indicating copy to clipboard operation
PresentMon copied to clipboard

Fix hotkey no csv

Open DealsBeam opened this issue 2 months ago • 0 comments

This pull request fixes a bug where the --hotkey command-line argument was incorrectly disabled when the --no_csv flag was used. This prevented users from using hotkeys to control recording unless a CSV file was being generated.

The fix removes the logic in CommandLine.cpp that erroneously linked hotkey support to CSV output, ensuring that hotkeys function independently. Verification

To confirm the fix, a new unit test, HotkeyWithoutCsv, has been added to Tests/CommandLineTests.cpp. This test:

Launches PresentMon with both --no_csv and a --hotkey argument.
Simulates the specified hotkey press.
Captures the console output and asserts that the "Started recording" message is present, confirming the hotkey was processed correctly.

This test was added to address the code review feedback and ensure the fix is verifiable.

Note: While the fix and the corresponding test case have been implemented, I was unable to compile and run the test suite due to persistent build environment issues. The changes are logically sound, but will require verification by running the tests in a configured environment.

DealsBeam avatar Oct 30 '25 16:10 DealsBeam