Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LastStrawLasb

Pages: [1]
1
Window / Re: How to check if sf::RenderWindow is fullscreen?
« on: June 10, 2021, 09:51:18 pm »
There is no "isFullscreen()" in SFML, but it is easy to make your own:

sf::RenderWindow window(sf::VideoMode(WIDTH, HEIGHT), TITLE, sf::Style::Resize | sf::Style::Close);
bool isFullscreen()
{
  sf::Vector2u window_size = window.getSize();
  sf::VideoMode videomode = sf::VideoMode::getDesktopMode();
  return(
    window_size.x == videomode.width &&
    window_size.y == videomode.height
  );
}

Rob

Pages: [1]
anything