From 57b0bce12c760cc159794ae72acc72c338533b3b Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sat, 1 Oct 2022 19:29:11 -0400 Subject: [PATCH] Fix For ARMHF --- CMakeLists.txt | 3 ++- launcher/src/crash-report.c | 2 +- launcher/src/patchelf.cpp | 2 +- libreborn/include/libreborn/config.h.in | 1 + media-layer/core/src/media.c | 4 +++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f91633..4c4c018 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,8 @@ endif() set(MCPI_APP_ID "${DEFAULT_APP_ID}" CACHE STRING "App ID") # App Title -set(DEFAULT_APP_TITLE "Minecraft: Pi Edition: Reborn") +set(MCPI_APP_BASE_TITLE "Minecraft: Pi Edition: Reborn" CACHE STRING "Base App Title") +set(DEFAULT_APP_TITLE "${MCPI_APP_BASE_TITLE}") if(MCPI_SERVER_MODE) string(APPEND DEFAULT_APP_TITLE " (Server)") else() diff --git a/launcher/src/crash-report.c b/launcher/src/crash-report.c index 4df8580..415ca57 100644 --- a/launcher/src/crash-report.c +++ b/launcher/src/crash-report.c @@ -31,7 +31,7 @@ static void show_report(const char *log_filename) { "--width", CRASH_REPORT_DIALOG_WIDTH, "--height", CRASH_REPORT_DIALOG_HEIGHT, "--text-info", - "--text", "Minecraft: Pi Edition: Reborn has crashed!\n\nNeed help? Consider asking on the Discord server! If you believe this is a problem with Minecraft: Pi Edition: Reborn itself, please upload this crash report to the #bugs Discord channel.", + "--text", MCPI_APP_BASE_TITLE " has crashed!\n\nNeed help? Consider asking on the Discord server! If you believe this is a problem with " MCPI_APP_BASE_TITLE " itself, please upload this crash report to the #bugs Discord channel.", "--filename", log_filename, "--no-wrap", "--font", "Monospace", diff --git a/launcher/src/patchelf.cpp b/launcher/src/patchelf.cpp index 148eb35..8af919f 100644 --- a/launcher/src/patchelf.cpp +++ b/launcher/src/patchelf.cpp @@ -75,7 +75,7 @@ static int dl_iterate_callback(struct dl_phdr_info *info, __attribute__((unused) for (int i = 0; i < info->dlpi_phnum; i++) { if (info->dlpi_phdr[i].p_type == PT_INTERP) { // Callback - *(char **) data = (char *) info->dlpi_phdr[i].p_vaddr; + *(char **) data = (char *) (info->dlpi_addr + info->dlpi_phdr[i].p_vaddr); } } } diff --git a/libreborn/include/libreborn/config.h.in b/libreborn/include/libreborn/config.h.in index 6281a16..281ce15 100644 --- a/libreborn/include/libreborn/config.h.in +++ b/libreborn/include/libreborn/config.h.in @@ -5,6 +5,7 @@ #cmakedefine MCPI_IS_APPIMAGE_BUILD #cmakedefine MCPI_USE_PREBUILT_ARMHF_TOOLCHAIN #cmakedefine MCPI_USE_GLES1_COMPATIBILITY_LAYER +#cmakedefine MCPI_APP_BASE_TITLE "@MCPI_APP_BASE_TITLE@" #cmakedefine MCPI_APP_TITLE "@MCPI_APP_TITLE@" #cmakedefine MCPI_APP_ID "@MCPI_APP_ID@" #cmakedefine MCPI_VERSION "@MCPI_VERSION@" diff --git a/media-layer/core/src/media.c b/media-layer/core/src/media.c index 6404101..b144561 100644 --- a/media-layer/core/src/media.c +++ b/media-layer/core/src/media.c @@ -18,8 +18,10 @@ #endif // Allow Disabling Interaction -static void emit_events_after_is_interactable_change(); static void update_cursor(); +#ifndef MCPI_HEADLESS_MODE +static void emit_events_after_is_interactable_change(); +#endif static int is_interactable = 1; void media_set_interactable(int toggle) { if (toggle != is_interactable) {