#pragma section-numbers off #pragma disable-camelcase = SDL_GetNumDisplayModes = Use this function to get the number of available display modes. <> == Syntax == {{{#!highlight cpp int SDL_GetNumDisplayModes(int displayIndex) }}} == Function Parameters == ||'''displayIndex'''||the index of the display to query|| == Return Value == Returns a number >= 1 on success or a negative error code on failure; call [[SDL_GetError]]() for more information. == Code Examples == {{{#!highlight cpp // For now we consider primary display only int numDispModes = SDL_GetNumDisplayModes(0); ... }}} == Remarks == The '''displayIndex''' needs to be in the range from 0 to [[SDL_GetNumVideoDisplays]]() - 1. This allows you to support multiple screens. == Version == This function is available since SDL 2.0.0. == Related Functions == .[[SDL_GetDisplayMode]] .[[SDL_GetNumVideoDisplays]] ---- [[CategoryAPI]], [[CategoryVideo]]