[Scummvm-git-logs] scummvm master -> 41606901e307af8c3345277afd281a4830996854
spleen1981
noreply at scummvm.org
Sun Apr 23 21:21:23 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ce2e2f353d LIBRETRO: refactor close content functions
41606901e3 LIBRETRO: BUILD: temp disable fortify for android builds
Commit: ce2e2f353d2a9f115d00be5b8177e580f3f378ff
https://github.com/scummvm/scummvm/commit/ce2e2f353d2a9f115d00be5b8177e580f3f378ff
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2023-04-23T23:20:15+02:00
Commit Message:
LIBRETRO: refactor close content functions
Changed paths:
backends/platform/libretro/src/libretro.cpp
diff --git a/backends/platform/libretro/src/libretro.cpp b/backends/platform/libretro/src/libretro.cpp
index 31bbe5d978c..7006a1770c1 100644
--- a/backends/platform/libretro/src/libretro.cpp
+++ b/backends/platform/libretro/src/libretro.cpp
@@ -92,8 +92,6 @@ static uint8 frameskip_threshold;
static uint32 frameskip_counter = 0;
static uint8 frameskip_events = 0;
-static bool restart_pending = false;
-
static uint8 audio_status = AUDIO_STATUS_MUTE;
static unsigned retro_audio_buff_occupancy = 0;
@@ -365,6 +363,18 @@ void parse_command_params(char *cmdline) {
}
}
+static void exit_to_frontend(void) {
+ log_scummvm_exit_code();
+ environ_cb(RETRO_ENVIRONMENT_SHUTDOWN, NULL);
+}
+
+static void close_emu_thread(void) {
+ retroQuit();
+ while (!retro_emu_thread_exited())
+ retro_switch_to_emu_thread();
+ retro_deinit_emu_thread();
+}
+
#if defined(WIIU) || defined(__SWITCH__) || defined(_MSC_VER) || defined(_3DS)
#include <stdio.h>
#include <string.h>
@@ -777,23 +787,15 @@ void retro_run(void) {
retro_switch_to_emu_thread();
if (retro_emu_thread_exited()) {
- if (!restart_pending) {
- environ_cb(RETRO_ENVIRONMENT_SHUTDOWN, NULL);
- log_scummvm_exit_code();
- } else {
- init_command_params();
- retro_load_game(game_buf_ptr);
- retroReset();
- restart_pending = false;
- }
+ exit_to_frontend();
return;
}
/* Retrieve audio */
samples_count = 0;
- if (audio_video_enable & 2) {
+ if (audio_video_enable & 2)
samples_count = ((Audio::MixerImpl *)g_system->getMixer())->mixCallback((byte *) sound_buffer, samples_per_frame_buffer_size);
- }
+
audio_status = samples_count ? (audio_status & ~AUDIO_STATUS_MUTE) : (audio_status | AUDIO_STATUS_MUTE);
/* Retrieve video */
@@ -825,15 +827,15 @@ void retro_run(void) {
}
void retro_unload_game(void) {
- retroQuit();
- while (!retro_emu_thread_exited())
- retro_switch_to_emu_thread();
- retro_deinit_emu_thread();
+ close_emu_thread();
+ exit_to_frontend();
}
void retro_reset(void) {
- restart_pending = true;
- retro_unload_game();
+ close_emu_thread();
+ init_command_params();
+ retro_load_game(game_buf_ptr);
+ retroReset();
}
// Stubs
Commit: 41606901e307af8c3345277afd281a4830996854
https://github.com/scummvm/scummvm/commit/41606901e307af8c3345277afd281a4830996854
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2023-04-23T23:20:43+02:00
Commit Message:
LIBRETRO: BUILD: temp disable fortify for android builds
Changed paths:
backends/platform/libretro/jni/Android.mk
diff --git a/backends/platform/libretro/jni/Android.mk b/backends/platform/libretro/jni/Android.mk
index 4311c9ed7d7..e9c22045982 100644
--- a/backends/platform/libretro/jni/Android.mk
+++ b/backends/platform/libretro/jni/Android.mk
@@ -17,8 +17,10 @@ include $(addprefix $(SCUMMVM_PATH)/, $(addsuffix /module.mk,$(MODULES)))
OBJS_MODULES := $(addprefix $(SCUMMVM_PATH)/, $(foreach MODULE,$(MODULES),$(MODULE_OBJS-$(MODULE)))) \
$(CORE_PATH)/android-fs-factory.o
-#TODO: -O2 or higher causes segmentation fault with some engines (e.g. hopkins)
-COREFLAGS := $(DEFINES) -DUSE_CXX11 -O1
+#TODO:
+# -O2 or higher causes segmentation fault with some engines (e.g. hopkins)
+# -Fortify triggers abort with some engines (e.g. sword25)
+COREFLAGS := $(DEFINES) -DUSE_CXX11 -O1 -U_FORTIFY_SOURCE
ifeq ($(TARGET_ARCH),arm)
COREFLAGS += -D_ARM_ASSEM_
More information about the Scummvm-git-logs
mailing list