Fix wrong bootconfig being picked up by 3ds_injector, cleanup

This commit is contained in:
Aurora
2016-08-26 18:44:39 +02:00
parent 7331a919e4
commit 60c4956290
9 changed files with 69 additions and 85 deletions

View File

@@ -2,4 +2,23 @@
#include <3ds/types.h>
#define PATH_MAX 255
#define CONFIG(a) (((info.config >> (a + 16)) & 1) != 0)
#define MULTICONFIG(a) ((info.config >> (a * 2 + 6)) & 3)
#define BOOTCONFIG(a, b) ((info.config >> a) & b)
typedef struct __attribute__((packed))
{
char magic[4];
u8 versionMajor;
u8 versionMinor;
u8 versionBuild;
u8 flags; /* bit 0: dev branch; bit 1: is release */
u32 commitHash;
u32 config;
} CFWInfo;
void patchCode(u64 progId, u8 *code, u32 size);