Wyrmsun icon indicating copy to clipboard operation
Wyrmsun copied to clipboard

[5.3.4] Screen capture duplicates the first screenshot

Open SenhorFlibble opened this issue 3 years ago • 3 comments

Discovered another bug.

If you take more than one screenshot by pressing F11 during a playing session, only the first screenshot is captured properly, all others are just copies of the first one.

It seems like the screen capture function does not clear the video buffer or something.

SenhorFlibble avatar Feb 06 '22 13:02 SenhorFlibble

I cannot reproduce the issue, unfortunately. When I take screenshots using F11, the 1st/2nd/3rd screenshots (screen01.png/screen02.png/screen03.png) are all different.

Andrettin avatar Feb 06 '22 13:02 Andrettin

JIC, I'm on Windows 8.1.

Maybe I should update some of the libraries?

SenhorFlibble avatar Feb 06 '22 14:02 SenhorFlibble

JIC, I'm on Windows 8.1.

Maybe I should update some of the libraries?

Maybe the Windows version could be related to it. In the engine the amount of code for creating a screenshot is relatively small:

{
	const QWindow *window = QApplication::focusWindow();

	if (window == nullptr) {
		return;
	}

	const QPixmap screen_pixmap = window->screen()->grabWindow(window->winId());
	screen_pixmap.save(name);
}

It could be that a setting somewhere else is causing the problem, but it's also possible that the Qt framework has a bug in interacting with Windows 8 for taking screenshots (the classes beginning with "Q" are from the Qt framework).

I searched their bug database for a bug related to QScreen::grabWindow() always providing the same result, but I couldn't find anything, though.

Andrettin avatar Feb 06 '22 14:02 Andrettin