[Scummvm-git-logs] scummvm master -> 4f5f776b8d25cfc4636ff02e01b8fa7fe4259950
spleen1981
noreply at scummvm.org
Mon Jul 22 22:37:41 UTC 2024
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
04bdeaf5db LIBRETRO: avoid closing scummvm thread if not yet started
fbdc06512e LIBRETRO: fix libretro-os-utils includes
e1302b068a LIBRETRO: bump libretro-common
1187260478 LIBRETRO: BUILD: workaround for gwc0 inttypes.h build error
4f5f776b8d LIBRETRO: BUILD: Define USE_OGG where needed
Commit: 04bdeaf5db1efe3b5b4d09256d03b788646cfc91
https://github.com/scummvm/scummvm/commit/04bdeaf5db1efe3b5b4d09256d03b788646cfc91
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-07-23T00:35:50+02:00
Commit Message:
LIBRETRO: avoid closing scummvm thread if not yet started
Changed paths:
backends/platform/libretro/include/libretro-threads.h
backends/platform/libretro/src/libretro-core.cpp
backends/platform/libretro/src/libretro-threads.cpp
diff --git a/backends/platform/libretro/include/libretro-threads.h b/backends/platform/libretro/include/libretro-threads.h
index e7451e3ffc6..8dfbfe61a28 100644
--- a/backends/platform/libretro/include/libretro-threads.h
+++ b/backends/platform/libretro/include/libretro-threads.h
@@ -57,5 +57,11 @@ bool retro_emu_thread_exited(void);
/* Returns scummvm_main return code or -1 if not available */
int retro_get_scummvm_res(void);
+/* Returns true if the emulation thread was started successfully.
+ *
+ * This function should be called from the main thread.
+ */
+bool retro_emu_thread_started(void);
+
#endif
diff --git a/backends/platform/libretro/src/libretro-core.cpp b/backends/platform/libretro/src/libretro-core.cpp
index da21dbcec51..99c1cbd5802 100644
--- a/backends/platform/libretro/src/libretro-core.cpp
+++ b/backends/platform/libretro/src/libretro-core.cpp
@@ -707,7 +707,7 @@ static void exit_to_frontend(void) {
}
static void close_emu_thread(void) {
- while (!retro_emu_thread_exited()) {
+ while (retro_emu_thread_started() && !retro_emu_thread_exited()) {
LIBRETRO_G_SYSTEM->requestQuit();
retro_switch_to_emu_thread();
}
diff --git a/backends/platform/libretro/src/libretro-threads.cpp b/backends/platform/libretro/src/libretro-threads.cpp
index f04f8eb4f35..158eaf1ea94 100644
--- a/backends/platform/libretro/src/libretro-threads.cpp
+++ b/backends/platform/libretro/src/libretro-threads.cpp
@@ -21,7 +21,8 @@
#define EMU_WAITING (1 << 0)
#define MAIN_WAITING (1 << 1)
-#define EMU_EXITED (1 << 2)
+#define EMU_STARTED (1 << 2)
+#define EMU_EXITED (1 << 3)
static uint8 status = EMU_WAITING | MAIN_WAITING;
static int scummvm_res = -1;
@@ -71,8 +72,10 @@ static int retro_run_emulator(void) {
static void retro_wrap_emulator(void) {
status &= ~EMU_EXITED;
+ status |= EMU_STARTED;
scummvm_res = retro_run_emulator();
status |= EMU_EXITED;
+ status &= ~EMU_STARTED;
retro_exit_to_main_thread();
}
@@ -154,7 +157,7 @@ bool retro_init_emu_thread(void) {
if (!success)
retro_free_emu_thread();
else
- status &= ~EMU_EXITED;
+ status &= ~(EMU_EXITED | EMU_STARTED);
return success;
}
@@ -167,3 +170,7 @@ void retro_deinit_emu_thread() {
int retro_get_scummvm_res() {
return scummvm_res;
}
+
+bool retro_emu_thread_started(void){
+ return (bool)(status & EMU_STARTED);
+}
Commit: fbdc06512ed9185176d11a64e8e46e4e7f1c5123
https://github.com/scummvm/scummvm/commit/fbdc06512ed9185176d11a64e8e46e4e7f1c5123
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-07-23T00:36:08+02:00
Commit Message:
LIBRETRO: fix libretro-os-utils includes
Changed paths:
backends/platform/libretro/src/libretro-os-utils.cpp
diff --git a/backends/platform/libretro/src/libretro-os-utils.cpp b/backends/platform/libretro/src/libretro-os-utils.cpp
index ebfa40996b9..d8c58b49326 100644
--- a/backends/platform/libretro/src/libretro-os-utils.cpp
+++ b/backends/platform/libretro/src/libretro-os-utils.cpp
@@ -22,6 +22,9 @@
#include "common/config-manager.h"
#include "common/translation.h"
#include "base/commandLine.h"
+#include "base/plugins.h"
+#include "engines/game.h"
+#include "engines/metaengine.h"
#include "backends/platform/libretro/include/libretro-defs.h"
#include "backends/platform/libretro/include/libretro-core.h"
Commit: e1302b068ad20dd88167bb629563dbe42b413203
https://github.com/scummvm/scummvm/commit/e1302b068ad20dd88167bb629563dbe42b413203
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-07-23T00:36:27+02:00
Commit Message:
LIBRETRO: bump libretro-common
Changed paths:
backends/platform/libretro/dependencies.mk
backends/platform/libretro/include/libretro-defs.h
diff --git a/backends/platform/libretro/dependencies.mk b/backends/platform/libretro/dependencies.mk
index de7da2f22b5..c34b61b502f 100644
--- a/backends/platform/libretro/dependencies.mk
+++ b/backends/platform/libretro/dependencies.mk
@@ -11,7 +11,7 @@ DEPS_COMMIT_libretro-deps := abf5246b016569759e7d1b0ea91bb98c2e34d160
DEPS_FOLDER_libretro-common := libretro-common
DEPS_URL_libretro-common := https://github.com/libretro/libretro-common
-DEPS_COMMIT_libretro-common := 86d5e4128c072255c123d535cae97789023ee54b
+DEPS_COMMIT_libretro-common := 70ed90c42ddea828f53dd1b984c6443ddb39dbd6
submodule_test = $(if $(shell result=$$($(SCRIPTS_PATH)/configure_submodules.sh $(DEPS_URL_$(1)) $(DEPS_COMMIT_$(1)) $(DEPS_PATH) $(DEBUG_ALLOW_DIRTY_SUBMODULES) $(DEPS_FOLDER_$(1))) ; { [ -z $$result ] || [ ! $$result = 0 ] ; } && printf error),$(1))
$(info Configuring submodules...)
diff --git a/backends/platform/libretro/include/libretro-defs.h b/backends/platform/libretro/include/libretro-defs.h
index 605cc4af71b..5ef616999d5 100644
--- a/backends/platform/libretro/include/libretro-defs.h
+++ b/backends/platform/libretro/include/libretro-defs.h
@@ -26,12 +26,6 @@
// System analog stick range is -0x8000 to 0x8000
#define ANALOG_RANGE 0x8000
-/* TODO: remove the following definition when libretro-common
-will be updated to include it */
-#ifndef RETRO_ENVIRONMENT_GET_PLAYLIST_DIRECTORY
-#define RETRO_ENVIRONMENT_GET_PLAYLIST_DIRECTORY 79
-#endif
-
#define DEFAULT_SAMPLE_RATE 48000
#define DEFAULT_REFRESH_RATE 60
#define FRAMESKIP_MAX DEFAULT_REFRESH_RATE / 2
Commit: 11872604785daed78139fe39c70c033a989a1e29
https://github.com/scummvm/scummvm/commit/11872604785daed78139fe39c70c033a989a1e29
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-07-23T00:36:42+02:00
Commit Message:
LIBRETRO: BUILD: workaround for gwc0 inttypes.h build error
Changed paths:
backends/platform/libretro/Makefile
diff --git a/backends/platform/libretro/Makefile b/backends/platform/libretro/Makefile
index bb3b8ca94f9..638d77cbc3a 100644
--- a/backends/platform/libretro/Makefile
+++ b/backends/platform/libretro/Makefile
@@ -219,6 +219,7 @@ else ifeq ($(platform), gcw0)
AR = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ar cru
RANLIB = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ranlib
DEFINES += -DDINGUX -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float -fPIC
+ DEFINES += -DPRId64 #Workaround to avoid compilation error in retro_common_api.h. Root cause to be investigated.
DEFINES += -ffunction-sections -fdata-sections -DDEFAULT_PERF_TUNER
LDFLAGS += -shared -Wl,--gc-sections -Wl,--version-script=$(ROOT_PATH)/link.T -fPIC
CFLAGS += -std=gnu99
Commit: 4f5f776b8d25cfc4636ff02e01b8fa7fe4259950
https://github.com/scummvm/scummvm/commit/4f5f776b8d25cfc4636ff02e01b8fa7fe4259950
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-07-23T00:37:02+02:00
Commit Message:
LIBRETRO: BUILD: Define USE_OGG where needed
Changed paths:
backends/platform/libretro/dependencies.mk
diff --git a/backends/platform/libretro/dependencies.mk b/backends/platform/libretro/dependencies.mk
index c34b61b502f..79e2067b9a3 100644
--- a/backends/platform/libretro/dependencies.mk
+++ b/backends/platform/libretro/dependencies.mk
@@ -133,7 +133,7 @@ endif
######################################################################
ifeq ($(USE_VORBIS), 1)
-DEFINES += -DUSE_VORBIS
+DEFINES += -DUSE_VORBIS -DUSE_OGG
this_lib_subpath :=
this_lib_header := vorbis/codec.h
this_lib_flags := -lvorbis
@@ -174,7 +174,7 @@ endif
######################################################################
ifeq ($(USE_TREMOR), 1)
-DEFINES += -DUSE_TREMOR -DUSE_VORBIS
+DEFINES += -DUSE_TREMOR -DUSE_VORBIS -DUSE_OGG
this_lib_subpath :=
this_lib_header := tremor/ivorbiscodec.h
this_lib_flags := -ltremor
@@ -204,7 +204,7 @@ endif
######################################################################
ifeq ($(USE_ZLIB), 1)
-DEFINES += -DUSE_ZLIB -DWANT_ZLIB
+DEFINES += -DUSE_ZLIB -DWANT_ZLIB
this_lib_subpath :=
this_lib_header := zlib.h
this_lib_flags := -lz
More information about the Scummvm-git-logs
mailing list