mirror of
https://github.com/azahar-emu/ArticSetupTool
synced 2025-11-06 23:20:00 +01:00
Fix region changed consoles
This commit is contained in:
parent
1f37bab17b
commit
f42b38196d
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
|||||||
VERSION_MAJOR := 1
|
VERSION_MAJOR := 1
|
||||||
VERSION_MINOR := 0
|
VERSION_MINOR := 0
|
||||||
VERSION_REVISION := 2
|
VERSION_REVISION := 3
|
||||||
|
|
||||||
all:
|
all:
|
||||||
mkdir -p plugin/build
|
mkdir -p plugin/build
|
||||||
|
|||||||
@ -26,7 +26,7 @@ LIBRARIES := ctru
|
|||||||
|
|
||||||
VERSION_MAJOR := 1
|
VERSION_MAJOR := 1
|
||||||
VERSION_MINOR := 0
|
VERSION_MINOR := 0
|
||||||
VERSION_MICRO := 2
|
VERSION_MICRO := 3
|
||||||
|
|
||||||
BUILD_FLAGS := -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
BUILD_FLAGS := -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
||||||
BUILD_FLAGS_CC := -g -Wall -Wno-strict-aliasing -O3 -mword-relocations \
|
BUILD_FLAGS_CC := -g -Wall -Wno-strict-aliasing -O3 -mword-relocations \
|
||||||
|
|||||||
@ -16,7 +16,7 @@ SOURCES := ArticProtocol/sources sources sources/CTRPluginFramework
|
|||||||
|
|
||||||
VERSION_MAJOR := 1
|
VERSION_MAJOR := 1
|
||||||
VERSION_MINOR := 0
|
VERSION_MINOR := 0
|
||||||
VERSION_REVISION := 2
|
VERSION_REVISION := 3
|
||||||
SERVER_PORT := 5543
|
SERVER_PORT := 5543
|
||||||
|
|
||||||
IP := 19
|
IP := 19
|
||||||
|
|||||||
@ -15,7 +15,7 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern bool isControllerMode;
|
extern bool isControllerMode;
|
||||||
constexpr u32 INITIAL_SETUP_APP_VERSION = 1;
|
constexpr u32 INITIAL_SETUP_APP_VERSION = 2;
|
||||||
|
|
||||||
enum class HandleType {
|
enum class HandleType {
|
||||||
FILE,
|
FILE,
|
||||||
@ -619,12 +619,23 @@ namespace ArticFunctions {
|
|||||||
strcpy(file_name, files[type]);
|
strcpy(file_name, files[type]);
|
||||||
char* end = file_name + strlen(files[type]);
|
char* end = file_name + strlen(files[type]);
|
||||||
|
|
||||||
if (type == 0 || type == 1) {
|
if (type == 0) {
|
||||||
|
// Check for region changed file first
|
||||||
|
*end = 'C';
|
||||||
|
} else if (type == 1) {
|
||||||
*end = 'A';
|
*end = 'A';
|
||||||
}
|
}
|
||||||
|
|
||||||
FSPXI_File file;
|
FSPXI_File file;
|
||||||
res = FSPXI_OpenFile(fspxiHandle, &file, archive, fsMakePath(PATH_ASCII, file_name), FS_OPEN_READ, 0);
|
res = FSPXI_OpenFile(fspxiHandle, &file, archive, fsMakePath(PATH_ASCII, file_name), FS_OPEN_READ, 0);
|
||||||
|
if (type == 0) {
|
||||||
|
if (R_SUCCEEDED(res)) {
|
||||||
|
logger.Info("NOTE: This console is region changed,\n some functionality may not work properly.");
|
||||||
|
} else {
|
||||||
|
*end = 'A';
|
||||||
|
res = FSPXI_OpenFile(fspxiHandle, &file, archive, fsMakePath(PATH_ASCII, file_name), FS_OPEN_READ, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (R_FAILED(res)) {
|
if (R_FAILED(res)) {
|
||||||
*end = 'B';
|
*end = 'B';
|
||||||
res = FSPXI_OpenFile(fspxiHandle, &file, archive, fsMakePath(PATH_ASCII, file_name), FS_OPEN_READ, 0);
|
res = FSPXI_OpenFile(fspxiHandle, &file, archive, fsMakePath(PATH_ASCII, file_name), FS_OPEN_READ, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user