mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 07:05:40 +12:00
Add -Wno-interference-size flag for GNUC
This commit is contained in:
parent
a6e3d41628
commit
9bd711958b
3 changed files with 7 additions and 6 deletions
|
@ -28,6 +28,10 @@ if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-security")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-security")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-interference-size")
|
||||||
|
endif()
|
||||||
|
|
||||||
option(DISABLE_PANIC_DEV "Make a build with fewer and less intrusive asserts" ON)
|
option(DISABLE_PANIC_DEV "Make a build with fewer and less intrusive asserts" ON)
|
||||||
option(GPU_DEBUG_INFO "Enable additional GPU debugging info" OFF)
|
option(GPU_DEBUG_INFO "Enable additional GPU debugging info" OFF)
|
||||||
option(ENABLE_OPENGL "Enable OpenGL rendering backend" ON)
|
option(ENABLE_OPENGL "Enable OpenGL rendering backend" ON)
|
||||||
|
|
|
@ -50,6 +50,7 @@ struct NCCH {
|
||||||
|
|
||||||
static constexpr u64 mediaUnit = 0x200;
|
static constexpr u64 mediaUnit = 0x200;
|
||||||
u64 size = 0; // Size of NCCH converted to bytes
|
u64 size = 0; // Size of NCCH converted to bytes
|
||||||
|
u64 saveDataSize = 0;
|
||||||
u32 stackSize = 0;
|
u32 stackSize = 0;
|
||||||
u32 bssSize = 0;
|
u32 bssSize = 0;
|
||||||
u32 exheaderSize = 0;
|
u32 exheaderSize = 0;
|
||||||
|
@ -64,8 +65,6 @@ struct NCCH {
|
||||||
|
|
||||||
// Contents of the .code file in the ExeFS
|
// Contents of the .code file in the ExeFS
|
||||||
std::vector<u8> codeFile;
|
std::vector<u8> codeFile;
|
||||||
// Contains of the cart's save data
|
|
||||||
std::vector<u8> saveData;
|
|
||||||
// The cart region. Only the CXI's region matters to us. Necessary to get past region locking
|
// The cart region. Only the CXI's region matters to us. Necessary to get past region locking
|
||||||
std::optional<Regions> region = std::nullopt;
|
std::optional<Regions> region = std::nullopt;
|
||||||
std::vector<u8> smdh;
|
std::vector<u8> smdh;
|
||||||
|
@ -78,7 +77,7 @@ struct NCCH {
|
||||||
bool hasExeFS() { return exeFS.size != 0; }
|
bool hasExeFS() { return exeFS.size != 0; }
|
||||||
bool hasRomFS() { return romFS.size != 0; }
|
bool hasRomFS() { return romFS.size != 0; }
|
||||||
bool hasCode() { return codeFile.size() != 0; }
|
bool hasCode() { return codeFile.size() != 0; }
|
||||||
bool hasSaveData() { return saveData.size() != 0; }
|
bool hasSaveData() { return saveDataSize != 0; }
|
||||||
|
|
||||||
// Parse SMDH for region info and such. Returns false on failure, true on success
|
// Parse SMDH for region info and such. Returns false on failure, true on success
|
||||||
bool parseSMDH(const std::vector<u8> &smdh);
|
bool parseSMDH(const std::vector<u8> &smdh);
|
||||||
|
|
|
@ -25,7 +25,6 @@ bool NCCH::loadFromHeader(Crypto::AESEngine &aesEngine, IOFile& file, const FSIn
|
||||||
}
|
}
|
||||||
|
|
||||||
codeFile.clear();
|
codeFile.clear();
|
||||||
saveData.clear();
|
|
||||||
smdh.clear();
|
smdh.clear();
|
||||||
partitionInfo = info;
|
partitionInfo = info;
|
||||||
|
|
||||||
|
@ -155,8 +154,7 @@ bool NCCH::loadFromHeader(Crypto::AESEngine &aesEngine, IOFile& file, const FSIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const u64 saveDataSize = *(u64*)&exheader[0x1C0 + 0x0]; // Size of save data in bytes
|
saveDataSize = *(u64*)&exheader[0x1C0 + 0x0]; // Size of save data in bytes
|
||||||
saveData.resize(saveDataSize, 0xff);
|
|
||||||
|
|
||||||
compressCode = (exheader[0xD] & 1) != 0;
|
compressCode = (exheader[0xD] & 1) != 0;
|
||||||
stackSize = *(u32*)&exheader[0x1C];
|
stackSize = *(u32*)&exheader[0x1C];
|
||||||
|
|
Loading…
Add table
Reference in a new issue