# SDL\_GetDisplayBounds returns incorrect values

**URL:** <https://discourse.libsdl.org/t/sdl-getdisplaybounds-returns-incorrect-values/19997>\
**Category:** SDL Development\
**Created:** [September 24, 2013, 11:59pm UTC](https://discourse.libsdl.org/t/sdl-getdisplaybounds-returns-incorrect-values/19997 "2013-09-24T23:59:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![carl](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@carl](https://discourse.libsdl.org/u/carl)\
**Post date:** [September 24, 2013, 11:59pm UTC](https://discourse.libsdl.org/t/sdl-getdisplaybounds-returns-incorrect-values/19997/1 "2013-09-24T23:59:42Z")

</div>

hello, my display is 1440x900 and i’ve seen SDL\_GetDisplayBounds return the correct values in the past, however as of now it is returning 1024x768. nvidia X server settings app confirms the mode is 1440x900.

to hasard a guess is a bit foolish but I’d say it’s reporting the next configured X mode due an off-by-one error in the index, either SDL side or X side after resuming from sleep. xorg.conf doesn’t list any modes btw.

system: standard 12.04 LTS amd64.  
gfx: NVidia GTX 550ti driver version 310.19

---

<div class="post-metadata">

**Author:** ![carl](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@carl](https://discourse.libsdl.org/u/carl)\
**Post date:** [September 25, 2013, 12:09am UTC](https://discourse.libsdl.org/t/sdl-getdisplaybounds-returns-incorrect-values/19997/2 "2013-09-25T00:09:29Z")

</div>

my bad. i switched from using a vector to using a set. since the set is unordered, SDL\_VideoInit() was called with “dummy”, the “first” element in the set.

“dummy” must be hard-coded to 1024x768 since as far as i know it won’t create a window…
