1
Window / Fullscreen at non-screen resolutions causes desktop to show.
« on: October 18, 2016, 05:55:59 pm »
Hi, I started a project a while now, and I just now realized a problem with the fullscreen.
When I ask the window to display at fullscreen with the videomode set as the screen resolution, it shows correctly, but if I ask the window to display at fullscreen with a videomode lower than the screen resolution (even being valid) It shows, displays and updates correctly, but part of the desktop is shown. I can even interact with the desktop while the program is fullscreen.
Here's an image of that: https://s9.postimg.org/9lg8onzqn/Error.png
I don't think the code has anything to do with it but here goes anyway:
When I ask the window to display at fullscreen with the videomode set as the screen resolution, it shows correctly, but if I ask the window to display at fullscreen with a videomode lower than the screen resolution (even being valid) It shows, displays and updates correctly, but part of the desktop is shown. I can even interact with the desktop while the program is fullscreen.
Here's an image of that: https://s9.postimg.org/9lg8onzqn/Error.png
I don't think the code has anything to do with it but here goes anyway:
m_Window = new sf::RenderWindow();
if (m_Options.getFullscreen())
{
sf::VideoMode vm = sf::VideoMode(m_Options.getWidth(), m_Options.getHeight());
if (vm.isValid())
m_Window->create(vm, title, sf::Style::Fullscreen);
else
{
utils::FileLogger::Log(utils::FileLogger::LogType::LOG_WARNING, "Window mode not suported, starting windowed");
m_Window->create(vm, title, sf::Style::Close);
}
}
else
m_Window->create(sf::VideoMode(m_Options.getWidth(), m_Options.getHeight()), title, sf::Style::Close);
if (m_Options.getFullscreen())
{
sf::VideoMode vm = sf::VideoMode(m_Options.getWidth(), m_Options.getHeight());
if (vm.isValid())
m_Window->create(vm, title, sf::Style::Fullscreen);
else
{
utils::FileLogger::Log(utils::FileLogger::LogType::LOG_WARNING, "Window mode not suported, starting windowed");
m_Window->create(vm, title, sf::Style::Close);
}
}
else
m_Window->create(sf::VideoMode(m_Options.getWidth(), m_Options.getHeight()), title, sf::Style::Close);