mirror of
https://github.com/Nightkingale/Wii-U-Account-Swap.git
synced 2026-04-26 00:10:36 -05:00
Change all instances of switch to swap
This commit is contained in:
parent
b530208909
commit
b377f6e6fe
4
.github/README.md
vendored
4
.github/README.md
vendored
|
|
@ -17,10 +17,10 @@ A Wii U homebrew file will be bundled with each release. It should be placed on
|
|||
## Usage
|
||||
If the program is placed correctly on an SD card, Wii U Account Swap will appear on the Wii U Menu alongside any other homebrew applications. It can then be launched just as anything else.
|
||||
* If Wii U Account Swap doesn't show up on the Wii U Menu, confirm you placed the WUHB file on your SD card correctly and restart your console.
|
||||
* `Switch to Nintendo Network ID`: Restores the file located at `SD:/wiiu/accounts/[PERSISTENT_ID]/nnid_account.dat`.
|
||||
* `Swap to Nintendo Network ID`: Restores the file located at `SD:/wiiu/accounts/[PERSISTENT_ID]/nnid_account.dat`.
|
||||
* If you use the [Inkay](https://github.com/PretendoNetwork/Inkay) plugin for the Aroma environment and its configuration is detected (the plugin icon next to your Mii name will have a check), then your configuration will be rewritten automatically to disable Pretendo Network, allowing you to connect to the Nintendo Network.
|
||||
* If a backup does not exist, yet you still try and restore one, you will be prompted with an error requesting you make one.
|
||||
* `Switch to Pretendo Network ID`: Restores the file located at `SD:/wiiu/accounts/[PERSISTENT_ID]/pnid_account.dat`.
|
||||
* `Swap to Pretendo Network ID`: Restores the file located at `SD:/wiiu/accounts/[PERSISTENT_ID]/pnid_account.dat`.
|
||||
* If you use the [Inkay](https://github.com/PretendoNetwork/Inkay) plugin for the Aroma environment and its configuration is detected (the plugin icon next to your Mii name will have a check), then your configuration will be rewritten automatically to enable Pretendo Network.
|
||||
* If a backup does not exist, yet you still try and restore one, you will be prompted with an error requesting you make one.
|
||||
* `Backup the account.dat File`: Saves the user's current `account.dat` file to the SD card.
|
||||
|
|
|
|||
8
include/swap.hpp
Normal file
8
include/swap.hpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef SWAP_HPP
|
||||
#define SWAP_HPP
|
||||
|
||||
|
||||
bool swap_account(const char* backup_file, const char* account_type);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef SWITCH_HPP
|
||||
#define SWITCH_HPP
|
||||
|
||||
|
||||
bool switch_account(const char* backup_file, const char* account_type);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include "input.hpp"
|
||||
#include "main.hpp"
|
||||
#include "screens.hpp"
|
||||
#include "switch.hpp"
|
||||
#include "swap.hpp"
|
||||
#include "unlink.hpp"
|
||||
|
||||
|
||||
|
|
@ -186,14 +186,14 @@ main()
|
|||
} else if (button & VPAD_BUTTON_A) {
|
||||
switch (selected_option) {
|
||||
case 0:
|
||||
if (switch_account(NNID_BACKUP.c_str(), "Nintendo Network ID")) {
|
||||
if (swap_account(NNID_BACKUP.c_str(), "Nintendo Network ID")) {
|
||||
deinitialize();
|
||||
OSForceFullRelaunch();
|
||||
SYSLaunchMenu();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (switch_account(PNID_BACKUP.c_str(), "Pretendo Network ID")) {
|
||||
if (swap_account(PNID_BACKUP.c_str(), "Pretendo Network ID")) {
|
||||
deinitialize();
|
||||
OSForceFullRelaunch();
|
||||
SYSLaunchMenu();
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ draw_menu_screen(int selected_menu_item)
|
|||
draw_screen_bars(); // This gives us the top and bottom bars.
|
||||
|
||||
const char* menu_options[] = {
|
||||
"Switch to Nintendo Network ID",
|
||||
"Switch to Pretendo Network ID",
|
||||
"Swap to Nintendo Network ID",
|
||||
"Swap to Pretendo Network ID",
|
||||
"Backup the account.dat File",
|
||||
"Unlink the account.dat File"
|
||||
}; // Menu options.
|
||||
|
|
@ -40,10 +40,10 @@ draw_menu_screen(int selected_menu_item)
|
|||
draw_text(menu_options[item], 160, 120 + item * 120, 50);
|
||||
|
||||
if (item == 0) {
|
||||
// This is the Switch to Nintendo Network ID option.
|
||||
// This is the Swap to Nintendo Network ID option.
|
||||
draw_icon(menu_icons[item], 64, 125 + item * 120, 50, {255, 150, 0, 255}); // Orange icon.
|
||||
} else if (item == 1) {
|
||||
// This is the Switch to Pretendo Network ID option.
|
||||
// This is the Swap to Pretendo Network ID option.
|
||||
draw_icon(menu_icons[item], 64, 125 + item * 120, 50, {255, 50, 255, 255}); // Purple icon.
|
||||
} else {
|
||||
// Any other option will draw the icon in white.
|
||||
|
|
@ -62,10 +62,10 @@ draw_menu_screen(int selected_menu_item)
|
|||
draw_text(menu_options[item], 160, 120 + item * 120, 50);
|
||||
|
||||
if (item == 0) {
|
||||
// This is the Switch to Nintendo Network ID option.
|
||||
// This is the Swap to Nintendo Network ID option.
|
||||
draw_icon(menu_icons[item], 64, 125 + item * 120, 50, {255, 150, 0, 255}); // Orange icon.
|
||||
} else if (item == 1) {
|
||||
// This is the Switch to Pretendo Network ID option.
|
||||
// This is the Swap to Pretendo Network ID option.
|
||||
draw_icon(menu_icons[item], 64, 125 + item * 120, 50, {255, 50, 255, 255}); // Purple icon.
|
||||
} else {
|
||||
// Any other option will draw the icon in white.
|
||||
|
|
@ -173,8 +173,8 @@ draw_success_menu(const char* type, bool inkay_configured = false)
|
|||
draw_text("The account.dat was unlinked successfully!", 64, 230, 50);
|
||||
draw_text("Your console will restart in 5 seconds...", 64, 290, 50);
|
||||
|
||||
} else if (strcmp(type, "switch") == 0) {
|
||||
// switch.cpp will call this function with "switch" as the type.
|
||||
} else if (strcmp(type, "swap") == 0) {
|
||||
// swap.cpp will call this function with "swap" as the type.
|
||||
draw_text("The account.dat was restored successfully!", 64, 230, 50);
|
||||
draw_text("Your console will restart in 5 seconds...", 64, 290, 50);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ handle_cleanup(FILE* backup, const char* account_type, char* buffer, bool is_err
|
|||
|
||||
|
||||
bool
|
||||
switch_account(const char* backup_file, const char* account_type)
|
||||
swap_account(const char* backup_file, const char* account_type)
|
||||
{
|
||||
// Disable the HOME Button temporarily.
|
||||
OSEnableHomeButtonMenu(0);
|
||||
|
||||
// Open the account.dat file and switch it to the specified account.
|
||||
// Open the account.dat file and swap it to the specified account.
|
||||
FILE *backup = fopen(backup_file, "rb");
|
||||
if (backup == NULL) {
|
||||
draw_error_menu("Error opening backup account.dat file!");
|
||||
|
|
@ -88,7 +88,7 @@ switch_account(const char* backup_file, const char* account_type)
|
|||
inkay = NULL;
|
||||
inkay_configured = true;
|
||||
}
|
||||
draw_success_menu("switch", inkay_configured);
|
||||
draw_success_menu("swap", inkay_configured);
|
||||
|
||||
// Clean-up and exit.
|
||||
handle_cleanup(backup, account_type, buffer, false);
|
||||
Loading…
Reference in New Issue
Block a user