This commit is contained in:
twinaphex 2017-12-25 07:49:07 +01:00
parent c0c9764afe
commit 3f281bb31f
3 changed files with 21 additions and 15 deletions

View File

@ -172,11 +172,13 @@ static void frontend_ctr_exec(const char *path, bool should_load_game)
} }
else else
{ {
u32 app_ID_low;
char app_ID_str[11]; char app_ID_str[11];
u32 app_ID_low = 0;
FILE* fp = fopen(path, "rb"); FILE* fp = fopen(path, "rb");
size_t bytes_read = fread(app_ID_str, 1, sizeof(app_ID_str), fp); size_t bytes_read = fread(app_ID_str, 1, sizeof(app_ID_str), fp);
fclose(fp); fclose(fp);
if(bytes_read <= 0) if(bytes_read <= 0)
{ {
RARCH_LOG("error reading APP_ID from: [%s].\n", path); RARCH_LOG("error reading APP_ID from: [%s].\n", path);

View File

@ -124,8 +124,8 @@ static void dol_copy_argv_path(const char *dolpath, const char *argpath)
* heap memory and are restricted to the stack only. */ * heap memory and are restricted to the stack only. */
void system_exec_wii(const char *_path, bool should_load_game) void system_exec_wii(const char *_path, bool should_load_game)
{ {
FILE *fp;
size_t size, booter_size; size_t size, booter_size;
FILE *fp = NULL;
void *dol = NULL; void *dol = NULL;
char path[PATH_MAX_LENGTH] = {0}; char path[PATH_MAX_LENGTH] = {0};
char game_path[PATH_MAX_LENGTH] = {0}; char game_path[PATH_MAX_LENGTH] = {0};

View File

@ -395,7 +395,7 @@ static devoptab_t dotab_stdout =
}; };
#endif #endif
void SaveCallback() void SaveCallback(void)
{ {
OSSavesDone_ReadyToRelease(); OSSavesDone_ReadyToRelease();
} }
@ -517,7 +517,7 @@ unsigned long _times_r(struct _reent *r, struct tms *tmsbuf)
return 0; return 0;
} }
void __eabi() void __eabi(void)
{ {
} }
@ -556,7 +556,7 @@ void someFunc(void *arg)
static int mcp_hook_fd = -1; static int mcp_hook_fd = -1;
int MCPHookOpen() int MCPHookOpen(void)
{ {
//take over mcp thread //take over mcp thread
mcp_hook_fd = IOS_Open("/dev/mcp", 0); mcp_hook_fd = IOS_Open("/dev/mcp", 0);
@ -578,7 +578,7 @@ int MCPHookOpen()
return 0; return 0;
} }
void MCPHookClose() void MCPHookClose(void)
{ {
if (mcp_hook_fd < 0) if (mcp_hook_fd < 0)
return; return;
@ -630,12 +630,14 @@ static void fsdev_exit(void)
/* HBL elf entry point */ /* HBL elf entry point */
int __entry_menu(int argc, char **argv) int __entry_menu(int argc, char **argv)
{ {
int ret;
InitFunctionPointers(); InitFunctionPointers();
memoryInitialize(); memoryInitialize();
__init(); __init();
fsdev_init(); fsdev_init();
int ret = main(argc, argv); ret = main(argc, argv);
fsdev_exit(); fsdev_exit();
__fini(); __fini();
@ -656,7 +658,9 @@ void _start(int argc, char **argv)
/* TODO: fix elf2rpl so it doesn't error with "Could not find matching symbol /* TODO: fix elf2rpl so it doesn't error with "Could not find matching symbol
for relocation" then uncomment this */ for relocation" then uncomment this */
// __fini(); #if 0
__fini();
#endif
memoryRelease(); memoryRelease();
SYSRelaunchTitle(0, 0); SYSRelaunchTitle(0, 0);
exit(0); exit(0);