Hi, Klaim: madmarx is right, we're looking for the user's current screen resolution before any render window is created, so that we can create a full-screen render surface in the same resolution.
Hi, Madmarx: yes, getting the possible screen modes is one way of doing it, but it's nice also to be able to automatically use a resolution that the user prefers, in the sense that it is the resolution that they have their desktop set to. Concerning multiple monitors, I believe the code I gave gives the resolution for the primary display monitor. I used to use dual-monitoring, but can't remember 100% sure if i tested the code with dual-monitors, so that is indeed something one would need to verify with the above code. However, it is certainly "possible" to use the primary display device, and default to the resolution at which that device was already set to. It is useful to the developer when you don't want the user to have to wade through a dialog before diving into your game. And, if you don't want to guess which resolution to choose from a list of available; besides, the resolutions at which a device can run may include resolutions that the actual monitor being used doesn't support (particularly CRTs i think). (Hence the "Keep current settings? 20 seconds left..." dialog when you change your resolution in Windows OS, in case the user can't see anything after the change).
Thus I still think this is a useful feature
Thanks for the discussion.