mirror of
https://github.com/Lorenzooone/cc3dsfs.git
synced 2026-08-12 03:45:50 -05:00
Add IS Nitro Capture support
Some checks failed
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:-A ARM64 name:Windows VS2022 ARM os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:-A Win32 name:Windows VS2022 Win32 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:-A x64 name:Windows VS2022 x64 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[name:macOS Apple Silicon os:macos-14]) (push) Has been cancelled
CD / Create Pi Mono Setup (push) Has been cancelled
CD / Publishing (push) Has been cancelled
Some checks failed
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:-A ARM64 name:Windows VS2022 ARM os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:-A Win32 name:Windows VS2022 Win32 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:-A x64 name:Windows VS2022 x64 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[name:macOS Apple Silicon os:macos-14]) (push) Has been cancelled
CD / Create Pi Mono Setup (push) Has been cancelled
CD / Publishing (push) Has been cancelled
This commit is contained in:
@@ -40,27 +40,59 @@ bool is_big_endian(void) {
|
||||
return _is_be;
|
||||
}
|
||||
|
||||
static uint32_t reverse_endianness(uint32_t value) {
|
||||
return ((value & 0xFF) << 24) | ((value & 0xFF00) << 8) | ((value & 0xFF0000) >> 8) | ((value & 0xFF000000) >> 24);
|
||||
}
|
||||
|
||||
static uint16_t reverse_endianness(uint16_t value) {
|
||||
return ((value & 0xFF) << 8) | ((value & 0xFF00) >> 8);
|
||||
}
|
||||
|
||||
uint32_t to_le(uint32_t value) {
|
||||
if(is_big_endian())
|
||||
value = ((value & 0xFF) << 24) | ((value & 0xFF00) << 8) | ((value & 0xFF0000) >> 8) | ((value & 0xFF000000) >> 24);
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint32_t to_be(uint32_t value) {
|
||||
if(!is_big_endian())
|
||||
value = ((value & 0xFF) << 24) | ((value & 0xFF00) << 8) | ((value & 0xFF0000) >> 8) | ((value & 0xFF000000) >> 24);
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint16_t to_le(uint16_t value) {
|
||||
if(is_big_endian())
|
||||
value = ((value & 0xFF) << 8) | ((value & 0xFF00) >> 8);
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint16_t to_be(uint16_t value) {
|
||||
if(!is_big_endian())
|
||||
value = ((value & 0xFF) << 8) | ((value & 0xFF00) >> 8);
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint32_t from_le(uint32_t value) {
|
||||
if(is_big_endian())
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint32_t from_be(uint32_t value) {
|
||||
if(!is_big_endian())
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint16_t from_le(uint16_t value) {
|
||||
if(is_big_endian())
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
uint16_t from_be(uint16_t value) {
|
||||
if(!is_big_endian())
|
||||
value = reverse_endianness(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user