How can I exit properly in an emunand?

Discussion in 'Wii - Emulation and Homebrew' started by JoostinOnline, Jan 22, 2012.

Jan 22, 2012
  1. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    Nevermind, new method of detecting emunand found.

    If anybody is interested you can use the following code:
    Code:
    #include 
    
    Code:
    bool CheckIfNeek()
    {
    ISFS_Initialize();
    u32 num = 0;
    bool ret = !(ISFS_ReadDir("/Sneek", NULL, &num));
    ISFS_Deinitialize ();
    return ret;
    }
    }
    Code:
    bool NeekEnabled =CheckIfNeek();
    
    NeekEnabled will will be true if you are in an emunand. You can change the variable name to whatever you want, or use it in a conditional.
     
  2. hellboy2010

    Member hellboy2010 GBAtemp Regular

    Joined:
    Nov 22, 2010
    Messages:
    220
    Country:
    United States
    OK runing Settings Editor GUI on neek2o v70 via postloader 3.56.1
    save changes and exit> restart wii > trow me back to my real nand
    save changes and exit> load postloader>trow me back to postloader enand

    runing Settings Editor GUI on uneek+di r192 via postloader .3.56.1
    save changes and exit>(do not showing other options) trow me back to enand.
    exit without saving>(do not showing other options) trow me back to enand.
     
    1 person likes this.
  3. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    Wait, you mean it works now?
     
  4. hellboy2010

    Member hellboy2010 GBAtemp Regular

    Joined:
    Nov 22, 2010
    Messages:
    220
    Country:
    United States
    is working for me

    but on uneek+di r187 freeze on exit
     
    1 person likes this.
  5. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    Thanks. I wish I knew why it didn't work before.

    If nobody can come up with a reason/solution, I'll just leave it the way it is so people with old versions of NEEK can continue to use SE GUI.
     
  6. stfour

    Member stfour GBAtemp Advanced Maniac

    Joined:
    May 24, 2011
    Messages:
    1,592
    Country:
    Italy
    Joostin, if I remember well it was always working for me...
     
  7. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    I don't remember if that was the case, I'll have to search through my old PM's.
     
  8. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    ISFS_ReadDir( "/sneek" ) or some other path that would appear on a sneek nand but not a normal wii.
     
    1 person likes this.
  9. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    Thanks, I hadn't thought about that. :D
     
  10. stfour

    Member stfour GBAtemp Advanced Maniac

    Joined:
    May 24, 2011
    Messages:
    1,592
    Country:
    Italy
    You have not payed attention to neek2o thread :P (and I haven't read all your first post :blink: )

     
  11. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    Lol, I never saw that. I thought the discussion about it ended. Here is what I was planning on using:
    Code:
    s32 CheckIfNeek() // New method for determining if this is a real or emu nand.  Works with new versions of NEEK
    {
    // Thanks goes to the almighty giantpune for this
    ISFS_Initialize();
    u32 num = 0;
    s32 ret = ISFS_ReadDir("/Sneek", NULL, &num);
    ISFS_Deinitialize ();
    return ret;
    } // CheckIfNeek
    
    Then doing this before exiting:
    Code:
    if (!CheckIfNeek()) EmuExitPrompt(); // Special exit if Wii is in *NEEK
    
    Any suggestions?
     
  12. stfour

    Member stfour GBAtemp Advanced Maniac

    Joined:
    May 24, 2011
    Messages:
    1,592
    Country:
    Italy
    Seems perfect.... I will update mine with yours :D
     
    1 person likes this.
  13. JoostinOnline
    OP

    Member JoostinOnline Certified Crash Test Dummy

    Joined:
    Apr 2, 2011
    Messages:
    10,834
    Location:
    The Twilight Zone
    Country:
    United States
    I put the code in my first post in case anybody else wants to use it.
     

Share This Page