Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3.4] Screen capture duplicates the first screenshot #204

Open
SenhorFlibble opened this issue Feb 6, 2022 · 3 comments
Open

[5.3.4] Screen capture duplicates the first screenshot #204

SenhorFlibble opened this issue Feb 6, 2022 · 3 comments

Comments

@SenhorFlibble
Copy link

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.

@Andrettin
Copy link
Owner

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.

@SenhorFlibble
Copy link
Author

JIC, I'm on Windows 8.1.

Maybe I should update some of the libraries?

@Andrettin
Copy link
Owner

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.

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

No branches or pull requests

2 participants