Richter64 / usbloader-gui

Automatically exported from code.google.com/p/usbloader-gui
0 stars 0 forks source link

Set covers_path at config.txt #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've made some changes to the source code to check covers_path for your
covers and covers_path/disc/ for discs. Also to be able to add a nodisc.png
at the discs folder if you want to replace the default one.

cfg.c r182
added the lines before 383
---------------------------------------------------------------------------
    if (strcmp(name, "covers_path") == 0) {
        strcopy(CFG.covers_path, val, sizeof(CFG.covers_path));
        return;
    }
---------------------------------------------------------------------------    
menu.cpp r182
changed the lines 650 656 661 2068 2073 2078
-------------------------------old-----------------------------------------
    snprintf(imgPath,sizeof(imgPath),"SD:/images/disc/%s.png",ID);

        snprintf(imgPath, sizeof(imgPath), "SD:/images/disc/%s.png", IDfull);

            diskCover = new GuiImageData(imgPath,nodisc_png);

                    snprintf(imgPath, sizeof(imgPath), "SD:/images/%s.png",
ID);

                        snprintf(imgPath, sizeof(imgPath),
"SD:/images/%s.png", IDfull);

                            cover = new
GuiImageData("SD:/images/noimage.png", nocover_png); //load no image
---------------------------------------------------------------------------

-------------------------------new-----------------------------------------
    snprintf(imgPath, sizeof(imgPath), "%sdisc/%s.png", CFG.covers_path, ID);

    snprintf(imgPath, sizeof(imgPath), "%sdisc/%s.png", CFG.covers_path,
IDfull);

    snprintf(imgPath, sizeof(imgPath), "%sdisc/nodisc.png", CFG.covers_path);
    diskCover = new GuiImageData(imgPath,nodisc_png);

    snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID);

    snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull);

    snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path);
    cover = new GuiImageData(imgPath, nocover_png); //load no image
---------------------------------------------------------------------------

Original issue reported on code.google.com by marino...@gmail.com on 28 Apr 2009 at 2:00

GoogleCodeExporter commented 9 years ago
r185 add it almost all
only
snprintf(imgPath, sizeof(imgPath), "%snodisc.png", CFG.disc_path);

was left out at line 661. maybe it's not the wright way to use it. who knows. 
just
thx for saving me from keeping editing the source to add those lines again and 
again
and again....

Original comment by marino...@gmail.com on 28 Apr 2009 at 3:13

GoogleCodeExporter commented 9 years ago

Original comment by dimok...@hotmail.de on 28 Apr 2009 at 3:35

GoogleCodeExporter commented 9 years ago
lalalalalalallallaalalllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
lllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaallll
lllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaallllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalllllllllllllllllllllllllll
llllllllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalllllllllll
llllllllllllllllllllllllllllllllllllllllllll

Original comment by milena10...@hotmail.com on 13 Sep 2010 at 10:05