Skip to content

Instantly share code, notes, and snippets.

@matus123
Created July 7, 2015 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matus123/967f48ea849fb670cf13 to your computer and use it in GitHub Desktop.
Save matus123/967f48ea849fb670cf13 to your computer and use it in GitHub Desktop.
SFML 2.3 fullscreen bug Linux
#include <iostream>
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow m_window( sf::VideoMode(1366, 768, 24), "test v0.1", sf::Style::Fullscreen);
//sf::RenderWindow m_window( sf::VideoMode(1923, 1241, 124), "test v0.1", sf::Style::Fullscreen);
m_window.setFramerateLimit(60);
// Start the game loop
while (m_window.isOpen())
{
// Process events
sf::Event event;
while (m_window.pollEvent(event))
{
if (event.key.code == sf::Keyboard::Escape)
m_window.close();
}
m_window.clear();
m_window.display();
}
std::cout << "window-view-size" << m_window.getView().getSize().x << " " << m_window.getView().getSize().y << std::endl;
std::cout << "window-size" << m_window.getSize().x << " " << m_window.getView().getSize().y << std::endl;
// Leaving the scope of 'game' will cleanup the engine
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment