SFML community forums
Help => General => Topic started by: ZeroZ30o on February 17, 2016, 11:17:44 pm
-
The screen flashes when sfml loads and when you alt tab - and displays the last picture that appeared on the last focus lost when doing a prt scrn (print screen).
(Trying to figure out if this is OS related)
· Works on:
(1 computers) Windows 7 home premium edition 64 bit + AMD Radeon HD 6870
(1 computers) Windows 7 home edition 64 bit
(1 computer) Windows XP (?) edition (?) bit
(2 computers) Linux (?) - On wine
(1 computer) Windows 10 professional edition 64 bit + AMD Radeon HD 7570
· Bugs on:
(1 computer) Windows 7 professional edition 64 bit + NVIDIA GeForce GTX 660 Ti
(1 computer) Windows 7 ultimate edition 64 bit + NVIDIA GeForce GTX 650 Ti
(1 computers) Windows 7 home edition 64 bit + AMD Radeon HD 5850M
EDIT: I don't know when this has started happening, but this is a very very old issue (about 80 versions).
EDIT: It still happens on "fullscreen" window style.
EDIT: It does not happen on borderless windowed mode IF the resolution is not your fullscreen resolution (aka 1279x1023 instead of 1280x1024).
When in the level in game:
http://puu.sh/nbIDO/8503238474.png
What shows up when you print screen (even tho this is not what you see):
http://puu.sh/nbID0/27202d40ad.jpg
I use windows 7 and have tested this on other machines. I've heard this works fine on Wine (linux) without any weird snapshot.
Window code:
sf::RenderWindow window(sf::VideoMode(control.resolution.x, control.resolution.y), "SBA",sf::Style::None);
window.setFramerateLimit(60);
window.setVerticalSyncEnabled(false);
I really don't know what is relevant for this, so please do ask for specific parts of code. It may be OS-specific, or hardware stuff... I really have no clue (hence why I posted in general and not window).
Here is a link of the game for testing:
https://mega.nz/#!K1YXgLDS!Im9vt4_NOnnII2Nb5yuczET3Pvkfj05LwaURNYcJtoI
-
sf::RenderWindow window(sf::VideoMode(control.resolution.x, control.resolution.y), "SBA",sf::Style::None);
window.setFramerateLimit(60);
window.setVerticalSyncEnabled(false);
Never use both setVerticalSyncEnabled and setFramerateLimit at the same time! They would badly mix and make things worse. (http://www.sfml-dev.org/tutorials/2.3/window-window.php#controlling-the-framerate)
Although, it may be not the cause of your problem.
-
He set it to false so it's OK. ;)
-
Just tested on another computer (windows XP 2002) and it doesn't flash and prints the screen correctly.
Not sure if it's even fixable inside the code. Maybe something about focus?
-
He set it to false so it's OK. ;)
I was tired :P
You're right, of course. I was wrong there. Well, I was right in what I said but wrong in the reasons I used to say it. ;D
-
He set it to false so it's OK. ;)
I was tired :P
You're right, of course. I was wrong there. Well, I was right in what I said but wrong in the reasons I used to say it. ;D
So no idea of what it is ;w;?
-
I've not done much testing with Alt-Tab so I don't know well how SFML reacts.
-
Fixed, by updating SFML 2.0 to SFML 2.3 (I don't know how I had 2.0 either).
However the print screen problem still happens, but the screen does not flicker anymore.