SFML community forums

Help => Window => Topic started by: pavanetti on July 14, 2011, 03:45:29 am

Title: Adjusting window to screen format
Post by: pavanetti 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.
Title: Adjusting window to screen format
Post by: Hiura 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.
Title: Adjusting window to screen format
Post by: pavanetti 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.