mirror of
https://github.com/libretro/Mu.git
synced 2026-09-24 15:46:20 +00:00
Fix some segfaults and missing symbols
It runs now but pushing to master is going to be a mess.
This commit is contained in:
@@ -341,6 +341,8 @@ bool retro_load_game(const struct retro_game_info *info){
|
||||
//updates the emulator configuration
|
||||
check_variables(true);
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &systemDir);
|
||||
|
||||
if(info && !string_is_empty(info->path)){
|
||||
//boot application
|
||||
strlcpy(contentPath, info->path, PATH_MAX_LENGTH);
|
||||
@@ -351,8 +353,6 @@ bool retro_load_game(const struct retro_game_info *info){
|
||||
strlcat(contentPath, "/default", PATH_MAX_LENGTH);
|
||||
}
|
||||
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &systemDir);
|
||||
|
||||
//ROM
|
||||
strlcpy(romPath, systemDir, PATH_MAX_LENGTH);
|
||||
#if defined(EMU_SUPPORT_PALM_OS5)
|
||||
@@ -364,7 +364,7 @@ bool retro_load_game(const struct retro_game_info *info){
|
||||
romFile = filestream_open(romPath, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if(romFile){
|
||||
romSize = filestream_get_size(romFile);
|
||||
bootloaderData = malloc(romSize);
|
||||
romData = malloc(romSize);
|
||||
|
||||
if(romData)
|
||||
filestream_read(romFile, romData, romSize);
|
||||
@@ -425,8 +425,6 @@ bool retro_load_game(const struct retro_game_info *info){
|
||||
return false;
|
||||
}
|
||||
|
||||
file.fileData = info->data;
|
||||
file.fileSize = info->size;
|
||||
if(string_is_equal_case_insensitive(contentPath + strlen(contentPath) - 4, ".img")){
|
||||
char infoPath[PATH_MAX_LENGTH];
|
||||
struct RFILE* infoFile;
|
||||
@@ -565,7 +563,7 @@ void retro_unload_game(void){
|
||||
}
|
||||
}
|
||||
|
||||
emulatorExit();
|
||||
emulatorDeinit();
|
||||
}
|
||||
|
||||
unsigned retro_get_region(void){
|
||||
|
||||
@@ -43,8 +43,10 @@ extern bool do_translate;
|
||||
|
||||
enum { LOG_CPU, LOG_IO, LOG_FLASH, LOG_INTS, LOG_ICOUNT, LOG_USB, LOG_GDB, MAX_LOG };
|
||||
#define LOG_TYPE_TBL "CIFQ#UG"
|
||||
void logprintf(int type, const char *str, ...);
|
||||
void emuprintf(const char *format, ...);
|
||||
//void logprintf(int type, const char *str, ...);
|
||||
//void emuprintf(const char *format, ...);
|
||||
#define logprintf(type, ...) debugLog(__VA_ARGS__)
|
||||
#define emuprintf(...) debugLog(__VA_ARGS__)
|
||||
|
||||
//void warn(const char *fmt, ...);
|
||||
#define warn(...) debugLog(__VA_ARGS__)
|
||||
|
||||
Reference in New Issue
Block a user