|
Allegro Wiki A5 Tutorial error or really odd laptop? |
Specter Phoenix
Member #1,425
July 2001
|
I was reading this tutorial: https://wiki.allegro.cc/index.php?title=Creating_a_fullscreen_display_with_maximum/minimum_resolution I executed the code and it compiled fine. I started goofing around with just the function for getting the resolution and my laptop doesn't seem to line up with what the wiki states. Per wiki: al_get_display_mode(al_get_num_display_modes() - 1, &disp_data); // minimum res al_get_display_mode(0, &disp_data); // to get maximum supported resolution instead My code: 1#include <iostream>
2
3#include "allegro5/allegro.h"
4
5int main(int argc, char **argv){
6 ALLEGRO_DISPLAY_MODE disp_data;
7
8 al_init(); // skipped error checking
9
10 al_get_display_mode(al_get_num_display_modes()-1, &disp_data); // wiki states this is minimum
11 std::cout << "Minimum Resolution: " << disp_data.width << " x " << disp_data.height << std::endl;
12
13 al_get_display_mode(0, &disp_data); // wiki states this is maximum
14 std::cout << "Maximum Resolution: " << disp_data.width << " x " << disp_data.height << std::endl;
15
16 return 0;
17}
The output is what made it confusing. >a5test So is this a wiki error, my strange laptop, or am I misreading the code or wiki?
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
It's an ascending sort. Smallest is first. Wiki is wrong I would guess. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Specter Phoenix
Member #1,425
July 2001
|
Okay. I just wanted to verify it as I was just starting to think maybe I had a weird graphics card [Intel].
|
SiegeLord
Member #7,827
October 2006
|
I don't think the order is defined. On Linux, 0 yields the largest option for me. The wiki is wrong, yes. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Chris Katko
Member #1,881
January 2002
|
Specter Phoenix said: I had a weird graphics card [Intel]. Don't worry. You do. -----sig: |
|