[Scummvm-git-logs] scummvm master -> b25798ac349a66e7ca51e888583d8388b5b37a2f

spleen1981 noreply at scummvm.org
Fri Apr 28 22:00:20 UTC 2023


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6722fbf5c3 LIBRETRO: align scummvm and libretro log levels
e6a7bac64b LIBRETRO: add LIBRETRO_DEBUG mode
b25798ac34 LIBRETRO: BUILD: define LDFLAGS as simple expanded var


Commit: 6722fbf5c38fefc960257db19d1a2f822157b8cd
    https://github.com/scummvm/scummvm/commit/6722fbf5c38fefc960257db19d1a2f822157b8cd
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2023-04-28T23:59:18+02:00

Commit Message:
LIBRETRO: align scummvm and libretro log levels

Changed paths:
    backends/platform/libretro/src/libretro-os.cpp


diff --git a/backends/platform/libretro/src/libretro-os.cpp b/backends/platform/libretro/src/libretro-os.cpp
index 677662e410f..b56a3828912 100644
--- a/backends/platform/libretro/src/libretro-os.cpp
+++ b/backends/platform/libretro/src/libretro-os.cpp
@@ -768,8 +768,21 @@ public:
 	}
 
 	virtual void logMessage(LogMessageType::Type type, const char *message) {
+		retro_log_level loglevel = RETRO_LOG_INFO;
+		switch (type) {
+			case LogMessageType::kDebug:
+				loglevel = RETRO_LOG_DEBUG;
+				break;
+			case LogMessageType::kWarning:
+				loglevel = RETRO_LOG_WARN;
+				break;
+			case LogMessageType::kError:
+				loglevel = RETRO_LOG_ERROR;
+				break;
+		}
+
 		if (log_cb)
-			log_cb(RETRO_LOG_INFO, "%s\n", message);
+			log_cb(loglevel, "%s\n", message);
 	}
 
 	const Graphics::Surface &getScreen() {


Commit: e6a7bac64b6ce3134d2ae766ba048d7eae07a54b
    https://github.com/scummvm/scummvm/commit/e6a7bac64b6ce3134d2ae766ba048d7eae07a54b
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2023-04-28T23:59:41+02:00

Commit Message:
LIBRETRO: add LIBRETRO_DEBUG mode

Changed paths:
    backends/platform/libretro/Makefile
    backends/platform/libretro/Makefile.common
    backends/platform/libretro/src/libretro.cpp


diff --git a/backends/platform/libretro/Makefile b/backends/platform/libretro/Makefile
index e5042c64005..7d716480f86 100644
--- a/backends/platform/libretro/Makefile
+++ b/backends/platform/libretro/Makefile
@@ -470,9 +470,7 @@ else ifeq ($(platform), osx)
    endif
 endif
 
-ifeq ($(DEBUG), 1)
-   DEFINES += -O0 -g
-else ifeq ($(platform), wiiu)
+ifeq ($(platform), wiiu)
    DEFINES += -Os
 else ifeq ($(platform),genode)
    DEFINES += -O2
diff --git a/backends/platform/libretro/Makefile.common b/backends/platform/libretro/Makefile.common
index 57d89ac65c8..5c709ba1af0 100644
--- a/backends/platform/libretro/Makefile.common
+++ b/backends/platform/libretro/Makefile.common
@@ -32,6 +32,7 @@ NO_WIP           ?= 1
 USE_LIBCO        ?= 1
 USE_MT32EMU      ?= 1
 USE_CLOUD        ?= 0
+DEBUG            ?= 0
 
 DEBUG_ALLOW_DIRTY_SUBMODULES ?= 0
 
@@ -84,7 +85,7 @@ CORE_NAME = "ScummVM"
 CORE_EXTENSIONS = "scummvm"
 
 INCLUDES += -I$(SCUMMVM_PATH)
-DEFINES  += -D__LIBRETRO__ -DNONSTANDARD_PORT -DUSE_RGB_COLOR -DUSE_OSD -DDISABLE_TEXT_CONSOLE -DFRONTEND_SUPPORTS_RGB565 -DUSE_TRANSLATION -DDETECTION_STATIC -DHAVE_CONFIG_H -DUSE_BINK -DUSE_LUA -DUSE_TINYGL -DENABLE_VKEYBD
+DEFINES  += -D__LIBRETRO__ -DNONSTANDARD_PORT -DUSE_RGB_COLOR -DUSE_OSD -DFRONTEND_SUPPORTS_RGB565 -DUSE_TRANSLATION -DDETECTION_STATIC -DHAVE_CONFIG_H -DUSE_BINK -DUSE_LUA -DUSE_TINYGL -DENABLE_VKEYBD
 DEFINES  += -DCORE_NAME=\"$(CORE_NAME)\" -DCORE_EXTENSIONS=\"$(CORE_EXTENSIONS)\"
 CXXFLAGS += -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wno-undefined-var-template
 
@@ -100,6 +101,12 @@ else
    DEFINES += -DSIZEOF_SIZE_T=4
 endif
 
+ifeq ($(DEBUG), 1)
+   DEFINES += -O0 -g -DLIBRETRO_DEBUG
+else
+   DEFINES += -DDISABLE_TEXT_CONSOLE -DRELEASE_BUILD
+endif
+
 ######################################################################
 # Libretro settings
 ######################################################################
diff --git a/backends/platform/libretro/src/libretro.cpp b/backends/platform/libretro/src/libretro.cpp
index 2a0e3857d88..eee2e486303 100644
--- a/backends/platform/libretro/src/libretro.cpp
+++ b/backends/platform/libretro/src/libretro.cpp
@@ -598,6 +598,12 @@ bool retro_load_game(const struct retro_game_info *game) {
 		return false;
 	}
 
+#ifdef LIBRETRO_DEBUG
+	char debug_buf [20];
+	sprintf(debug_buf, "--debuglevel=11");
+	parse_command_params(debug_buf);
+#endif
+
 	if (game) {
 		game_buf_ptr = &game_buf;
 		memcpy(game_buf_ptr, game, sizeof(retro_game_info));
@@ -733,8 +739,7 @@ void retro_run(void) {
 		/* ScummVM is not based on fixed framerate like libretro, and engines/scripts
 		can call multiple screen updates between two retro_run calls. Hence if consecutive screen updates
 		are detected we will loop within the same retro_run call until next pollEvent or
-		delayMillis call in ScummVM thread.
-		*/
+		delayMillis call in ScummVM thread. */
 		do {
 			/* Determine frameskip need based on settings */
 			if ((frameskip_type == 2) || (performance_switch & PERF_SWITCH_ON))
@@ -746,7 +751,7 @@ void retro_run(void) {
 
 			/* No frame skipping if
 			- no incoming audio (e.g. GUI)
-			- doing a THREAD_SWITCH_UPDATE loop*/
+			- doing a THREAD_SWITCH_UPDATE loop */
 			skip_frame = skip_frame && !(audio_status & AUDIO_STATUS_MUTE) && !(getThreadSwitchCaller() & THREAD_SWITCH_UPDATE);
 
 			/* Reset frameskip counter if not flagged */


Commit: b25798ac349a66e7ca51e888583d8388b5b37a2f
    https://github.com/scummvm/scummvm/commit/b25798ac349a66e7ca51e888583d8388b5b37a2f
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2023-04-29T00:00:00+02:00

Commit Message:
LIBRETRO: BUILD: define LDFLAGS as simple expanded var

Changed paths:
    backends/platform/libretro/Makefile


diff --git a/backends/platform/libretro/Makefile b/backends/platform/libretro/Makefile
index 7d716480f86..4467d31e483 100644
--- a/backends/platform/libretro/Makefile
+++ b/backends/platform/libretro/Makefile
@@ -34,6 +34,8 @@ MKDIR     = mkdir -p
 RM        = rm -f
 RM_REC    = rm -rf
 
+LDFLAGS :=
+
 # Raspberry Pi 3 (64 bit)
 ifeq ($(platform), rpi3_64)
    TARGET   = $(TARGET_NAME)_libretro.so




More information about the Scummvm-git-logs mailing list