Esempio n. 1
0
    public void Initialize()
    {
        if (initialized)
        {
            return;
        }

        // init save locatioon
#if (UNITY_SWITCH && !UNITY_EDITOR) || SWITCH_DEV
        mountName     = "save";
        saveDataPath += mountName + ":/";
#else
        mountName     = Application.persistentDataPath;
        saveDataPath += mountName + "/";
#endif

#if (UNITY_SWITCH && !UNITY_EDITOR) || SWITCH_DEV
        // init player prefs which inits mounted save data
        PlayerPrefsSwitch.PlayerPrefsSwitch.Init();
        nn.account.UserHandle userHandle = new nn.account.UserHandle();
        PlayerPrefsSwitch.PlayerPrefsSwitch.GetUserHandle(ref userHandle);
        nn.account.Account.GetUserId(ref userId, userHandle);
#endif
        initialized = true;
    }
Esempio n. 2
0
    private const int loadBufferSize = 1024;       // 1 KB

    public void initialize()
    {
        nn.account.Account.Initialize();
        nn.account.UserHandle userHandle = new nn.account.UserHandle();
        nn.account.Account.OpenPreselectedUser(ref userHandle);
        nn.account.Account.GetUserId(ref userId, userHandle);

        // mount save data
        nn.Result result = nn.fs.SaveData.Mount(mountName, userId);

        //print out error (debug only) and abort if the filesystem couldn't be mounted
        if (result.IsSuccess() == false)
        {
            Debug.Log("Critical Error: File System could not be mounted.");
            result.abortUnlessSuccess();
        }
    }
Esempio n. 3
0
    void Start()
    {
        nn.account.Account.Initialize();
        nn.account.UserHandle userHandle = new nn.account.UserHandle();

        nn.account.Account.OpenPreselectedUser(ref userHandle);
        nn.account.Account.GetUserId(ref userId, userHandle);

        nn.Result result = nn.fs.SaveData.Mount(mountName, userId);
        result.abortUnlessSuccess();

        filePath = string.Format("{0}:/{1}", mountName, fileName);

        nn.hid.Npad.Initialize();
        nn.hid.Npad.SetSupportedStyleSet(nn.hid.NpadStyle.Handheld | nn.hid.NpadStyle.JoyDual);
        nn.hid.Npad.SetSupportedIdType(npadIds);
        npadState = new nn.hid.NpadState();
    }
Esempio n. 4
0
    void Start()
    {
        // textComponent = GameObject.Find("/Canvas/Text").GetComponent<UnityEngine.UI.Text>();

        nn.account.Account.Initialize();
        nn.account.UserHandle userHandle = new nn.account.UserHandle();

        nn.account.Account.OpenPreselectedUser(ref userHandle);
        nn.account.Account.GetUserId(ref userId, userHandle);

        nn.Result result = nn.fs.SaveData.Mount(mountName, userId);
        result.abortUnlessSuccess();

        filePath = string.Format("{0}:/{1}", mountName, fileName);
        Load();

        nn.hid.Npad.Initialize();
        nn.hid.Npad.SetSupportedStyleSet(nn.hid.NpadStyle.Handheld | nn.hid.NpadStyle.JoyDual);
        nn.hid.Npad.SetSupportedIdType(npadIds);
        npadState = new nn.hid.NpadState();
    }
Esempio n. 5
0
 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle)
 {
     return(NetworkServiceAccount.LoadIdTokenCache(ref pOutActualSize, buffer, buffer.Length, handle));
 }
Esempio n. 6
0
 public static extern void CloseUser(UserHandle handle);
Esempio n. 7
0
 public static extern Result GetUserId(ref Uid pOut, UserHandle handle);
Esempio n. 8
0
 public static extern void CloseUser(UserHandle handle);                                                              // 0x00A0FDC0-0x00A0FDF0
 public static extern Result GetUserId(ref Uid pOut, UserHandle handle);                                              // 0x00A0FDF0-0x00A0FE30
Esempio n. 9
0
 public static extern bool TryOpenPreselectedUser(ref UserHandle pOutHandle);
Esempio n. 10
0
 public static extern Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle);                                  // 0x00A10430-0x00A10470
 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle) => default;                       // 0x00A10470-0x00A104B0
Esempio n. 11
0
 public static extern Result EnsurIdTokenCacheAsync(IntPtr pOutContext, UserHandle handle);                                 // 0x00A104B0-0x00A104F0
 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle) => default;              // 0x00A104F0-0x00A10550
Esempio n. 12
0
 public static Result EnsureAvailable(UserHandle handle)
 {
     return(new Result());
 }
Esempio n. 13
0
 public static extern Result EnsureAvailable(UserHandle handle);                                                            // 0x00A103B0-0x00A103F0
 public static extern Result IsAvailable(ref bool pOut, UserHandle handle);                                                 // 0x00A103F0-0x00A10430
Esempio n. 14
0
 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle)
 {
     return(NetworkServiceAccount.EnsurIdTokenCacheAsync(pOutContext._context, handle));
 }
Esempio n. 15
0
 public static Result IsAvailable(ref bool pOut, UserHandle handle)
 {
     pOut = false;
     return(new Result());
 }
Esempio n. 16
0
 public static extern Result IsAvailable([MarshalAs(UnmanagedType.U1)] ref bool pOut, UserHandle handle);
Esempio n. 17
0
 public static extern Result EnsureAvailable(UserHandle handle);
Esempio n. 18
0
 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle)
 {
     pOutActualSize = 0;
     return(new Result());
 }
Esempio n. 19
0
 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle)
 {
     return(new Result());
 }
Esempio n. 20
0
 public static Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle)
 {
     return(new Result());
 }
Esempio n. 21
0
 public static Result OpenUser(ref UserHandle pOutHandle, Uid user)
 {
     return(new Result());
 }
Esempio n. 22
0
 public static bool TryOpenPreselectedUser(ref UserHandle pOutHandle)
 {
     return(true);
 }
Esempio n. 23
0
        }                                                          // 0x00A105C0-0x00A105D0

        // Methods
        public static extern Result EnsureAvailable(UserHandle handle);                                                            // 0x00A103B0-0x00A103F0
Esempio n. 24
0
 public static void CloseUser(UserHandle handle)
 {
 }
Esempio n. 25
0
 public static extern Result IsAvailable(ref bool pOut, UserHandle handle);                                                 // 0x00A103F0-0x00A10430
 public static extern Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle);                                  // 0x00A10430-0x00A10470
Esempio n. 26
0
 public static Result GetUserId(ref Uid pOut, UserHandle handle)
 {
     return(new Result());
 }
Esempio n. 27
0
 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle) => default;                       // 0x00A10470-0x00A104B0
 public static extern Result EnsurIdTokenCacheAsync(IntPtr pOutContext, UserHandle handle);                                 // 0x00A104B0-0x00A104F0
Esempio n. 28
0
 public static extern Result OpenUser(ref UserHandle pOutHandle, Uid user);
Esempio n. 29
0
 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle) => default;              // 0x00A104F0-0x00A10550
 private static extern Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, int bufferSize, UserHandle handle); // 0x00A10550-0x00A10590
Esempio n. 30
0
 public static extern Result ListQualifiedUsers(ref int pOutActualLength, Uid[] outUsers, int arrayLength);           // 0x00A0FD90-0x00A0FDC0
 public static extern void CloseUser(UserHandle handle);                                                              // 0x00A0FDC0-0x00A0FDF0