Subversion Repositories freemyipod

Rev

Rev 808 | Rev 833 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 808 Rev 830
Line 24... Line 24...
24
#include "emcoreapp.h"
24
#include "emcoreapp.h"
25
#include "libmkfat32.h"
25
#include "libmkfat32.h"
26
#include "tools.h"
26
#include "tools.h"
27
#include "util.h"
27
#include "util.h"
28
#include "main.h"
28
#include "main.h"
-
 
29
#include "confirmchooser.h"
29
 
30
 
30
 
31
 
31
void run_clearcfg(void** firmware, void** app, int* size)
32
void run_clearcfg(void** firmware, void** app, int* size)
32
{
33
{
-
 
34
    if (!run_confirmchooser("Really clear Rockbox config?")) return;
33
    remove("/.rockbox/config.cfg");
35
    remove("/.rockbox/config.cfg");
34
    memcpy(framebuf, bg, 320 * 240 * 3);
36
    memcpy(framebuf, bg, 320 * 240 * 3);
35
    message(97, "Rockbox configuration", "  has been cleared.  ");
37
    message(97, "Rockbox configuration", "  has been cleared.  ");
36
}
38
}
37
 
39
 
38
void run_cleardb(void** firmware, void** app, int* size)
40
void run_cleardb(void** firmware, void** app, int* size)
39
{
41
{
-
 
42
    if (!run_confirmchooser("Really clear Rockbox database?")) return;
40
    remove("/.rockbox/database_0.tcd");
43
    remove("/.rockbox/database_0.tcd");
41
    remove("/.rockbox/database_1.tcd");
44
    remove("/.rockbox/database_1.tcd");
42
    remove("/.rockbox/database_2.tcd");
45
    remove("/.rockbox/database_2.tcd");
43
    remove("/.rockbox/database_3.tcd");
46
    remove("/.rockbox/database_3.tcd");
44
    remove("/.rockbox/database_4.tcd");
47
    remove("/.rockbox/database_4.tcd");
Line 66... Line 69...
66
    progressbar_setpos((struct progressbar_state*)user, current, false);
69
    progressbar_setpos((struct progressbar_state*)user, current, false);
67
}
70
}
68
 
71
 
69
void run_reformat(void** firmware, void** app, int* size)
72
void run_reformat(void** firmware, void** app, int* size)
70
{
73
{
-
 
74
    if (!run_confirmchooser("Really reformat data partition?")) return;
71
    memcpy(framebuf, bg, 320 * 240 * 3);
75
    memcpy(framebuf, bg, 320 * 240 * 3);
72
    rendertext(framebuf, 70, 125, 320, 0xff7fffff, 0, "Reformatting data partition...");
76
    rendertext(framebuf, 70, 125, 320, 0xff7fffff, 0, "Reformatting data partition...");
73
    update_display(NULL);
77
    update_display(NULL);
74
    displaylcd(0, 0, 320, 240, framebuf, 0, 0, 320);
78
    displaylcd(0, 0, 320, 240, framebuf, 0, 0, 320);
75
    struct emcorelib_header* libmkfat32 = loadlib(LIBMKFAT32_IDENTIFIER,
79
    struct emcorelib_header* libmkfat32 = loadlib(LIBMKFAT32_IDENTIFIER,