dimok789 / loadiine_gx2

A WiiU SD Loader with GX2 GUI
GNU General Public License v3.0
287 stars 78 forks source link

Add autolaunch for Art Academy & Karaoke #115

Open Destiny1984 opened 8 years ago

Destiny1984 commented 8 years ago

Just a dirty copy and paste for both titles with their TitleIDs.

Need someone to test.

Hartie95 commented 8 years ago

Wouldn't it be better to do it it in an more variable way? I thought about something like this:

int launchApplication(u32 launchMode)
{
    u32 availableTitleIDs=0;
    u32 rundisk=0;
    u32 gameindex=0;
    u64 titleIDs[][3]= {
        //smash
        {
            0x0005000010145000,//EUR
            0x0005000010144F00,//USA
            0x0005000010110E00 //JAP
        },
        //Karaoke
        {
            0x0005000010149600,//EUR
            0x0005000010100D00,
            0x0005000010102500 
        },
        //Art
        {
            0x000500001017B500,//EUR
            0x000500001017BF00,//USA
            0x000500001017BE00 //JAP
        }
    };
    switch(launchMode)
    {
        case LOADIINE_MODE_SMASH_BROS :
            availableTitleIDs=3;
            gameindex=0;
            rundisk=1;
            break;
        case LOADIINE_MODE_KARAOKE:
            availableTitleIDs=3;
            gameindex=1;
            break;
        case LOADIINE_MODE_ART_ATELIER:
            availableTitleIDs=3;
            gameindex=2;
            rundisk=1;
            break;
        default:
            return 255;
    }

    while(availableTitleIDs--)
    {
        if(SYSCheckTitleExists(titleIDs[gameindex][availableTitleIDs]))
        {
            SYSLaunchTitle(titleIDs[gameindex][availableTitleIDs]);
            return 0;
        }
    }
    if(rundisk)
    {
        char buf_vol_odd[20];
        strcpy(buf_vol_odd, "/vol/storage_odd03");
        _SYSLaunchTitleByPathFromLauncher(buf_vol_odd, 18, 0);
    }
} 

Its just something quick i wrote to give an example of what I'm meaning, and maybe its not fully completed.