|
Allegro 4.2 Slow on Windows 7 |
Mike Geig
Member #12,603
February 2011
|
Hello everyone, I need to run Allegro 4.2 for legacy and I am running Windows 7 32-bit. The programs run super slow and are prone to crashing. The same programs run fine in Windows XP and on another Windows 7 box (64 bit). Any ideas what I can do to fix my issue? |
LennyLen
Member #5,313
December 2004
|
The problem might be caused by badly written code, so perhaps you should post it.
|
Mike Geig
Member #12,603
February 2011
|
Well, I doubt it since it is a simple demo app: 1#include <stdlib.h>
2#include <allegro.h>
3
4int main(void)
5{
6 allegro_init();
7 set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
8 install_keyboard();
9
10 while(!key[KEY_ESC])
11 {
12 rectfill(screen, 320, 240, 340, 360, 15);
13 }
14 allegro_exit();
15}
16END_OF_MAIN();
|
Matthew Leverton
Supreme Loser
January 1999
|
How do you know that runs slowly? It's not doing anything... Does it crash? Do you always use 8-bit graphics? Those are known to not work well under Windows 7. The best way to get good performance is: set_color_depth(desktop_color_depth()); Also, Allegro 4.4 might work better. It's source compatible with 4.2. One last thing, make sure the Allegro libraries/binaries you use are for your specific compiler version (not a problem if you built it yourself) and that you use the same C or assembly settings during build, as mixing those can cause crashes. |
Mike Geig
Member #12,603
February 2011
|
Thanks Matthew, setting the color depth made the program work great. The only problem there is that my primitives are rendered a very dark, almost black color no matter what color I pass in for them. Any ideas? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Try using makecol instead of passing 15 as the color? 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 |
Matthew Leverton
Supreme Loser
January 1999
|
|