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

Author Topic: Adjusting window to screen format  (Read 2593 times)

0 Members and 1 Guest are viewing this topic.

pavanetti

  • Newbie
  • *
  • Posts: 8
    • View Profile
Adjusting window to screen format
« on: July 14, 2011, 03:45:29 am »
I want to make a game in fullscreen mode. And this game can to be played in normals or in wide screens. The game is a side-scrolling game. If the monitor is a widescreen(16:9), the game will display a larger map area. And if is a normal screen(4:3), the game will display a smaller area. In SDL I can to use SDL_ListModes() for list which modes are supported in gamer's screen. I want to do this in sfml. I want to list supported resolutions for choose one in this list. SDL_ListModes() returns a array of Rects. Rect->h and Rect->w is a supported resolution.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Adjusting window to screen format
« Reply #1 on: July 14, 2011, 09:30:58 am »
I don't remember what you should/can do with SFML 1.6 but if you're using SFML 2 you can get these display mode with sf::VideoMode::GetFullscreenModes.
SFML / OS X developer

pavanetti

  • Newbie
  • *
  • Posts: 8
    • View Profile
Adjusting window to screen format
« Reply #2 on: July 14, 2011, 02:45:05 pm »
i found this:
sf::VideoMode::GetMode() and sf::VideoMode::GetModesCount().
I can get how many modes are supported and I choose one.