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
  • No one is chatting at the moment.
  • Sicklyboy @ Sicklyboy:
    @BigOnYa, I'll rip a bag off my Volcano to that, brother
    +2
  • a_username_that_is_cool @ a_username_that_is_cool:
    DDDS . Dual Developer Dedede System :)
    +1
  • BakerMan @ BakerMan:
    also happy birthday @Xdqwerty
    +1
  • BigOnYa @ BigOnYa:
    Is it me you're looking for?
  • MysticStarlight @ MysticStarlight:
    'Cause I wonder where you are
  • MysticStarlight @ MysticStarlight:
    wait I got the lyrics mixed up
    +1
  • BigOnYa @ BigOnYa:
    And I wonder what you do...Lol
  • BigOnYa @ BigOnYa:
    Its all good, I'm here to talk to you.
  • BigOnYa @ BigOnYa:
    Hello
  • BigOnYa @ BigOnYa:
    I've been playing fallout4 all day, I went into a elevator and it kept going, never stopped, waited 5 minutes, must of been a bug. How bout you, whatcha do today?
    +1
  • MysticStarlight @ MysticStarlight:
    I'm wondering why a stray tuxedo cat has a cloudy eye
  • MysticStarlight @ MysticStarlight:
    I've been playing TOTK all day also
    +1
  • MysticStarlight @ MysticStarlight:
    Oh you reminded me of those elevator nightmares
  • BigOnYa @ BigOnYa:
    Awesome game, fun how they force you to build, but you can build as you want
  • MysticStarlight @ MysticStarlight:
    It is super fun, I actually prefer it over BoTW
    +1
  • BigOnYa @ BigOnYa:
    The guy holding the sign always cracked me up, esp when you fail, and it falls
  • MysticStarlight @ MysticStarlight:
    Ah yes, that guy lol. I still need to find all his signs. The game has a lot to do though so I don't know what to finish first
  • MysticStarlight @ MysticStarlight:
    I'm 120 hours in and am still like 44.4% done
    +1
  • BigOnYa @ BigOnYa:
    Good times. Building is starting to get good around now for you. You making me want to make run thru again.
  • BigOnYa @ BigOnYa:
    Ok good chatting, enjoy your gaming, and avoid the lightning, or put your sword away. Good night.
  • K3Nv2 @ K3Nv2:
    All I gotta do is not spend $10 in the next 5 days and I'll break even this month lol
  • K3Nv2 @ K3Nv2:
    @BigOnYa, tell your wife not to forget her wallet
    K3Nv2 @ K3Nv2: @BigOnYa, tell your wife not to forget her wallet