diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2022-08-31 22:59:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-31 22:59:38 -0400 |
| commit | 584a4ad818df3046c2e13d0ab1c2e6a7f6c67fa6 (patch) | |
| tree | 363e3a7db8c4dbc8f12f2171971e0fbfc32f91aa /soh/src/code | |
| parent | bf505dba5cef0aaffb4576c9b4c4f430e9bceb43 (diff) | |
Linux crash handler (#1209)
* crash handler linux
* cleanups
* missing underscore
* more cleanups
* cleanups
* 32 bit
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/fault.c | 2 | ||||
| -rw-r--r-- | soh/src/code/main.c | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/soh/src/code/fault.c b/soh/src/code/fault.c index c55a63a00..f7414766a 100644 --- a/soh/src/code/fault.c +++ b/soh/src/code/fault.c @@ -293,7 +293,7 @@ void Fault_Sleep(u32 duration) { void Fault_PadCallback(Input* input) { //! @bug This function is not called correctly and thus will crash from reading a bad pointer at 0x800C7E4C - PadMgr_RequestPadData(input, 0); + PadMgr_RequestPadData(&gPadMgr, input, 0); } void Fault_UpdatePadImpl() diff --git a/soh/src/code/main.c b/soh/src/code/main.c index ccfdc2019..8e9fe1776 100644 --- a/soh/src/code/main.c +++ b/soh/src/code/main.c @@ -3,6 +3,8 @@ #include <soh/Enhancements/bootcommands.h> #include "soh/OTRGlobals.h" +#include "../libultraship/CrashHandler.h" + s32 gScreenWidth = SCREEN_WIDTH; s32 gScreenHeight = SCREEN_HEIGHT; @@ -38,6 +40,10 @@ void Main_LogSystemHeap(void) { int main(int argc, char** argv) { +#ifdef __linux__ + SetupHandlerLinux(); +#endif + GameConsole_Init(); InitOTR(); BootCommands_Init(); @@ -64,14 +70,14 @@ void Main(void* arg) { Fault_Init(); SysCfb_Init(0); Heaps_Alloc(); - sysHeap = gSystemHeap; + sysHeap = (uintptr_t)gSystemHeap; fb = SysCfb_GetFbPtr(0); gSystemHeapSize = 1024 * 1024 * 4; // "System heap initalization" osSyncPrintf("システムヒープ初期化 %08x-%08x %08x\n", sysHeap, fb, gSystemHeapSize); - SystemHeap_Init(sysHeap, gSystemHeapSize); // initializes the system heap + SystemHeap_Init((void*)sysHeap, gSystemHeapSize); // initializes the system heap if (osMemSize >= 0x800000) { - debugHeap = SysCfb_GetFbEnd(); + debugHeap = (void*)SysCfb_GetFbEnd(); debugHeapSize = (0x80600000 - (uintptr_t)debugHeap); } else { debugHeapSize = 0x400; |
