Created
July 7, 2015 17:56
-
-
Save matus123/967f48ea849fb670cf13 to your computer and use it in GitHub Desktop.
SFML 2.3 fullscreen bug Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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