Results 1 to 2 of 2

Thread: CL_DisplayMode::get_display_modes() odd modes

  1. #1

    Default CL_DisplayMode::get_display_modes() odd modes


    Does anyone know what might be causing CL_DisplayMode::get_display_modes() to return odd modes like 5527980x5527976?

    int screenwidth = 0, screenheight = 0;
    std::vector<CL_DisplayMode> &modes = CL_DisplayMode::get_display_modes();
    for(unsigned int i=0; i<modes.size(); ++i)
    	CL_Size size = modes[i].get_resolution();
    	if (size.width > screenwidth && size.height > screenheight)
    		screenwidth = size.width;
    		screenheight = size.height;
    I use the above code to work out the largest possible resolution. It works well in Linux Ubuntu but returns 5527980x5527976 on my test Windows XP box.

    Any ideas?

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006


    Try step into the CL_DisplayMode::get_display_modes() function with a debugger and check if any of the Win32 calls performed fails. If ClanLib makes no mistakes in how it queries Win32, then the answer is that the display driver returns such insane numbers - although that is less likely. The most likely cause is ClanLib doing the query wrong, or that the result can have some special magical values that mean some special (which ClanLib then needs to be patched to take into account).

Similar Threads

  1. Replies: 1
    Last Post: 10-27-2007, 11:19 PM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts