diff --git a/common/common.h b/common/common.h index eb63c10..c352823 100644 --- a/common/common.h +++ b/common/common.h @@ -43,7 +43,6 @@ typedef union { } color_t; #include "font.h" -#include "nacp.h" #include "menu.h" #include "text.h" #include "ui.h" @@ -52,9 +51,10 @@ typedef union { #include "math.h" #include "theme.h" -// when building for pc we need to include nro.h separately +// when building for pc we need to include these separately #ifndef __SWITCH__ #include "switch/nro.h" +#include "switch/nacp.h" #endif void menuStartup(); @@ -149,4 +149,4 @@ static inline color_t FetchPixelColor(uint32_t x, uint32_t y) void DrawPixel(uint32_t x, uint32_t y, color_t clr); void DrawText(const ffnt_header_t* font, uint32_t x, uint32_t y, color_t clr, const char* text); void DrawTextTruncate(const ffnt_header_t* font, uint32_t x, uint32_t y, color_t clr, const char* text, uint32_t max_width, const char* end_text); -void GetTextDimensions(const ffnt_header_t* font, const char* text, uint32_t* width_out, uint32_t* height_out); \ No newline at end of file +void GetTextDimensions(const ffnt_header_t* font, const char* text, uint32_t* width_out, uint32_t* height_out); diff --git a/common/nacp.h b/common/nacp.h deleted file mode 100644 index 82ad865..0000000 --- a/common/nacp.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -typedef struct { - char name[0x200]; - char author[0x100]; -} NacpLanguageEntry; - -typedef struct { - NacpLanguageEntry lang[12]; - NacpLanguageEntry lang_unk[4];//? - - u8 x3000_unk[0x24];////Normally all-zero? - u32 x3024_unk; - u32 x3028_unk; - u32 x302C_unk; - u32 x3030_unk; - u32 x3034_unk; - u64 titleid0; - - u8 x3040_unk[0x20]; - char version[0x10]; - - u64 titleid_dlcbase; - u64 titleid1; - - u32 x3080_unk; - u32 x3084_unk; - u32 x3088_unk; - u8 x308C_unk[0x24];//zeros? - - u64 titleid2; - u64 titleids[7];//"Array of application titleIDs, normally the same as the above app-titleIDs. Only set for game-updates?" - - u32 x30F0_unk; - u32 x30F4_unk; - - u64 titleid3;//"Application titleID. Only set for game-updates?" - - char bcat_passphrase[0x40]; - u8 x3140_unk[0xEC0];//Normally all-zero? -} NacpStruct; diff --git a/common/netloader.c b/common/netloader.c index 42a2cd4..0402843 100644 --- a/common/netloader.c +++ b/common/netloader.c @@ -54,6 +54,7 @@ static void netloader_error(const char *func, int err) { //--------------------------------------------------------------------------------- char errortext[1024]; + memset(errortext, 0, sizeof(errortext)); snprintf(errortext, sizeof(errortext)-1, "%s: err=%d\n %s\n", func, err, strerror(errno)); menuCreateMsgBox(780,300, errortext);