Subversion Repositories freemyipod

Rev

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

Rev 828 Rev 838
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()
32
{
33
{
-
 
34
    if (!run_confirmchooser("Clear Rockbox config?")) return;
33
    remove("/.rockbox/config.cfg");
35
    remove("/.rockbox/config.cfg");
34
    memcpy(framebuf, bg, 176 * 132 * 3);
36
    memcpy(framebuf, bg, 176 * 132 * 3);
35
    message(25, "Rockbox configuration", "  has been cleared.  ");
37
    message(25, "Rockbox configuration", "  has been cleared.  ");
36
}
38
}
37
 
39
 
38
void run_cleardb(void** firmware, void** app, int* size)
40
void run_cleardb()
39
{
41
{
-
 
42
    if (!run_confirmchooser("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 64... Line 67...
64
static void fat32_progressbar_update(void* user, int current)
67
static void fat32_progressbar_update(void* user, int current)
65
{
68
{
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()
70
{
73
{
-
 
74
    if (!run_confirmchooser("Reformat data partition?")) return;
71
    memcpy(framebuf, bg, 176 * 132 * 3);
75
    memcpy(framebuf, bg, 176 * 132 * 3);
72
    rendertext(framebuf, 7, 65, 176, 0xff7fffff, 0, "Reformatting data partition");
76
    rendertext(framebuf, 7, 65, 176, 0xff7fffff, 0xa0000000, "Reformatting data partition");
73
    update_display(NULL);
77
    update_display(NULL);
74
    displaylcd(0, 0, 176, 132, framebuf, 0, 0, 176);
78
    displaylcd(0, 0, 176, 132, framebuf, 0, 0, 176);
75
    struct emcorelib_header* libmkfat32 = loadlib(LIBMKFAT32_IDENTIFIER,
79
    struct emcorelib_header* libmkfat32 = loadlib(LIBMKFAT32_IDENTIFIER,
76
                                                  LIBMKFAT32_API_VERSION, "libmkf32");
80
                                                  LIBMKFAT32_API_VERSION, "libmkf32");
77
    struct libmkfat32_api* mf32 = (struct libmkfat32_api*)libmkfat32->api;
81
    struct libmkfat32_api* mf32 = (struct libmkfat32_api*)libmkfat32->api;