Homebrew SaveGame Manager GX

Delete Save one by one fonction

  • Yes

    Votes: 34 81.0%
  • No

    Votes: 8 19.0%

  • Total voters
    42
  • Poll closed .

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
It's longer than yours because it's better. Your version will always deinitialize ISFS regardless of if the program still wants to use it and the boolean result isn't globally stored, so the test gets executed every time the function is called. When you put a function in a library like obcd has done here it is wise to make the best effort to protect against people doing stupid things with it.
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
It's longer than yours because it's better. Your version will always deinitialize ISFS regardless of if the program still wants to use it and the boolean result isn't globally stored, so the test gets executed every time the function is called. When you put a function in a library like obcd has done here it is wise to make the best effort to protect against people doing stupid things with it.
That's a good point, lol.
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
Is this not compatible with System Menu 3.2?
i'm running the app under 3.2 or 4.3 without any problems...


OK guy's,
i think i will continue to use the is_neek3 detection as odbc had told me...
Yeah, definitely stick with that. I hadn't considered people not wanting to run ISFS_Deinititialize so it's good that he made that modification.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
It's not my idea. It comes from stfour's is_neek2 :) . He deserves the credit's for it. I just wanted their behavour to be identical.
When dj_skual asked for a proper way to detect neek, I proposed the library. The idea behind it is, if it get's broken someday. (hopefully never will), it will be seen in all programs using it. It's easier to pinpoint the problem that way.
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
It's not my idea. It comes from stfour's is_neek2 :) . He deserves the credit's for it. I just wanted their behavour to be identical.
When dj_skual asked for a proper way to detect neek, I proposed the library. The idea behind it is, if it get's broken someday. (hopefully never will), it will be seen in all programs using it. It's easier to pinpoint the problem that way.
Unless crediar changes the SNEEK folder to something else, I don't think it should ever break. Even if he does, there are other files and folders that could be checked. The problem with my original version that checked boot2 (again, I don't know if I was the first to think of it or not) was that it depended on
1) There never being another boot2 update
2) NEEK devs never changing the version back to v4
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
Overjoy used that boot2 check in his modified wiiflow (joyflow)
I never really had problems with it, as I used my init_uneek_fs for that detection, and I normally only use neek2o that supports it.
Even if the sneek folder name get's changed, this doesn't mean a sneek folder can still exist and be used for the check on the neek nand drive.
If nintendo adds a sneek folder to their nand, we have a problem. :)
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
Overjoy used that boot2 check in his modified wiiflow (joyflow)
I never really had problems with it, as I used my init_uneek_fs for that detection, and I normally only use neek2o that supports it.
Even if the sneek folder name get's changed, this doesn't mean a sneek folder can still exist and be used for the check on the neek nand drive.
If nintendo adds a sneek folder to their nand, we have a problem. :)
How long ago was that?
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
ok,
do u think i need to revert to my old neek detection way?
The new one isn't nearly as likely to break as the old boot2 version one, and should be fixable by changing one string if the SNEEK folder is ever renamed, but if there are no downsides to the method tueidj is referring to you might consider changing it just to be safe.
 

dj_skual

Code & Mix
OP
Member
Joined
Mar 9, 2008
Messages
1,014
Trophies
1
Website
sourceforge.net
XP
2,640
Country
France
if obcd is ok to add in is lib:
Code:
bool is_neek4(bool isfsinit) 
{
confirm_neek = false;

u32 ownerID;
u16 groupID;
u8  attributes;
u8  ownerperm;
u8  groupperm;
u8  otherperm;

if(isfsinit) ISFS_Initialize();

ISFS_GetAttr("/shared1/00000000.app", &ownerID, &groupID, &attributes, &ownerperm, &groupperm, &otherperm);

if(otherperm)
confirm_neek = true;

if(isfsinit) ISFS_Deinitialize();

return confirm_neek;
}
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
I'm still a bit of a newbie at C (I REALLY need to get a tutorial book on it), but if you added:
Code:
static u32 _fs_initialized;
to the library (the variable isn't in isfs.h, only in isfs.c), couldn't you just refer to it to see if it has been initialized, eliminating the need for a boolean argument?

Sorry if that is nonsense, lol.
 

dj_skual

Code & Mix
OP
Member
Joined
Mar 9, 2008
Messages
1,014
Trophies
1
Website
sourceforge.net
XP
2,640
Country
France
I'm still a bit of a newbie at C (I REALLY need to get a tutorial book on it), but if you added:
Code:
static u32 _fs_initialized;
to the library (the variable isn't in isfs.h, only in isfs.c), couldn't you just refer to it to see if it has been initialized, eliminating the need for a boolean argument?

Sorry if that is nonsense, lol.
i've already looked in isfs.h but if the variable is only in .c, i can't have acces to this one.
but all that is only usefull if obcd want to add this in his lib.
;)
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
I'm still a bit of a newbie at C (I REALLY need to get a tutorial book on it), but if you added:
Code:
static u32 _fs_initialized;
to the library (the variable isn't in isfs.h, only in isfs.c), couldn't you just refer to it to see if it has been initialized, eliminating the need for a boolean argument?
Static global variables are only visible to code within the same .c file, they can't be accessed by name from anywhere else even if you copy the definition (you end up with a new static variable with the same name, which is why as a rule you should never use "static" in a header unless you like debugging seemingly impossible situations).
 
  • Like
Reactions: 1 person

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/wZgjSNb-o4c?si=ajt4Lgq_LTYcXxs2 +1