I am developping a game with allegro library. I wrote a starter C code then I compile the program on Ubuntu Terminal.After that When I open the output program,the program open but not closed.Cancel Button(X) is not working.
Here is my starter code:
#include <allegro.h>
void Baslat();
void Bitir();
int main(){
Baslat();
while(!key[KEY_ESC]){
}
Bitir();
return 0;
}
END_OF_MAIN()
void Baslat(){
int depth,res;
allegro_init();
depth = desktop_color_depth();
if(depth == 0) depth=32;
set_color_depth(depth);
res=set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640,480,0,0);
if(res!=0){
allegro_message("%s\n", allegro_error); exit(-1);
}
install_timer();
install_keyboard();
install_mouse();
}
void Bitir(){
clear_keybuf();
}