Root/liballegro/patches/040-setup-gfx-mode.patch

1Index: allegro-4.4.2/setup/keyconf.c
2===================================================================
3--- allegro-4.4.2.orig/setup/keyconf.c 2011-06-02 11:49:16.000000000 +0200
4+++ allegro-4.4.2/setup/keyconf.c 2011-06-02 11:49:47.000000000 +0200
5@@ -361,6 +361,10 @@
6      bg = 16;
7      mg = 8;
8       }
9+
10+ bg = palette_color[bg];
11+ fg = palette_color[fg];
12+ mg = palette_color[mg];
13 
14       rectfill(screen, d->x+1, d->y+1, d->x+d->w-1, d->y+d->h-1, bg);
15       rect(screen, d->x, d->y, d->x+d->w, d->y+d->h, fg);
16@@ -401,6 +405,9 @@
17      bg = (d->d1 == codepage) ? 1 : 8;
18       }
19 
20+ bg = palette_color[bg];
21+ fg = palette_color[fg];
22+
23       rectfill(screen, d->x+1, d->y+1, d->x+d->w-1, d->y+d->h-1, bg);
24       rect(screen, d->x, d->y, d->x+d->w, d->y+d->h, 255);
25 
26Index: allegro-4.4.2/setup/setup.c
27===================================================================
28--- allegro-4.4.2.orig/setup/setup.c 2011-06-02 11:37:51.000000000 +0200
29+++ allegro-4.4.2/setup/setup.c 2011-06-02 11:38:38.000000000 +0200
30@@ -2851,12 +2851,14 @@
31    install_keyboard();
32    install_timer();
33 
34- fade_out(4);
35+ /* fade_out(4); */
36+ set_color_depth(32);
37    if (set_gfx_mode(GFX_AUTODETECT, SETUP_SCREEN_W, SETUP_SCREEN_H, 0, 0) != 0) {
38       set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
39       allegro_message(uconvert_ascii("Unable to set graphic mode\n%s\n", tmp1), allegro_error);
40       return 1;
41    }
42+ set_color_depth(8);
43  #endif
44 
45    set_palette(black_palette);
46

Archive Download this file



interactive