Date:2011-06-16 22:14:41 (12 years 9 months ago)
Author:David Kühling
Commit:a82661ffcd468bf76a2ba74e53b3f32e196020a7
Message:liballegro: make the fbcon fixes really water-tight (fix really all cases).

Files: liballegro/patches/020-fix-fbcon-init.patch (5 diffs)

Change Details

liballegro/patches/020-fix-fbcon-init.patch
11Index: allegro-4.4.2/src/linux/fbcon.c
22===================================================================
3+++ allegro-4.4.2/src/linux/fbcon.c 2011-06-02 11:04:18.000000000 +0200
3--- allegro-4.4.2.orig/src/linux/fbcon.c 2011-06-02 11:18:50.000000000 +0200
44@@ -19,6 +19,10 @@
55  * See readme.txt for copyright information.
66  */
...... 
1313
1414 #include "allegro.h"
1515 #include "allegro/internal/aintern.h"
16@@ -263,6 +267,7 @@
16@@ -251,6 +255,7 @@
17    if (__al_linux_console_graphics() != 0) {
18       ioctl(fbfd, FBIOPUT_VSCREENINFO, &orig_mode);
19       close(fbfd);
20+ fb_mode_read = FALSE;
21       return NULL;
22    }
23
24@@ -263,6 +268,7 @@
1725      case -1:
1826         /* let's see if we can get the actual screen mode */
1927         /* shouldn't we be keeping the previous color depth setting? */
...... 
2129         switch (orig_mode.bits_per_pixel) {
2230            case 8:
2331            case 16:
24@@ -360,9 +365,21 @@
32@@ -360,9 +366,21 @@
2533      continue;
2634
2735       /* try to set the mode */
...... 
4351       }
4452    }
4553
46@@ -377,6 +394,9 @@
54@@ -377,6 +395,9 @@
4755    close(fbfd);
4856    ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Framebuffer resolution not available"));
4957    TRACE(PREFIX_E "Resolution %dx%d not available...\n", w, h);
...... 
5361    return NULL;
5462
5563    got_a_nice_mode:
64@@ -387,6 +408,7 @@
65       __al_linux_console_text();
66       close(fbfd);
67       ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Framebuffer ioctl() failed"));
68+ fb_mode_read = FALSE;
69       return NULL;
70    }
71
72@@ -399,6 +421,7 @@
73       ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Can't map framebuffer"));
74       TRACE(PREFIX_E "Couldn't map framebuffer for %dx%d. Restored old "
75         "resolution.\n", w, h);
76+ fb_mode_read = FALSE;
77       return NULL;
78    }
79
80@@ -428,6 +451,7 @@
81       __al_linux_console_text();
82       close(fbfd);
83       TRACE(PREFIX_E "Couldn't make bitmap `b', sorry.\n");
84+ fb_mode_read = FALSE;
85       return NULL;
86    }
87

Archive Download the corresponding diff file



interactive