equal
deleted
inserted
replaced
647 {1920, 1200} |
647 {1920, 1200} |
648 }; |
648 }; |
649 |
649 |
650 static void FindResolutions(void) |
650 static void FindResolutions(void) |
651 { |
651 { |
652 int i = 0, n = 0; |
652 uint n = 0; |
|
653 uint i; |
653 DEVMODE dm; |
654 DEVMODE dm; |
654 |
655 |
655 while (EnumDisplaySettings(NULL, i++, &dm) != 0) { |
656 for (i = 0; EnumDisplaySettings(NULL, i, &dm) != 0; i++) { |
656 if (dm.dmBitsPerPel == 8 && IS_INT_INSIDE(dm.dmPelsWidth, 640, MAX_SCREEN_WIDTH + 1) && |
657 if (dm.dmBitsPerPel == 8 && IS_INT_INSIDE(dm.dmPelsWidth, 640, MAX_SCREEN_WIDTH + 1) && |
657 IS_INT_INSIDE(dm.dmPelsHeight, 480, MAX_SCREEN_HEIGHT + 1)){ |
658 IS_INT_INSIDE(dm.dmPelsHeight, 480, MAX_SCREEN_HEIGHT + 1)) { |
658 int j; |
659 uint j; |
|
660 |
659 for (j = 0; j < n; j++) { |
661 for (j = 0; j < n; j++) { |
660 if (_resolutions[j][0] == dm.dmPelsWidth && _resolutions[j][1] == dm.dmPelsHeight) break; |
662 if (_resolutions[j][0] == dm.dmPelsWidth && _resolutions[j][1] == dm.dmPelsHeight) break; |
661 } |
663 } |
662 |
664 |
663 /* In the previous loop we have checked already existing/added resolutions if |
665 /* In the previous loop we have checked already existing/added resolutions if |