Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Record on start patch

Re: Record on start patch

From: Jerry Van Baren <gerald.vanbaren_at_smiths-aerospace.com>
Date: Thu, 3 Feb 2005 10:44:50 -0500

Christi Alice Scarborough wrote:
> Hi,
>
> Could one of the developers spare a bit of time to look at the patch I
> submitted for adding a start in the record screen option, please? It
> seems a shame not to have it in the main code since it's a feature
> several people have expressed an interest in.
>
> Thanks,
>
> Christi

Hi Christi,

The patch looks good to me. I'll try it when I get home tonight.
Thanks for putting it together.

IIRC, in my personal hack, I added a call to recording_screen() in
app_main() before browse_root(). This starts you up in the recording
screen. If you press "OFF" to exit the recording screen, you will drop
into the normal main menu screen system. Using my hack, to get back to
the recording screen you have to traverse the normal menu rather than
cycling through the "rec screen" -> "rec menu" -> "main menu" sequence.
  I don't know which is better... since you actually have a usable
patch, I guess that makes your way better ;-). On the other hand, my
UNTESTED! proposed variant (below) makes the menu sequence work the same
as it currently does, with the exception that you start in the recording
screen.

Example of my hack combined with Christi's elegant patch (UNTESTED!):
-------------------
void app_main(void)
{
     init();

#ifdef HAVE_RECORDING
#ifndef SIMULATOR
     if (global_settings.rec_start && ! start_wps) {
         /*
          * Start in the recording screen. On exit, mimic the
          * normal progression of the recording menu and then the
          * main menu, at which point we are operating normally.
          */
         recording_screen();
         rec_menu();
     }
#endif
#endif
     browse_root();
}

This would replace the part of your patch in apps/tree.c:
Index: apps/tree.c
===================================================================
RCS file: /cvsroot/rockbox/apps/tree.c,v
retrieving revision 1.280
diff -u -r1.280 tree.c
--- apps/tree.c 2 Jan 2005 12:08:34 -0000 1.280
+++ apps/tree.c 13 Jan 2005 15:43:13 -0000
_at__at_ -57,6 +57,7 _at__at_
  #include "talk.h"
  #include "filetypes.h"
  #include "misc.h"
+#include "recorder/recording.h"

  #ifdef HAVE_LCD_BITMAP
  #include "widgets.h"
_at__at_ -951,9 +955,22 _at__at_

      memcpy(currdir,root,sizeof(currdir));

- if (*dirfilter < NUM_FILTER_MODES)
+ if (*dirfilter < NUM_FILTER_MODES) {
          start_resume(true);

+#ifdef HAVE_RECORDING
+#ifndef SIMULATOR
+ if (global_settings.rec_start && ! start_wps) {
+ /* We fake being in the menu structure by calling the
appropriate */
+ /* parent when we drop out of each screen */
+ recording_screen();
+ rec_menu();
+ main_menu();
+ }
+#endif
+#endif
+ }
+
      numentries = showdir(currdir, dirstart, dirfilter);
      if (numentries == -1)
          return false; /* currdir is not a directory */

Thanks again,
gvb

P.S. Christi: You are missing the "i" in your emailer's "display name"
setting, it is coming through as "Christ Alice Scarborough"
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on 2005-02-03

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy