Homebrew Help with some coding (code inside!) error

Dan_Aykroyd

Well-Known Member
OP
Member
Joined
Oct 30, 2008
Messages
318
Trophies
0
XP
226
Country
United States
Hi!

I'm trying to modify WAD Manager source code for the device selection screen, but I can't get past an issue. Here the code now:

CODEu32 buttons = Wpad_WaitButtons();

ÂÂÂÂ/* Select source device */
ÂÂÂÂfor (;;) {
ÂÂÂÂÂÂÂÂ/* Clear console */
ÂÂÂÂÂÂÂÂCon_Clear();

ÂÂÂÂÂÂÂÂ/* Selected device */
ÂÂÂÂÂÂÂÂdev = &deviceList[device];

ÂÂÂÂÂÂÂÂprintf("\n[+] Selected IOS version: < IOS%d >\n\n\n\n", iosVersion[iosSelected]);

ÂÂÂÂÂÂÂÂfor(i=0;i
 

Dan_Aykroyd

Well-Known Member
OP
Member
Joined
Oct 30, 2008
Messages
318
Trophies
0
XP
226
Country
United States
Yes, it is. This is the upper part which I didn't post:

QUOTE said:
void Menu_Device(void)
{
fatDevice *dev = NULL;

s32 ret;
u32 i, cnt;
u8 *iosVersion = NULL;
u32 iosCnt;

/* Get IOS versions */
ret = Title_GetIOSVersions(&iosVersion, &iosCnt);
if (ret < 0)
return;

/* Sort list */
qsort(iosVersion, iosCnt, sizeof(u8), __Menu_IsGreater);

/* Set default version */
// first: check if CIOS avaialbe and make it default
if(iosSelected
 

emupaul

Well-Known Member
Member
Joined
Jun 26, 2009
Messages
416
Trophies
0
Location
space
Website
Visit site
XP
144
Country
United States
make sure buttons doesnt return NULL check for it.


if(buttons==NULL)
printf("failed");
else
//I dont know im guessing you want to init pad
// then try to poll buttons again.
 

Dan_Aykroyd

Well-Known Member
OP
Member
Joined
Oct 30, 2008
Messages
318
Trophies
0
XP
226
Country
United States
WiiCrazy said:
comment whole code (device selection part) and set the dev variable manually...

for example....
dev = &deviceList[0];

I've tried that before even posting the first post, and it still didn't work.
frown.gif
And I used exactly that line you posted to replace the whole selection device "for"!

But now I'm sure what the problem is: the IOS_Reload. If I coment that, it works OK (if I skip the device selection). But if I let that line to exectue, it crashes. I can't figure out what that has to do with anything, even because I'm manually assigning the same values that the variables get when running through the "for", and it still doesn't work!

Damn it
 

WiiCrazy

Be water my friend!
Member
Joined
May 8, 2008
Messages
2,395
Trophies
0
Location
Istanbul
Website
www.tepetaklak.com
XP
387
Country
Ok, now see there is also ios selection in the same codepiece... if you only want to filter out device selection then you need to comment only device selection related code... if you want to filter out both then filter out ios related stuff and call the IOS reload with the ios number you want...
 

Dan_Aykroyd

Well-Known Member
OP
Member
Joined
Oct 30, 2008
Messages
318
Trophies
0
XP
226
Country
United States
That's what I did. I commented the whole section out and set the selected device to &[0] and the selected IOS to 20 (the IOS249 array index for me), and it still didn't work!

And the funny thing is that, when printing to the screen the value of those variables the first time it enters the for, it's exactly those values! So if I press "A", without moving the arrows, it works fine! But somehow, when I skip the "for" it crashes.

I'm really clueless now as what to do. I spent some good couple of hours yesterday on something quite stupid as this.
frown.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    I mean since basically all the games are errmmm free lol
  • Veho @ Veho:
    I mean yeah sure but the specs are the same as a $50 model, it's just those pesky "quality of life" things driving up the price, like an actually working speaker, or buttons that don't melt, and stuff like that.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I think all in my Pi 4 was well north of 200 bucks 150ish for the Pi 4 the case the fancy cooler, then like 70 for the 500GB MicroSD then like 70 for the Xbox controller. But honestly it's a nice set up I really enjoy and to me was worth every penny. (even bought more controllers for 2 or 4 player games.) hmmm have never played any 2 player games yet :(
  • Veho @ Veho:
    Yeah that's what I hate about the RPi, it's supposedly $30 or something but it takes an additional $200 of accessories to actually turn it into a working something.
  • Psionic Roshambo @ Psionic Roshambo:
    yes that's the expensive part lol
  • Veho @ Veho:
    I mean sure it's flexible and stuff but so is uremum but it's fiddly.
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah a lot of it I consider a hobby, using Batocera I am constantly adjusting the collection adding and removing stuff, scraping the artwork. Haven't even started on some music for the theme... Also way down the road I am considering attempting to do a WiiFlow knock off lol
  • Veho @ Veho:
    I want everything served on a plate plz ktnx, "work" is too much work for me.
  • Veho @ Veho:
    Hmm, with that in mind, maybe a complete out-the-box solution with all the games collected, pacthed and optimized for me would be worth $150 :unsure:
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah it's all choice and that's a good thing :)
  • Bunjolio @ Bunjolio:
    animal crossing new leaf 11pm music
  • Bunjolio @ Bunjolio:
    avatars-kKKZnC8XiW7HEUw0-KdJMsw-t1080x1080.jpg
    wokey d pronouns
  • SylverReZ @ SylverReZ:
    What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo
  • BakerMan @ BakerMan:
    wokey d pronouns when woku walks in

    "CALL ME THEY SLASH THEEEEEEEEEEEEEEEEEEEEEEEEEEM"
  • AncientBoi @ AncientBoi:
    :tpi::rofl2::rofl2: Right on point :rofl2::rofl2::tpi:
    +2
  • Bunjolio @ Bunjolio:
    politics forum is def a place that exists
    +2
  • Bunjolio @ Bunjolio:
    lol
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    "My party doesn't lie!!" ummm politician not lying? Has hell frozen over? lol
    +1
  • AncientBoi @ AncientBoi:
    Tries calling them
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Reach around and touch someone! AT&T!!!
    +1
  • AncientBoi @ AncientBoi:
    Especially me :D:evil::shy:
    SylverReZ @ SylverReZ: https://youtu.be/-mouJmHo954?feature=shared&t=76