Ejemplo 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;
    }
Ejemplo 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();
        }
    }
Ejemplo 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();
    }
Ejemplo 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();
    }
Ejemplo n.º 5
0
 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle)
 {
     return(NetworkServiceAccount.LoadIdTokenCache(ref pOutActualSize, buffer, buffer.Length, handle));
 }
Ejemplo n.º 6
0
 public static extern void CloseUser(UserHandle handle);
Ejemplo n.º 7
0
 public static extern Result GetUserId(ref Uid pOut, UserHandle handle);
Ejemplo n.º 8
0
 public static extern void CloseUser(UserHandle handle);                                                              // 0x00A0FDC0-0x00A0FDF0
 public static extern Result GetUserId(ref Uid pOut, UserHandle handle);                                              // 0x00A0FDF0-0x00A0FE30
Ejemplo n.º 9
0
 public static extern bool TryOpenPreselectedUser(ref UserHandle pOutHandle);
Ejemplo 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
Ejemplo 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
Ejemplo n.º 12
0
 public static Result EnsureAvailable(UserHandle handle)
 {
     return(new Result());
 }
Ejemplo n.º 13
0
 public static extern Result EnsureAvailable(UserHandle handle);                                                            // 0x00A103B0-0x00A103F0
 public static extern Result IsAvailable(ref bool pOut, UserHandle handle);                                                 // 0x00A103F0-0x00A10430
Ejemplo n.º 14
0
 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle)
 {
     return(NetworkServiceAccount.EnsurIdTokenCacheAsync(pOutContext._context, handle));
 }
Ejemplo n.º 15
0
 public static Result IsAvailable(ref bool pOut, UserHandle handle)
 {
     pOut = false;
     return(new Result());
 }
Ejemplo n.º 16
0
 public static extern Result IsAvailable([MarshalAs(UnmanagedType.U1)] ref bool pOut, UserHandle handle);
Ejemplo n.º 17
0
 public static extern Result EnsureAvailable(UserHandle handle);
Ejemplo n.º 18
0
 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle)
 {
     pOutActualSize = 0;
     return(new Result());
 }
Ejemplo n.º 19
0
 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle)
 {
     return(new Result());
 }
Ejemplo n.º 20
0
 public static Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle)
 {
     return(new Result());
 }
Ejemplo n.º 21
0
 public static Result OpenUser(ref UserHandle pOutHandle, Uid user)
 {
     return(new Result());
 }
Ejemplo n.º 22
0
 public static bool TryOpenPreselectedUser(ref UserHandle pOutHandle)
 {
     return(true);
 }
Ejemplo n.º 23
0
        }                                                          // 0x00A105C0-0x00A105D0

        // Methods
        public static extern Result EnsureAvailable(UserHandle handle);                                                            // 0x00A103B0-0x00A103F0
Ejemplo n.º 24
0
 public static void CloseUser(UserHandle handle)
 {
 }
Ejemplo 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
Ejemplo n.º 26
0
 public static Result GetUserId(ref Uid pOut, UserHandle handle)
 {
     return(new Result());
 }
Ejemplo 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
Ejemplo n.º 28
0
 public static extern Result OpenUser(ref UserHandle pOutHandle, Uid user);
Ejemplo 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
Ejemplo 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