[AD] [Windows] Weird bug about XP

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I dunno if this bug has already been reported but...

Here is a really simple program.
It works fine on 98SE but some persons told me it flickers on XP

#include<allegro.h>
#include<stdio.h>

BITMAP *backbuffer;	// double buffering things

void main() {
  allegro_init();
  install_keyboard();

  set_color_depth( 32 );
  if( set_gfx_mode( GFX_AUTODETECT_FULLSCREEN, 640, 480, 0, 0 ) < 0 ) {
    // we couldnt set the video mode, send an error to the user and quit
    allegro_message(allegro_error);
    return;
  }

  backbuffer = create_bitmap( SCREEN_W, SCREEN_H );
  if (!backbuffer)
    exit(1);

  text_mode(-1); // transparent text

  // main loop
  while( !key[KEY_ESC] ) {
    clear_to_color( backbuffer , makecol(0,100,200));
    textout( backbuffer, font, "Hello this is flickery ;)", 50, 50,
makecol(255,255,255) );
    blit( backbuffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H );
  }
}
END_OF_MAIN();

If that small prog really flickers on XP, I wonder where the mistake is...


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/