Author
Topic: VideoModes that don't fit into screen (Read 1421 times)

FrameBuffer.getVideoModes may return a mode that does not fit into current screen. for example my screen is 1920x1080 but 1600x1200 is returned in list. or even if I set my screen resolution to something lower, 1600x1200 and 1920x1080 are still in list. I guess, there is nothing wrong with this, since my video card supports that modes.

after setting video mode, I end up with a FrameBuffer that just doesn't fit into screen.

Display.getWidth()/getHeight() returns the invalid value just after calling Display.setDisplayMode(..) but later on returns the corrected values.

so, how to handle this?* filter modes that does not fit (based on what? awt toolkit?)* in render loop, check Display.width/height matches FrameBuffer.width/height and correct if required

Yes, it makes sense that they are in the list IF the monitor can handle them in full screen. There shouldn't be any modes available that your monitor can't handle. But your desktop's actual resolution doesn't matter.

Nothing... It's does the same thing as yours. I somehow thought that you monitor doesn't support that resolution but the driver still reports it. With current LCDs, i'm thinking of monitors as single-resolution devices, so that you'll always use the highest, native resolution anyway.

Honestly? I wouldn't handle that at all. Today, almost everybody uses a LCD device running in one, the native resolution. The driver shouldn't report any modes larger than this, so it will be fine. Apart from that, nobody runs a game in windowed mode...

Just make sure that the resolution can still be adjusted if one has picked the wrong mode (not that the buttons are out of view...).