Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

remote.patch
Wednesday, April 25th, 2007 at 12:11:05pm UTC 

  1. Index: apps/recorder/backdrop.c
  2. ===================================================================
  3. --- apps/recorder/backdrop.c    (révision 13256)
  4. +++ apps/recorder/backdrop.c    (copie de travail)
  5. @@ -26,14 +26,9 @@
  6.  static fb_data main_backdrop[LCD_HEIGHT][LCD_WIDTH]  __attribute__ ((aligned (16)));
  7.  static fb_data wps_backdrop[LCD_HEIGHT][LCD_WIDTH]  __attribute__ ((aligned (16)));
  8.  #elif LCD_DEPTH == 2
  9. -#if LCD_PIXELFORMAT == VERTICAL_PACKING
  10. -static fb_data main_backdrop[(LCD_HEIGHT+3)/4][LCD_WIDTH];
  11. -static fb_data wps_backdrop[(LCD_HEIGHT+3)/4][LCD_WIDTH];
  12. -#else
  13. -static fb_data main_backdrop[LCD_HEIGHT][LCD_FBWIDTH];
  14. -static fb_data wps_backdrop[LCD_HEIGHT][LCD_FBWIDTH];
  15. +static fb_data main_backdrop[LCD_FBHEIGHT][LCD_FBWIDTH];
  16. +static fb_data wps_backdrop[LCD_FBHEIGHT][LCD_FBWIDTH];
  17.  #endif
  18. -#endif
  19.  
  20.  static bool main_backdrop_valid = false;
  21.  static bool wps_backdrop_valid = false;
  22. Index: apps/settings.c
  23. ===================================================================
  24. --- apps/settings.c     (révision 13256)
  25. +++ apps/settings.c     (copie de travail)
  26. @@ -751,6 +751,9 @@
  27.      else
  28.      {
  29.          wps_data_init(gui_wps[0].data);
  30. +#ifdef HAVE_REMOTE_LCD
  31. +        gui_wps[0].data->remote_wps = false;
  32. +#endif
  33.      }
  34.  
  35.  #if LCD_DEPTH > 1
  36. @@ -777,7 +780,10 @@
  37.          wps_data_load(gui_wps[1].data, buf, true);
  38.      }
  39.      else
  40. +    {
  41.          wps_data_init(gui_wps[1].data);
  42. +        gui_wps[1].data->remote_wps = false;
  43. +    }
  44.  #endif
  45.  
  46.  #ifdef HAVE_LCD_BITMAP
  47. Index: apps/gui/gwps.c
  48. ===================================================================
  49. --- apps/gui/gwps.c     (révision 13256)
  50. +++ apps/gui/gwps.c     (copie de travail)
  51. @@ -741,6 +741,9 @@
  52.      FOR_NB_SCREENS(i)
  53.      {
  54.          wps_data_init(&wps_datas[i]);
  55. +#ifdef HAVE_REMOTE_LCD
  56. +        wps_datas[i].remote_wps = (i != 0);
  57. +#endif
  58.          gui_wps_init(&gui_wps[i]);
  59.          gui_wps_set_data(&gui_wps[i], &wps_datas[i]);
  60.          gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]);
  61. Index: apps/gui/gwps.h
  62. ===================================================================
  63. --- apps/gui/gwps.h     (révision 13256)
  64. +++ apps/gui/gwps.h     (copie de travail)
  65. @@ -312,6 +312,11 @@
  66.      unsigned short wps_progress_pat[8];
  67.      bool full_line_progressbar;
  68.  #endif
  69. +
  70. +#ifdef HAVE_REMOTE_LCD
  71. +    bool remote_wps;
  72. +#endif
  73. +
  74.      /* Number of lines in the WPS. During WPS parsing, this is
  75.         the index of the line being parsed. */
  76.      int num_lines;
  77. Index: apps/gui/wps_parser.c
  78. ===================================================================
  79. --- apps/gui/wps_parser.c       (révision 13257)
  80. +++ apps/gui/wps_parser.c       (copie de travail)
  81. @@ -311,9 +311,17 @@
  82.                          char* filename,
  83.                          struct bitmap *bm)
  84.  {
  85. +    int format;
  86. +#ifdef HAVE_REMOTE_LCD
  87. +    if (wps_data->remote_wps)
  88. +        format = FORMAT_ANY|FORMAT_REMOTE;
  89. +    else
  90. +#endif
  91. +        format = FORMAT_ANY|FORMAT_TRANSPARENT;
  92. +
  93.      int ret = read_bmp_file(filename, bm,
  94.                              wps_data->img_buf_free,
  95. -                            FORMAT_ANY|FORMAT_TRANSPARENT);
  96. +                            format);
  97.  
  98.      if (ret > 0)
  99.      {
  100. @@ -840,9 +848,14 @@
  101.  
  102.  static void wps_reset(struct wps_data *data)
  103.  {
  104. +#ifdef HAVE_REMOTE_LCD
  105. +    bool rwps = data->remote_wps; /* remember whether the data is for a RWPS */
  106. +#endif
  107.      memset(data, 0, sizeof(*data));
  108. -    data->wps_loaded = false;
  109.      wps_data_init(data);
  110. +#ifdef HAVE_REMOTE_LCD
  111. +    data->remote_wps = rwps;
  112. +#endif
  113.  }
  114.  
  115.  #ifdef HAVE_LCD_BITMAP
  116. @@ -896,13 +909,16 @@
  117.      }
  118.  
  119.  #if LCD_DEPTH > 1
  120. -    if (backdrop_bmp_name)
  121. -    {
  122. -        get_image_filename(backdrop_bmp_name, bmpdir,
  123. -                           img_path, sizeof(img_path));
  124. -        load_wps_backdrop(img_path);
  125. -    }
  126. +#ifdef HAVE_REMOTE_LCD
  127. +    if (!wps_data->remote_wps)
  128.  #endif
  129. +        if (backdrop_bmp_name)
  130. +        {
  131. +            get_image_filename(backdrop_bmp_name, bmpdir,
  132. +                               img_path, sizeof(img_path));
  133. +            load_wps_backdrop(img_path);
  134. +        }
  135. +#endif
  136.  }
  137.  
  138.  #endif /* HAVE_LCD_BITMAP */

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right