fix compile errors
This commit is contained in:
parent
a39053c3c3
commit
cc9977774e
@ -133,25 +133,25 @@ static void installMmuHooks(void)
|
|||||||
u32 *off;
|
u32 *off;
|
||||||
|
|
||||||
for(off = (u32 *)officialSVCs[0x1F]; *off != 0xE1CD60F0; ++off);
|
for(off = (u32 *)officialSVCs[0x1F]; *off != 0xE1CD60F0; ++off);
|
||||||
off = decodeARMBranch(off + 1);
|
off = decodeArmBranch(off + 1);
|
||||||
|
|
||||||
for (; *off != 0xE58D5000; ++off);
|
for (; *off != 0xE58D5000; ++off);
|
||||||
off = decodeARMBranch(off + 1);
|
off = decodeArmBranch(off + 1);
|
||||||
|
|
||||||
for (; *off != 0xE58DC000; ++off);
|
for (; *off != 0xE58DC000; ++off);
|
||||||
off = decodeARMBranch(off + 1);
|
off = decodeArmBranch(off + 1);
|
||||||
for (; *off != 0xE1A0000B; ++off);
|
for (; *off != 0xE1A0000B; ++off);
|
||||||
off = decodeARMBranch(off + 1);
|
off = decodeArmBranch(off + 1);
|
||||||
for (; *off != 0xE59D2030; ++off);
|
for (; *off != 0xE59D2030; ++off);
|
||||||
off = decodeARMBranch(off + 1);
|
off = decodeArmBranch(off + 1);
|
||||||
|
|
||||||
for (; *off != 0xE88D1100; ++off);
|
for (; *off != 0xE88D1100; ++off);
|
||||||
mapL2Section = (u32 *)PA_FROM_VA_PTR(decodeARMBranch(off + 1));
|
mapL2Section = (u32 *)PA_FROM_VA_PTR(decodeArmBranch(off + 1));
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
for (; *off != 0xE58D8000; ++off);
|
for (; *off != 0xE58D8000; ++off);
|
||||||
u32 *loc = (u32 *)PA_FROM_VA_PTR(decodeARMBranch(++off));
|
u32 *loc = (u32 *)PA_FROM_VA_PTR(decodeArmBranch(++off));
|
||||||
if (loc != mapL2Section)
|
if (loc != mapL2Section)
|
||||||
mapL1Section = loc;
|
mapL1Section = loc;
|
||||||
} while (mapL1Section == NULL);
|
} while (mapL1Section == NULL);
|
||||||
@ -172,10 +172,10 @@ static void findUsefulSymbols(void)
|
|||||||
// Patch ERRF__DumpException
|
// Patch ERRF__DumpException
|
||||||
for(off = (u32 *)0xFFFF0000; *off != 0xE1A04005; ++off);
|
for(off = (u32 *)0xFFFF0000; *off != 0xE1A04005; ++off);
|
||||||
++off;
|
++off;
|
||||||
*(u32 *)PA_FROM_VA_PTR(off) = makeARMBranch(off, off + 51, false);
|
*(u32 *)PA_FROM_VA_PTR(off) = makeArmBranch(off, off + 51, false);
|
||||||
|
|
||||||
for(; *off != 0xE2100102; ++off);
|
for(; *off != 0xE2100102; ++off);
|
||||||
KProcessHwInfo__QueryMemory = (Result (*)(KProcessHwInfo *, MemoryInfo *, PageInfo *, void *))decodeARMBranch(off - 1);
|
KProcessHwInfo__QueryMemory = (Result (*)(KProcessHwInfo *, MemoryInfo *, PageInfo *, void *))decodeArmBranch(off - 1);
|
||||||
|
|
||||||
for(; *off != 0xE1A0D002; off++);
|
for(; *off != 0xE1A0D002; off++);
|
||||||
off += 3;
|
off += 3;
|
||||||
@ -241,16 +241,16 @@ static void findUsefulSymbols(void)
|
|||||||
KProcessHwInfo__UnmapProcessMemory = (Result (*)(KProcessHwInfo *, void *, u32))decodeArmBranch(off - 1);
|
KProcessHwInfo__UnmapProcessMemory = (Result (*)(KProcessHwInfo *, void *, u32))decodeArmBranch(off - 1);
|
||||||
|
|
||||||
for (off = (u32 *)officialSVCs[0x70]; *off != 0xE8881200 && *off != 0xE8891900; ++off);
|
for (off = (u32 *)officialSVCs[0x70]; *off != 0xE8881200 && *off != 0xE8891900; ++off);
|
||||||
for (off = (u32 *)decodeARMBranch(off + 1); *off != 0xE2101102; ++off);
|
for (off = (u32 *)decodeArmBranch(off + 1); *off != 0xE2101102; ++off);
|
||||||
KProcessHwInfo__CheckVaState = (Result (*)(KProcessHwInfo *, u32, u32, u32, u32))decodeARMBranch(off - 1);
|
KProcessHwInfo__CheckVaState = (Result (*)(KProcessHwInfo *, u32, u32, u32, u32))decodeArmBranch(off - 1);
|
||||||
for (; *off != 0xE28D1008; ++off);
|
for (; *off != 0xE28D1008; ++off);
|
||||||
KProcessHwInfo__GetListOfKBlockInfoForVA = (Result (*)(KProcessHwInfo*, KLinkedList*, u32, u32))decodeARMBranch(off + 1);
|
KProcessHwInfo__GetListOfKBlockInfoForVA = (Result (*)(KProcessHwInfo*, KLinkedList*, u32, u32))decodeArmBranch(off + 1);
|
||||||
|
|
||||||
for (; *off != 0xE2000102; ++off);
|
for (; *off != 0xE2000102; ++off);
|
||||||
KProcessHwInfo__MapListOfKBlockInfo = (Result (*)(KProcessHwInfo*, u32, KLinkedList*, u32, u32, u32))decodeARMBranch(off - 1);
|
KProcessHwInfo__MapListOfKBlockInfo = (Result (*)(KProcessHwInfo*, u32, KLinkedList*, u32, u32, u32))decodeArmBranch(off - 1);
|
||||||
|
|
||||||
for (; *off != 0xE8BD8FF0; ++off);
|
for (; *off != 0xE8BD8FF0; ++off);
|
||||||
KLinkedList_KBlockInfo__Clear = (void (*)(KLinkedList *))decodeARMBranch(off - 6);
|
KLinkedList_KBlockInfo__Clear = (void (*)(KLinkedList *))decodeArmBranch(off - 6);
|
||||||
|
|
||||||
for(off = (u32 *)officialSVCs[0x7C]; *off != 0x03530000; off++);
|
for(off = (u32 *)officialSVCs[0x7C]; *off != 0x03530000; off++);
|
||||||
KObjectMutex__WaitAndAcquire = (void (*)(KObjectMutex *))decodeArmBranch(++off);
|
KObjectMutex__WaitAndAcquire = (void (*)(KObjectMutex *))decodeArmBranch(++off);
|
||||||
@ -297,7 +297,7 @@ static void findUsefulSymbols(void)
|
|||||||
ControlMemory = (Result (*)(u32 *, u32, u32, u32, MemOp, MemPerm, bool))
|
ControlMemory = (Result (*)(u32 *, u32, u32, u32, MemOp, MemPerm, bool))
|
||||||
decodeArmBranch((u32 *)officialSVCs[0x01] + 5);
|
decodeArmBranch((u32 *)officialSVCs[0x01] + 5);
|
||||||
SleepThread = (void (*)(s64))officialSVCs[0x0A];
|
SleepThread = (void (*)(s64))officialSVCs[0x0A];
|
||||||
CreateEvent = (Result (*)(Handle *, ResetType))decodeARMBranch((u32 *)officialSVCs[0x17] + 3);
|
CreateEvent = (Result (*)(Handle *, ResetType))decodeArmBranch((u32 *)officialSVCs[0x17] + 3);
|
||||||
CloseHandle = (Result (*)(Handle))officialSVCs[0x23];
|
CloseHandle = (Result (*)(Handle))officialSVCs[0x23];
|
||||||
GetHandleInfo = (Result (*)(s64 *, Handle, u32))decodeArmBranch((u32 *)officialSVCs[0x29] + 3);
|
GetHandleInfo = (Result (*)(s64 *, Handle, u32))decodeArmBranch((u32 *)officialSVCs[0x29] + 3);
|
||||||
GetSystemInfo = (Result (*)(s64 *, s32, s32))decodeArmBranch((u32 *)officialSVCs[0x2A] + 3);
|
GetSystemInfo = (Result (*)(s64 *, s32, s32))decodeArmBranch((u32 *)officialSVCs[0x2A] + 3);
|
||||||
|
@ -74,9 +74,6 @@ extern u32 menuCombo;
|
|||||||
u32 waitInputWithTimeout(u32 msec);
|
u32 waitInputWithTimeout(u32 msec);
|
||||||
u32 waitInput(void);
|
u32 waitInput(void);
|
||||||
|
|
||||||
u32 waitComboWithTimeout(u32 msec);
|
|
||||||
u32 waitCombo(void);
|
|
||||||
|
|
||||||
bool menuCheckN3ds(void);
|
bool menuCheckN3ds(void);
|
||||||
u32 menuCountItems(const Menu *menu);
|
u32 menuCountItems(const Menu *menu);
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ void Draw_CreateBitmapHeader(u8 *dst, u32 width, u32 heigth)
|
|||||||
Draw_WriteUnaligned(dst + 0x22, 3 * width * heigth, 4);
|
Draw_WriteUnaligned(dst + 0x22, 3 * width * heigth, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void Draw_ConvertPixelToBGR8(u8 *dst, const u8 *src, GSPGPU_FramebufferFormat srcFormat)
|
static inline void Draw_ConvertPixelToBGR8(u8 *dst, const u8 *src, GSPGPU_FramebufferFormats srcFormat)
|
||||||
{
|
{
|
||||||
u8 red, green, blue;
|
u8 red, green, blue;
|
||||||
switch(srcFormat)
|
switch(srcFormat)
|
||||||
@ -323,7 +323,7 @@ static void Draw_ConvertFrameBufferLinesKernel(const FrameBufferConvertArgs *arg
|
|||||||
{
|
{
|
||||||
static const u8 formatSizes[] = { 4, 3, 2, 2, 2 };
|
static const u8 formatSizes[] = { 4, 3, 2, 2, 2 };
|
||||||
|
|
||||||
GSPGPU_FramebufferFormat fmt = args->top ? (GSPGPU_FramebufferFormat)(GPU_FB_TOP_FMT & 7) : (GSPGPU_FramebufferFormat)(GPU_FB_BOTTOM_FMT & 7);
|
GSPGPU_FramebufferFormats fmt = args->top ? (GSPGPU_FramebufferFormats)(GPU_FB_TOP_FMT & 7) : (GSPGPU_FramebufferFormats)(GPU_FB_BOTTOM_FMT & 7);
|
||||||
u32 width = args->top ? 400 : 320;
|
u32 width = args->top ? 400 : 320;
|
||||||
u32 stride = args->top ? GPU_FB_TOP_STRIDE : GPU_FB_BOTTOM_STRIDE;
|
u32 stride = args->top ? GPU_FB_TOP_STRIDE : GPU_FB_BOTTOM_STRIDE;
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void inputRedirectionThreadMain(void)
|
|||||||
if (Sleep__Status())
|
if (Sleep__Status())
|
||||||
{
|
{
|
||||||
while (!Wifi__IsConnected()
|
while (!Wifi__IsConnected()
|
||||||
&& inputRedirectionEnabled && !terminationRequest)
|
&& inputRedirectionEnabled && !preTerminationRequested)
|
||||||
svcSleepThread(1000000000ULL);
|
svcSleepThread(1000000000ULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ static inline u32 convertHidKeys(u32 keys)
|
|||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 waitInputWithTimeout(s32 msec)
|
u32 waitInputWithTimeout(u32 msec)
|
||||||
{
|
{
|
||||||
s32 n = 0;
|
s32 n = 0;
|
||||||
u32 keys;
|
u32 keys;
|
||||||
@ -204,14 +204,7 @@ void menuThreadMain(void)
|
|||||||
menuShow(&rosalinaMenu);
|
menuShow(&rosalinaMenu);
|
||||||
menuLeave();
|
menuLeave();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
menuEnter();
|
|
||||||
if(isN3DS) N3DSMenu_UpdateStatus();
|
|
||||||
menuShow(&rosalinaMenu);
|
|
||||||
menuLeave();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for home button on O3DS Mode3 with plugin loaded
|
// Check for home button on O3DS Mode3 with plugin loaded
|
||||||
if (homeBtnPressed != 0)
|
if (homeBtnPressed != 0)
|
||||||
@ -450,7 +443,7 @@ void DispMessage(const char *title, const char *message)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
keys = waitComboWithTimeout(1000);
|
keys = waitComboWithTimeout(1000);
|
||||||
}while (!terminationRequest && !(keys & BUTTON_B));
|
}while (!preTerminationRequested && !(keys & KEY_B));
|
||||||
|
|
||||||
Draw_Unlock(); ///< Keep it locked until we exit the message
|
Draw_Unlock(); ///< Keep it locked until we exit the message
|
||||||
menuLeave();
|
menuLeave();
|
||||||
@ -478,7 +471,7 @@ u32 DispErrMessage(const char *title, const char *message, const Result error
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
keys = waitComboWithTimeout(1000);
|
keys = waitComboWithTimeout(1000);
|
||||||
}while (!terminationRequest && !(keys & BUTTON_B));
|
}while (!preTerminationRequested && !(keys & KEY_B));
|
||||||
|
|
||||||
Draw_Unlock(); ///< Keep it locked until we exit the message
|
Draw_Unlock(); ///< Keep it locked until we exit the message
|
||||||
menuLeave();
|
menuLeave();
|
||||||
@ -505,12 +498,12 @@ u32 DispWarningOnHome(void)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
keys = waitComboWithTimeout(1000);
|
keys = waitComboWithTimeout(1000);
|
||||||
}while (!terminationRequest && !(keys & BUTTON_B));
|
}while (!preTerminationRequested && !(keys & KEY_B));
|
||||||
|
|
||||||
Draw_Unlock(); ///< Keep it locked until we exit the message
|
Draw_Unlock(); ///< Keep it locked until we exit the message
|
||||||
menuLeave();
|
menuLeave();
|
||||||
|
|
||||||
return (keys & BUTTON_UP) > 0;
|
return (keys & KEY_UP) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -564,17 +557,17 @@ void DisplayPluginMenu(u32 *cmdbuf)
|
|||||||
// Wait for input
|
// Wait for input
|
||||||
u32 pressed = waitInput();
|
u32 pressed = waitInput();
|
||||||
|
|
||||||
if (pressed & BUTTON_A)
|
if (pressed & KEY_A)
|
||||||
states[cursor] = !states[cursor];
|
states[cursor] = !states[cursor];
|
||||||
|
|
||||||
if (pressed & BUTTON_B)
|
if (pressed & KEY_B)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (pressed & BUTTON_DOWN)
|
if (pressed & KEY_DOWN)
|
||||||
if (++cursor >= nbItems)
|
if (++cursor >= nbItems)
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
|
|
||||||
if (pressed & BUTTON_UP)
|
if (pressed & KEY_UP)
|
||||||
if (--cursor >= nbItems)
|
if (--cursor >= nbItems)
|
||||||
cursor = nbItems - 1;
|
cursor = nbItems - 1;
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ void PluginLoader__ThreadMain(void)
|
|||||||
|
|
||||||
SetKernelConfigurationMemoryFlag(g_process != 0);
|
SetKernelConfigurationMemoryFlag(g_process != 0);
|
||||||
|
|
||||||
} while(!terminationRequest);
|
} while(!preTerminationRequested);
|
||||||
|
|
||||||
svcCloseHandle(sessionHandle);
|
svcCloseHandle(sessionHandle);
|
||||||
svcCloseHandle(clientHandle);
|
svcCloseHandle(clientHandle);
|
||||||
|
@ -191,7 +191,7 @@ void server_run(struct sock_server *serv)
|
|||||||
if (Sleep__Status())
|
if (Sleep__Status())
|
||||||
{
|
{
|
||||||
while (!Wifi__IsConnected()
|
while (!Wifi__IsConnected()
|
||||||
&& serv->running && !terminationRequest)
|
&& serv->running && !preTerminationRequested)
|
||||||
svcSleepThread(1000000000ULL);
|
svcSleepThread(1000000000ULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user