Root/liballegro/patches/080-addons-gfx-mode.patch

1Index: allegro-4.4.2/addons/jpgalleg/examples/ex1.c
2===================================================================
3--- allegro-4.4.2.orig/addons/jpgalleg/examples/ex1.c 2012-03-31 00:56:40.394446398 +0200
4+++ allegro-4.4.2/addons/jpgalleg/examples/ex1.c 2012-03-31 00:56:55.266529285 +0200
5@@ -21,7 +21,7 @@
6     jpgalleg_init();
7 
8     set_color_depth(32);
9- if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)) {
10+ if (set_gfx_mode(GFX_AUTODETECT, 320, 240, 0, 0)) {
11         set_color_depth(16);
12         if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)) {
13             set_color_depth(15);
14Index: allegro-4.4.2/addons/jpgalleg/examples/ex3.c
15===================================================================
16--- allegro-4.4.2.orig/addons/jpgalleg/examples/ex3.c 2012-03-31 00:56:40.594447513 +0200
17+++ allegro-4.4.2/addons/jpgalleg/examples/ex3.c 2012-03-31 00:57:35.398752424 +0200
18@@ -21,7 +21,7 @@
19     jpgalleg_init();
20 
21     set_color_depth(32);
22- if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)) {
23+ if (set_gfx_mode(GFX_AUTODETECT, 320, 240, 0, 0)) {
24         set_color_depth(16);
25         if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)) {
26             set_color_depth(15);
27Index: allegro-4.4.2/addons/jpgalleg/examples/ex4.c
28===================================================================
29--- allegro-4.4.2.orig/addons/jpgalleg/examples/ex4.c 2012-03-31 00:56:40.698448093 +0200
30+++ allegro-4.4.2/addons/jpgalleg/examples/ex4.c 2012-03-31 00:57:43.386796746 +0200
31@@ -22,7 +22,7 @@
32     jpgalleg_init();
33 
34     set_color_depth(32);
35- if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)) {
36+ if (set_gfx_mode(GFX_AUTODETECT, 320, 240, 0, 0)) {
37         set_color_depth(16);
38         if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)) {
39             set_color_depth(15);
40Index: allegro-4.4.2/addons/jpgalleg/examples/ex5.c
41===================================================================
42--- allegro-4.4.2.orig/addons/jpgalleg/examples/ex5.c 2012-03-31 00:56:40.814448739 +0200
43+++ allegro-4.4.2/addons/jpgalleg/examples/ex5.c 2012-03-31 00:57:55.634864647 +0200
44@@ -336,7 +336,7 @@
45         mode = GFX_AUTODETECT_WINDOWED;
46 
47     set_color_depth(32);
48- if (set_gfx_mode(mode, 640, 480, 0, 0)) {
49+ if (set_gfx_mode(mode, 320, 240, 0, 0)) {
50         set_color_depth(16);
51         if (set_gfx_mode(mode, 640, 480, 0, 0)) {
52             set_color_depth(15);
53Index: allegro-4.4.2/addons/loadpng/examples/exalpha.c
54===================================================================
55--- allegro-4.4.2.orig/addons/loadpng/examples/exalpha.c 2012-03-31 00:56:25.270361994 +0200
56+++ allegro-4.4.2/addons/loadpng/examples/exalpha.c 2012-03-31 00:58:26.647036250 +0200
57@@ -29,7 +29,7 @@
58 int main(int argc, char *argv[])
59 {
60     BITMAP *fg;
61- int depth = 16;
62+ int depth = 32;
63     const char *file;
64 
65     allegro_init();
66@@ -54,9 +54,9 @@
67     }
68 
69     set_color_depth(depth);
70- if ((set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0) &&
71- (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) < 0)) {
72- allegro_message("Unable to set video mode (640x480x%d).\n", depth);
73+ if ((set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 240, 0, 0) < 0) &&
74+ (set_gfx_mode(GFX_AUTODETECT, 320, 240, 0, 0) < 0)) {
75+ allegro_message("Unable to set video mode (320x240x%d).\n", depth);
76     return 1;
77     }
78 
79Index: allegro-4.4.2/addons/loadpng/examples/example.c
80===================================================================
81--- allegro-4.4.2.orig/addons/loadpng/examples/example.c 2012-03-31 00:56:25.374362575 +0200
82+++ allegro-4.4.2/addons/loadpng/examples/example.c 2012-03-31 00:58:42.259122465 +0200
83@@ -13,7 +13,7 @@
84     char *filename;
85     BITMAP *bmp;
86     PALETTE pal;
87- int depth = 16;
88+ int depth = 32;
89 
90     /* Initialise Allegro. */
91     allegro_init();
92@@ -34,8 +34,8 @@
93 
94     /* Set a suitable graphics mode. */
95     set_color_depth(depth);
96- if ((set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0) &&
97- (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) < 0)) {
98+ if ((set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 240, 0, 0) < 0) &&
99+ (set_gfx_mode(GFX_AUTODETECT, 320, 240, 0, 0) < 0)) {
100     allegro_message("Error setting video mode (640x480x%d).\n", depth);
101     return 1;
102     }
103Index: allegro-4.4.2/addons/loadpng/examples/exdata.c
104===================================================================
105--- allegro-4.4.2.orig/addons/loadpng/examples/exdata.c 2012-03-31 00:56:25.474363134 +0200
106+++ allegro-4.4.2/addons/loadpng/examples/exdata.c 2012-03-31 00:59:00.787224634 +0200
107@@ -13,7 +13,7 @@
108 {
109     BITMAP *bmp;
110     DATAFILE *data;
111- int depth = 16;
112+ int depth = 32;
113 
114     allegro_init();
115     install_keyboard();
116@@ -33,8 +33,8 @@
117     }
118 
119     set_color_depth(depth);
120- if ((set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0) &&
121- (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) < 0)) {
122+ if ((set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 240, 0, 0) < 0) &&
123+ (set_gfx_mode(GFX_AUTODETECT, 320, 240, 0, 0) < 0)) {
124     allegro_message("Unable to set video mode (640x480x%d).\n", depth);
125     return 1;
126     }
127

Archive Download this file



interactive