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
  • BakerMan @ BakerMan:
    the difference is i like wario and samus and he likes muscle mommies and feet
    +1
  • BakerMan @ BakerMan:
    wait, i forgot wizards too
  • BigOnYa @ BigOnYa:
    I have a buddy that has a moonshine still and he makes his own shine. He brought me a jar of some peach shine/brandy, shit is damn good. Gonna have to see if can get more.
    +1
  • BakerMan @ BakerMan:
    careful that shit don't make you go blind
  • BigOnYa @ BigOnYa:
    Nuh that's only if you drink what first comes out when distilling, you must throw out the first part of it when it starts running. (Its called the "head(s)" of the run) Or use it for fuel or a general purpose cleaner
    +1
  • K3Nv2 @ K3Nv2:
    If alcohol would've made @BigOnYa blind by now it would have
    +2
  • BigOnYa @ BigOnYa:
    So True.
    +1
  • K3Nv2 @ K3Nv2:
    I should make a poll for bigonya to change his username to DrunkOnYa
    +1
  • BigOnYa @ BigOnYa:
    That's my alt
    +1
  • K3Nv2 @ K3Nv2:
    I don't wanna go to the store someone go for me
  • BigOnYa @ BigOnYa:
    Call my wifey, tell her pick up stuff on her way over.
  • K3Nv2 @ K3Nv2:
    Pick up my door dash meat me in the allyway
    +1
  • BigOnYa @ BigOnYa:
    Wifey is busy, so ill send my buddy @AncientBoi , in his gimp outfit. "who ordered the 6" sausage?""
  • K3Nv2 @ K3Nv2:
    Like subway it's false advertising
    +1
  • BigOnYa @ BigOnYa:
    Ok "who ordered the Vienna sausage?"
  • K3Nv2 @ K3Nv2:
    Uremum
    +1
  • BigOnYa @ BigOnYa:
    My buddy convince me to download and play poker game with him yesterday, called Four Kings Casino, its pretty fun actually, you create a avatar and walk around in a virtual casino, and play any table, or slots with others online.There's even a dance club and bowling alley.
  • SylverReZ @ SylverReZ:
    They should bring advertisements like this back LOL.
  • BakerMan @ BakerMan:
    or that german ninja turtle commercial
    +1
  • K3Nv2 @ K3Nv2:
    Forgot to buy BBQ sauce at the store so made my own ffs
  • RedColoredStars @ RedColoredStars:
    Blues Hog BBQ sauces are pretty good.
  • K3Nv2 @ K3Nv2:
    My insurance has a thing where if I do a virtual visit they'll just send me a $100 gift card to Walmart I'm about to sell a company my medical history for $100 lol
  • BigOnYa @ BigOnYa:
    My insurance has a thing called, " Nope, we aren't paying for that." that they like to use on us all the time. Then we play the "Ok we will go to some other insurance company." then they miraculously say ok we will pay for that.
  • The_Dizzy_Vizzy @ The_Dizzy_Vizzy:
    Well look at what the cat dragged in!!!
    The_Dizzy_Vizzy @ The_Dizzy_Vizzy: Well look at what the cat dragged in!!!