Homebrew What's the easiest way to check if a title is installed?

JoostinOnline

Certified Crash Test Dummy
OP
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
The next version of Settings Editor GUI prompts you how you want to exit when in an emu nand (using exit(0) doesn't work). Currently all the options (various channels and shutdown/reset) are displayed, but, if the channel isn't installed, it gives a message and asks again. That works okay, but I want to limit the list of channels depending on what you have installed. Here is my code:
Code:
void EmuExitPrompt(void) {
int item;
char menu[1024];
do
{
*menu = '\0';
grlib_menuAddItem (menu, 1, "Load Homebrew Channel");
grlib_menuAddItem (menu, 2, "Load Homebrew Filter");
grlib_menuAddItem (menu, 3, "Load PostLoader Channel");
grlib_menuAddSeparetor (menu);
grlib_menuAddItem (menu, 4, "Restart Wii");
grlib_menuAddItem (menu, 5, "Shutdown Wii");

item = grlib_menu ("------ Select an exit type ------", menu);
if (item == 1) {
WII_LaunchTitle(TITLE_ID(0x00010001,0xAF1BF516)); // HBC v1.0.7+
WII_LaunchTitle(TITLE_ID(0x00010001,0x4a4f4449)); // HBC JODI
WII_LaunchTitle(TITLE_ID(0x00010001,0x48415858)); // HBC HAXX
Message ("Homebrew Channel not installed");
sleep (1);
}
if (item == 2) {
WII_LaunchTitle(TITLE_ID(0x00010001,0x54484246)); // Homebrew Filter THBF
Message ("Homebrew Filter not installed");
sleep (1);
}
if (item == 3) {
WII_LaunchTitle(TITLE_ID(0x00010001,0x504f5354)); // postLoader2 Channel POST
Message ("PostLoader Channel not installed");
sleep (1);
}
if (item == 4) {
SYS_ResetSystem(SYS_RESTART,0,0); // Restart Wii
}
if (item == 5) {
SYS_ResetSystem(SYS_SHUTDOWN,0,0); // Shutdown Wii
}
}
while (true);

} // EmuExitPromt
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
Either you can scan the title/00010001 folder or you can search for entries in the uid.sys file.

You can find usfull code snippets in channel loader programs like Mighty Channels, Postloader, Triiforce.
 
  • Like
Reactions: 1 person

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
Don't know. Logically, they should be removed from that file if the channel is properly deinstalled. Scanning the folder is a better solution.
 

SifJar

Not a pirate
Member
Joined
Apr 4, 2009
Messages
6,022
Trophies
0
Website
Visit site
XP
1,175
Country
uid.sys will include deleted channels, it's not a log of what is installed, it's a log of what has been run (and the uids associated with them). Scanning the folder is the best way to do I think.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    I @ idonthave: :)