opendreambox 2.0
[opendreambox.git] / meta-opendreambox / recipes-dreambox / tuxtxt / tuxbox-libtuxtxt / resize_framebuffer.diff
1 diff -u libs/libtuxtxt_orig/tuxtxt_common.h libs/libtuxtxt/tuxtxt_common.h
2 --- libs/libtuxtxt_orig/tuxtxt_common.h 2009-01-29 21:19:23.000000000 +0100
3 +++ libs/libtuxtxt/tuxtxt_common.h      2009-01-29 21:24:32.000000000 +0100
4 @@ -5375,15 +5375,6 @@
5                          ymosaic[0], ymosaic[1], ymosaic[2], renderinfo->StartX, renderinfo->StartY, renderinfo->ascender);
6  #endif
7  
8 -       /* get fixed screeninfo */
9 -       if (ioctl(renderinfo->fb, FBIOGET_FSCREENINFO, &renderinfo->fix_screeninfo) == -1)
10 -       {
11 -               perror("TuxTxt <FBIOGET_FSCREENINFO>");
12 -               FTC_Manager_Done(renderinfo->manager);
13 -               FT_Done_FreeType(renderinfo->library);
14 -               return 0;
15 -       }
16 -
17         /* get variable screeninfo */
18         if (ioctl(renderinfo->fb, FBIOGET_VSCREENINFO, &renderinfo->var_screeninfo) == -1)
19         {
20 @@ -5393,6 +5384,12 @@
21                 return 0;
22         }
23  
24 +       /* change to PAL resolution */
25 +       if (renderinfo->var_screeninfo.xres != 720) 
26 +       {
27 +               renderinfo->var_screeninfo.xres_virtual = renderinfo->var_screeninfo.xres = 720;
28 +               renderinfo->var_screeninfo.yres_virtual = renderinfo->var_screeninfo.yres = 576;
29 +       }
30  
31         /* set variable screeninfo for double buffering */
32         renderinfo->var_screeninfo.yres_virtual = 2*renderinfo->var_screeninfo.yres;
33 @@ -5407,6 +5404,15 @@
34                 return 0;
35         }
36  
37 +       /* get fixed screeninfo */
38 +       if (ioctl(renderinfo->fb, FBIOGET_FSCREENINFO, &renderinfo->fix_screeninfo) == -1)
39 +       {
40 +               perror("TuxTxt <FBIOGET_FSCREENINFO>");
41 +               FTC_Manager_Done(renderinfo->manager);
42 +               FT_Done_FreeType(renderinfo->library);
43 +               return 0;
44 +       }
45 +
46  #if TUXTXT_DEBUG
47         if (ioctl(fb, FBIOGET_VSCREENINFO, &renderinfo->var_screeninfo) == -1)
48         {