gui: fix TV and GamePad screenshot filenames being swapped

GenerateScreenshotFilename takes isDRC, but SaveScreenshot passes mainWindow,
which is its exact inverse (VulkanRenderer::HandleScreenshotRequest passes
!padView as mainWindow).

The result is that TV screenshots are saved with the _GamePad suffix and
GamePad screenshots are saved without it. Only the filename is affected, the
image content is correct.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
NKR0ne 2026-07-25 08:40:46 -04:00
parent b8f2cf4b43
commit b60d7c4e8d

View File

@ -99,7 +99,9 @@ std::optional<std::string> SaveScreenshot(std::vector<uint8> data, int width, in
}
if (save_screenshot)
{
auto imagePath = GenerateScreenshotFilename(mainWindow);
// GenerateScreenshotFilename takes isDRC, which is the opposite of mainWindow. Passing
// mainWindow directly gave TV captures the _GamePad suffix and GamePad captures none
auto imagePath = GenerateScreenshotFilename(!mainWindow);
if (imagePath.has_value() && SaveScreenshotToFile(imagePath.value(), image))
{
if (mainWindow)