forked from Mirror/GodMode9
Disable Link Time Optimization
... this may solve build issues
This commit is contained in:
parent
26acfc4cff
commit
653de94395
2
Makefile
2
Makefile
@ -28,7 +28,7 @@ INCLUDES := common source source/common source/font source/filesys source/crypto
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -DARM9 -march=armv5te -mthumb -mthumb-interwork -flto
|
ARCH := -DARM9 -march=armv5te -mthumb -mthumb-interwork
|
||||||
|
|
||||||
ASFLAGS := $(ARCH) -g -x assembler-with-cpp $(INCLUDE)
|
ASFLAGS := $(ARCH) -g -x assembler-with-cpp $(INCLUDE)
|
||||||
CFLAGS := $(ARCH) -g -Wall -Wextra -Wpedantic -Wcast-align -Wno-main -O2 \
|
CFLAGS := $(ARCH) -g -Wall -Wextra -Wpedantic -Wcast-align -Wno-main -O2 \
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#define BOOTFIRM_TEMPS 0x1 // bits mark paths as temporary
|
#define BOOTFIRM_TEMPS 0x1 // bits mark paths as temporary
|
||||||
|
|
||||||
#ifdef SALTMODE // ShadowHand's own bootmenu key override
|
#ifdef SALTMODE // ShadowHand's own bootmenu key override
|
||||||
|
#undef BOOTMENU_KEY
|
||||||
#define BOOTMENU_KEY BUTTON_START
|
#define BOOTMENU_KEY BUTTON_START
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -387,12 +388,12 @@ u32 FileHexViewer(const char* path) {
|
|||||||
u8* bottom_cpy = TEMP_BUFFER + 0xC0000; // a copy of the bottom screen framebuffer
|
u8* bottom_cpy = TEMP_BUFFER + 0xC0000; // a copy of the bottom screen framebuffer
|
||||||
u32 fsize = FileGetSize(path);
|
u32 fsize = FileGetSize(path);
|
||||||
|
|
||||||
bool dual_screen;
|
bool dual_screen = 0;
|
||||||
int x_off, x_hex, x_ascii;
|
int x_off = 0, x_hex = 0, x_ascii = 0;
|
||||||
u32 vpad, hlpad, hrpad;
|
u32 vpad = 0, hlpad = 0, hrpad = 0;
|
||||||
u32 rows, cols;
|
u32 rows = 0, cols = 0;
|
||||||
u32 total_shown;
|
u32 total_shown = 0;
|
||||||
u32 total_data;
|
u32 total_data = 0;
|
||||||
|
|
||||||
u32 last_mode = 0xFF;
|
u32 last_mode = 0xFF;
|
||||||
u32 last_offset = (u32) -1;
|
u32 last_offset = (u32) -1;
|
||||||
@ -405,7 +406,7 @@ u32 FileHexViewer(const char* path) {
|
|||||||
bool edit_mode = false;
|
bool edit_mode = false;
|
||||||
u8* edit_buffer = TEMP_BUFFER;
|
u8* edit_buffer = TEMP_BUFFER;
|
||||||
u8* edit_buffer_cpy = TEMP_BUFFER + edit_bsize;
|
u8* edit_buffer_cpy = TEMP_BUFFER + edit_bsize;
|
||||||
u32 edit_start;
|
u32 edit_start = 0;
|
||||||
int cursor = 0;
|
int cursor = 0;
|
||||||
|
|
||||||
static bool show_instr = true;
|
static bool show_instr = true;
|
||||||
@ -1681,7 +1682,7 @@ u32 GodMode(bool is_b9s) {
|
|||||||
|
|
||||||
// get mode string for splash screen
|
// get mode string for splash screen
|
||||||
const char* disp_mode = NULL;
|
const char* disp_mode = NULL;
|
||||||
if (bootloader) disp_mode = "bootloader mode\nR+LEFT for menu";
|
if (bootloader) disp_mode = "bootloader mode\nR+LEFT for menu";
|
||||||
else if (!is_b9s && !IS_SIGHAX) disp_mode = "oldloader mode";
|
else if (!is_b9s && !IS_SIGHAX) disp_mode = "oldloader mode";
|
||||||
else if (!is_b9s && IS_SIGHAX && (boot_origin & BOOT_NTRBOOT)) disp_mode = "ntrboot mode";
|
else if (!is_b9s && IS_SIGHAX && (boot_origin & BOOT_NTRBOOT)) disp_mode = "ntrboot mode";
|
||||||
// else if (!is_b9s || !IS_SIGHAX) disp_mode = "unknown mode";
|
// else if (!is_b9s || !IS_SIGHAX) disp_mode = "unknown mode";
|
||||||
|
@ -425,7 +425,7 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) {
|
|||||||
static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask mask, uint8_t qrcode[]) {
|
static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask mask, uint8_t qrcode[]) {
|
||||||
// Calculate error correction code and pack bits
|
// Calculate error correction code and pack bits
|
||||||
assert(0 <= (int)mask && (int)mask <= 7);
|
assert(0 <= (int)mask && (int)mask <= 7);
|
||||||
int data;
|
int data = 0;
|
||||||
switch (ecl) {
|
switch (ecl) {
|
||||||
case qrcodegen_Ecc_LOW : data = 1; break;
|
case qrcodegen_Ecc_LOW : data = 1; break;
|
||||||
case qrcodegen_Ecc_MEDIUM : data = 0; break;
|
case qrcodegen_Ecc_MEDIUM : data = 0; break;
|
||||||
@ -530,7 +530,7 @@ static void applyMask(const uint8_t functionModules[], uint8_t qrcode[], enum qr
|
|||||||
for (int x = 0; x < qrsize; x++) {
|
for (int x = 0; x < qrsize; x++) {
|
||||||
if (getModule(functionModules, x, y))
|
if (getModule(functionModules, x, y))
|
||||||
continue;
|
continue;
|
||||||
bool invert;
|
bool invert = false;
|
||||||
switch ((int)mask) {
|
switch ((int)mask) {
|
||||||
case 0: invert = (x + y) % 2 == 0; break;
|
case 0: invert = (x + y) % 2 == 0; break;
|
||||||
case 1: invert = y % 2 == 0; break;
|
case 1: invert = y % 2 == 0; break;
|
||||||
@ -920,7 +920,7 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz
|
|||||||
int bitLen = 0;
|
int bitLen = 0;
|
||||||
for (size_t i = 0; i < len; i++) {
|
for (size_t i = 0; i < len; i++) {
|
||||||
const struct qrcodegen_Segment *seg = &segs[i];
|
const struct qrcodegen_Segment *seg = &segs[i];
|
||||||
unsigned int modeBits;
|
unsigned int modeBits = 0;
|
||||||
switch (seg->mode) {
|
switch (seg->mode) {
|
||||||
case qrcodegen_Mode_NUMERIC : modeBits = 0x1; break;
|
case qrcodegen_Mode_NUMERIC : modeBits = 0x1; break;
|
||||||
case qrcodegen_Mode_ALPHANUMERIC: modeBits = 0x2; break;
|
case qrcodegen_Mode_ALPHANUMERIC: modeBits = 0x2; break;
|
||||||
@ -1007,7 +1007,7 @@ testable int getTotalBits(const struct qrcodegen_Segment segs[], size_t len, int
|
|||||||
// given mode at the given version number. The result is in the range [0, 16].
|
// given mode at the given version number. The result is in the range [0, 16].
|
||||||
static int numCharCountBits(enum qrcodegen_Mode mode, int version) {
|
static int numCharCountBits(enum qrcodegen_Mode mode, int version) {
|
||||||
assert(qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX);
|
assert(qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX);
|
||||||
int i;
|
int i = 0;
|
||||||
if ( 1 <= version && version <= 9) i = 0;
|
if ( 1 <= version && version <= 9) i = 0;
|
||||||
else if (10 <= version && version <= 26) i = 1;
|
else if (10 <= version && version <= 26) i = 1;
|
||||||
else if (27 <= version && version <= 40) i = 2;
|
else if (27 <= version && version <= 40) i = 2;
|
||||||
|
@ -844,7 +844,7 @@ void MemTextView(const char* text, u32 len, char* line0, int off_disp, int lno,
|
|||||||
bool ar = !ww && ((int) llen > off_disp + TV_LLEN_DISP);
|
bool ar = !ww && ((int) llen > off_disp + TV_LLEN_DISP);
|
||||||
|
|
||||||
// set text color / find start of comment of scripts
|
// set text color / find start of comment of scripts
|
||||||
u32 color_text = (nln == mno) ? script_color_active : (is_script) ? script_color_code : COLOR_TVTEXT;
|
u32 color_text = (nln == mno) ? script_color_active : (is_script) ? script_color_code : (u32) COLOR_TVTEXT;
|
||||||
int cmt_start = TV_LLEN_DISP; // start of comment in current displayed line (may be negative)
|
int cmt_start = TV_LLEN_DISP; // start of comment in current displayed line (may be negative)
|
||||||
if (is_script && (nln != mno)) {
|
if (is_script && (nln != mno)) {
|
||||||
char* hash = line_seek(text, len, 0, ptr, 0);
|
char* hash = line_seek(text, len, 0, ptr, 0);
|
||||||
|
@ -909,7 +909,7 @@ bool ReadVGameDirNitro(VirtualFile* vfile, VirtualDir* vdir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ReadVGameDir(VirtualFile* vfile, VirtualDir* vdir) {
|
bool ReadVGameDir(VirtualFile* vfile, VirtualDir* vdir) {
|
||||||
VirtualFile* templates;
|
VirtualFile* templates = NULL;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
if (vdir->flags & VFLAG_FIRM) {
|
if (vdir->flags & VFLAG_FIRM) {
|
||||||
|
@ -63,7 +63,7 @@ bool ReadVNandDir(VirtualFile* vfile, VirtualDir* vdir) { // uses a generic vdir
|
|||||||
prt_info.keyslot = 0xFF;
|
prt_info.keyslot = 0xFF;
|
||||||
} else if (GetNandPartitionInfo(&prt_info, template->type, template->subtype, template->index, nand_src) != 0)
|
} else if (GetNandPartitionInfo(&prt_info, template->type, template->subtype, template->index, nand_src) != 0)
|
||||||
continue;
|
continue;
|
||||||
snprintf(vfile->name, 32, "%s%s", template->name, (nand_src == VRT_XORPAD) ? ".xorpad" : "");
|
snprintf(vfile->name, 32, "%.24s%s", template->name, (nand_src == VRT_XORPAD) ? ".xorpad" : "");
|
||||||
vfile->offset = ((u64) prt_info.sector) * 0x200;
|
vfile->offset = ((u64) prt_info.sector) * 0x200;
|
||||||
vfile->size = ((u64) prt_info.count) * 0x200;
|
vfile->size = ((u64) prt_info.count) * 0x200;
|
||||||
vfile->keyslot = prt_info.keyslot;
|
vfile->keyslot = prt_info.keyslot;
|
||||||
|
@ -52,7 +52,7 @@ u32 AddTickDbInfo(TickDbInfo* info, Ticket* ticket, u32 offset) {
|
|||||||
for (; t < info->n_entries; t++) {
|
for (; t < info->n_entries; t++) {
|
||||||
TickDbEntry* entry0 = info->entries + t;
|
TickDbEntry* entry0 = info->entries + t;
|
||||||
if (memcmp(entry->title_id, entry0->title_id, 8) != 0) continue;
|
if (memcmp(entry->title_id, entry0->title_id, 8) != 0) continue;
|
||||||
if (!getbe64(entry0->console_id)) // replace this
|
if (!getbe32(entry0->console_id)) // replace this
|
||||||
memcpy(entry0, entry, sizeof(TickDbEntry));
|
memcpy(entry0, entry, sizeof(TickDbEntry));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user