|
Problems with al_create_display and al_show_native_message_box |
Ylva_D
Member #15,591
April 2014
|
I'm having some problems with running Allegro 5.0.10 in Visual C++ 2010 Express on a newly installed Windows 7 (64). I've just continued working on some code that I last worked with in May 2014. It was working then and the only thing that's different now when it comes to software versions and OS stuff is that I must have newer drivers on my computer now. (The last time I used the same Allegro version, the same Visual studio version, the same C++ code and also Windows 7.) The code I'm trying to run is simply: 1ALLEGRO_DISPLAY* display = NULL;
2
3 if(!al_init()) {
4 al_show_native_message_box(NULL, NULL, NULL,"Failed to initialize allegro!", NULL, NULL);
5 return;
6 }
7
8 display = al_create_display(1280, 720);
9 if(!display) {
10 al_show_native_message_box(NULL, NULL, NULL,"Failed to create display!", NULL, NULL);
11 return;
12 }
al_init seems to work, but the problems are: Could it be that my drivers are too new or just not matching this Allegro version and Visual studio version? I've tried googling for hours about which drivers I need (and about these errors I get) but I couldn't find anything. Does anyone know what the problem might be? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Ylva_D said:
al_init seems to work, but the problems are: You also need to call al_init_native_dialog_addon(), and you are probably trying to create a window the size of the screen which doesn't work it won't let you. I assume 1280x720 is your monitor resolution at the time you run your program? You can use al_set_new_display_flags(ALLEGRO_FULLSCREEN_WINDOW) to create a full screen window or you can just run fullscreen. Windowed is the default though, and that is probably why it is failing. 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 |
|