[Scummvm-git-logs] scummvm master -> 43417bd5fb1cb83d67590769d6ad4c5498bd9d5a

spleen1981 noreply at scummvm.org
Sat Jan 3 09:17:19 UTC 2026


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

Summary:
179245e8d8 LIBRETRO: JANITORIAL: fix typo
3086a796cc LIBRETRO: fix audio buffer size selection
f7ac5e79f8 LIBRETRO: avoid use of MAXPATHLEN
1cd22944e7 LIBRETRO: improve home path selection for win
e17c40f59f LIBRETRO: JANITORIAL: fix typo in log
8041c9a9b5 LIBRETRO: fix clamp to screen res
43417bd5fb LIBRETRO: enable mpeg2 dep games


Commit: 179245e8d8ed7634c7fe3972f0a959c5b5e0dfb7
    https://github.com/scummvm/scummvm/commit/179245e8d8ed7634c7fe3972f0a959c5b5e0dfb7
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:14:39+01:00

Commit Message:
LIBRETRO: JANITORIAL: fix typo

Changed paths:
    backends/platform/libretro/include/libretro-core-options-intl.h


diff --git a/backends/platform/libretro/include/libretro-core-options-intl.h b/backends/platform/libretro/include/libretro-core-options-intl.h
index 7564752a3fd..b5ef01b7388 100644
--- a/backends/platform/libretro/include/libretro-core-options-intl.h
+++ b/backends/platform/libretro/include/libretro-core-options-intl.h
@@ -487,7 +487,7 @@ struct retro_core_option_v2_definition option_defs_it[] = {
 	},
 	{
 		"scummvm_mapper_rr",
-		"RetroPad > Leva Analogica Destra > Leva Analogica Destra",
+		"RetroPad > Leva Analogica Destra > Destra",
 		"Leva Analogica Destra > Destra",
 		NULL,
 		NULL,


Commit: 3086a796cc5b21e592fb62db1223d5e61c34071a
    https://github.com/scummvm/scummvm/commit/3086a796cc5b21e592fb62db1223d5e61c34071a
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:15:04+01:00

Commit Message:
LIBRETRO: fix audio buffer size selection

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


diff --git a/backends/platform/libretro/src/libretro-core.cpp b/backends/platform/libretro/src/libretro-core.cpp
index 5b11d73fa04..0371b91d82f 100644
--- a/backends/platform/libretro/src/libretro-core.cpp
+++ b/backends/platform/libretro/src/libretro-core.cpp
@@ -613,17 +613,25 @@ uint16 retro_setting_get_sample_rate(void) {
 	return sample_rate;
 }
 
+
+static uint32 next_pow2(uint32 x) {
+	if (x <= 1) return 1;
+	x--;
+	x |= x >> 1; x |= x >> 2; x |= x >> 4;
+	x |= x >> 8; x |= x >> 16;
+	return x + 1;
+}
+
 uint16 retro_setting_get_audio_samples_buffer_size(void) {
 	/* ScummVM audio buffer size is normally between 512 and 8192, but the value
 	must be one of: 256, 512, 1024, 2048, 4096, 8192, 16384, or 32768. */
-	uint16 v = audio_samples_per_frame--;
-	v |= v >> 1;
-	v |= v >> 2;
-	v |= v >> 4;
-	v |= v >> 8;
-	v |= v >> 16;
-
-	return ++v;
+	static const uint16 allowed[] = {256,512,1024,2048,4096,8192,16384,32768};
+	uint32 target = (uint32)(audio_samples_per_frame * 2.0f + 0.5f); // stereo
+	uint32 pow2   = next_pow2(target);
+	for (uint16 v : allowed) {
+		if (pow2 <= v) return v;
+	}
+	return allowed[sizeof(allowed)/sizeof(allowed[0])];
 }
 
 void init_command_params(void) {


Commit: f7ac5e79f8c7c73c749dcc6a5548d6098b00a4c6
    https://github.com/scummvm/scummvm/commit/f7ac5e79f8c7c73c749dcc6a5548d6098b00a4c6
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:15:23+01:00

Commit Message:
LIBRETRO: avoid use of MAXPATHLEN

Changed paths:
    backends/platform/libretro/src/libretro-fs-factory.cpp


diff --git a/backends/platform/libretro/src/libretro-fs-factory.cpp b/backends/platform/libretro/src/libretro-fs-factory.cpp
index d123a03dcfc..02ee0e7a80c 100644
--- a/backends/platform/libretro/src/libretro-fs-factory.cpp
+++ b/backends/platform/libretro/src/libretro-fs-factory.cpp
@@ -39,8 +39,11 @@ AbstractFSNode *LibRetroFilesystemFactory::makeCurrentDirectoryFileNode() const
 #ifdef PLAYSTATION3
 	return new LibRetroFilesystemNode("/");
 #else
-	char buf[MAXPATHLEN];
-	return getcwd(buf, MAXPATHLEN) ? new LibRetroFilesystemNode(buf) : NULL;
+	char *cwd = getcwd(NULL, 0);
+	AbstractFSNode *node = cwd ? new LibRetroFilesystemNode(Common::String(cwd)) : NULL;
+	if (cwd)
+		free(cwd);
+	return node;
 #endif
 }
 


Commit: 1cd22944e73c43cf676e6f42457707d39181181d
    https://github.com/scummvm/scummvm/commit/1cd22944e73c43cf676e6f42457707d39181181d
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:15:40+01:00

Commit Message:
LIBRETRO: improve home path selection for win

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


diff --git a/backends/platform/libretro/src/libretro-fs.cpp b/backends/platform/libretro/src/libretro-fs.cpp
index 8518e847c32..1934c21995f 100644
--- a/backends/platform/libretro/src/libretro-fs.cpp
+++ b/backends/platform/libretro/src/libretro-fs.cpp
@@ -242,16 +242,22 @@ bool assureDirectoryExists(const Common::String &dir, const char *prefix) {
 
 Common::String LibRetroFilesystemNode::getHomeDir(void) {
 	Common::String path;
-#if defined(__WIN32)
-	const char *c_homeDriveDir = getenv("HOMEDRIVE");
-	const char *c_homePathDir = getenv("HOMEPATH");
-	char c_homeDir[strlen(c_homeDriveDir) + strlen(c_homePathDir) + 1] = {0};
-	strcat(strcat(c_homeDir, c_homeDriveDir), c_homePathDir);
+	const char *home = nullptr;
+
+#ifdef _WIN32
+	const char *drv = getenv("HOMEDRIVE");
+	const char *pth = getenv("HOMEPATH");
+	if (drv && *drv && pth && *pth) {
+		Common::String s = Common::String(drv);
+		s += pth;
+		return s;
+	}
 #else
-	const char *c_homeDir = getenv("HOME");
+	home = getenv("HOME");
 #endif
-	if (c_homeDir && *c_homeDir)
-		path = c_homeDir;
+
+	if (home && *home)
+		path = home;
 
 	return path;
 }


Commit: e17c40f59f339b5a14e98b84eaf7782c985658d5
    https://github.com/scummvm/scummvm/commit/e17c40f59f339b5a14e98b84eaf7782c985658d5
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:15:54+01:00

Commit Message:
LIBRETRO: JANITORIAL: fix typo in log

Changed paths:
    backends/platform/libretro/src/libretro-options-widget.cpp


diff --git a/backends/platform/libretro/src/libretro-options-widget.cpp b/backends/platform/libretro/src/libretro-options-widget.cpp
index 863686ea923..bb9880c406b 100644
--- a/backends/platform/libretro/src/libretro-options-widget.cpp
+++ b/backends/platform/libretro/src/libretro-options-widget.cpp
@@ -149,7 +149,7 @@ bool LibretroOptionsWidget::generatePlaylist(Common::String playlistPath) {
 	RFILE *playlistFile = filestream_open(Common::String(playlistPath + "/" + CORE_NAME + ".lpl").c_str(), RETRO_VFS_FILE_ACCESS_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE);
 	if (!playlistFile) {
 		_playlistStatus->setLabel(_("Failed, can't access playlist file"));
-		retro_log_cb(RETRO_LOG_ERROR, "Failed to access playlst file at '%s'.\n", Common::String(playlistPath + CORE_NAME + ".lpl").c_str());
+		retro_log_cb(RETRO_LOG_ERROR, "Failed to access playlst file at '%s'.\n", Common::String(playlistPath +  "/" + CORE_NAME + ".lpl").c_str());
 		return false;
 	} else
 		retro_log_cb(RETRO_LOG_INFO, "Playlist file created in '%s'.\n", Common::String(playlistPath + CORE_NAME + ".lpl").c_str());


Commit: 8041c9a9b5793a10dd48944f2ea8a26f7dbdcd10
    https://github.com/scummvm/scummvm/commit/8041c9a9b5793a10dd48944f2ea8a26f7dbdcd10
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:16:07+01:00

Commit Message:
LIBRETRO: fix clamp to screen res

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


diff --git a/backends/platform/libretro/src/libretro-os-inputs.cpp b/backends/platform/libretro/src/libretro-os-inputs.cpp
index 745ace09d01..c4815db8bf9 100644
--- a/backends/platform/libretro/src/libretro-os-inputs.cpp
+++ b/backends/platform/libretro/src/libretro-os-inputs.cpp
@@ -55,7 +55,7 @@ void OSystem_libretro::updateMouseXY(float deltaAcc, float *cumulativeXYAcc, int
 		// Set mouse position
 		*mouseXY += cumulativeXYAcc_int;
 		*mouseXY = (*mouseXY < 0) ? 0 : *mouseXY;
-		*mouseXY = (*mouseXY >= screen_wh) ? screen_wh : *mouseXY;
+		*mouseXY = (*mouseXY >= screen_wh) ? (screen_wh ? screen_wh - 1 : 0) : *mouseXY;
 		// Update accumulator
 		*cumulativeXYAcc -= (float)cumulativeXYAcc_int;
 	}


Commit: 43417bd5fb1cb83d67590769d6ad4c5498bd9d5a
    https://github.com/scummvm/scummvm/commit/43417bd5fb1cb83d67590769d6ad4c5498bd9d5a
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2026-01-03T10:16:23+01:00

Commit Message:
LIBRETRO: enable mpeg2 dep games

Changed paths:
    backends/platform/libretro/Makefile.common
    backends/platform/libretro/dependencies.mk


diff --git a/backends/platform/libretro/Makefile.common b/backends/platform/libretro/Makefile.common
index 7d00c280861..b2cc7555a6a 100644
--- a/backends/platform/libretro/Makefile.common
+++ b/backends/platform/libretro/Makefile.common
@@ -136,7 +136,7 @@ else
 DEFINES += -DUSE_IMGUI
 endif
 
-USE_MPEG2         ?= 0
+USE_MPEG2         ?= 1
 UNAVAILABLE_DEPS += $(call check_deps_availability, $(USE_MPEG2), component_mpeg2)
 ifneq ($(USE_MPEG2),1)
 USE_MPEG2=
diff --git a/backends/platform/libretro/dependencies.mk b/backends/platform/libretro/dependencies.mk
index 448115e9001..20e8619c83e 100644
--- a/backends/platform/libretro/dependencies.mk
+++ b/backends/platform/libretro/dependencies.mk
@@ -7,7 +7,7 @@ DEPS_SUBMODULES             := libretro-deps libretro-common
 
 DEPS_FOLDER_libretro-deps   := libretro-deps
 DEPS_URL_libretro-deps      := https://github.com/libretro/libretro-deps
-DEPS_COMMIT_libretro-deps   := f39fbf0707b02486f1cce42ab9bca019b2fb7a7d
+DEPS_COMMIT_libretro-deps   := a2a865e74f58035c416a0c63be5772fdcf35b071
 
 DEPS_FOLDER_libretro-common := libretro-common
 DEPS_URL_libretro-common    := https://github.com/libretro/libretro-common
@@ -580,6 +580,54 @@ OBJS_DEPS += $(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/fribidi/fribidi-arabic.o
 endif
 endif
 
+######################################################################
+# libmpeg2 settings
+######################################################################
+
+ifeq ($(USE_MPEG2), 1)
+DEFINES += -DUSE_MPEG2
+this_lib_subpath :=
+this_lib_header  := mpeg2dec/mpeg2.h
+this_lib_flags   := -lmpeg2
+include $(ROOT_PATH)/sharedlib_test.mk
+ifneq ($(this_lib_available), yes)
+INCLUDES += \
+	-I$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/include \
+	-I$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/include/mpeg2dec \
+	-I$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2
+OBJS_DEPS += \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/alloc.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/header.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/decode.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/slice.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/motion_comp.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/idct.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/cpu_accel.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/cpu_state.o
+
+# --- Optional accelerations --------------
+# x86/x64 -> MMX
+ifneq ($(findstring x86,$(platform))$(findstring x64,$(platform)),)
+OBJS_DEPS += \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/motion_comp_mmx.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/idct_mmx.o
+endif
+
+# PowerPC (PS3/PSL1GHT) -> AltiVec/VMX
+ifneq ($(findstring ps3,$(platform))$(findstring psl1ght,$(platform)),)
+OBJS_DEPS += \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/motion_comp_altivec.o \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/idct_altivec.o
+endif
+
+# ARM families (rpi*, libnx, ios/tvos, vita, ctr, miyoo/miyoomini)
+ifneq ($(findstring rpi,$(platform))$(findstring armv7,$(platform))$(findstring armv8,$(platform))$(findstring libnx,$(platform))$(findstring ios,$(platform))$(findstring tvos,$(platform))$(findstring vita,$(platform))$(findstring ctr,$(platform))$(findstring miyoo,$(platform))$(findstring miyoomini,$(platform)),)
+OBJS_DEPS += \
+	$(DEPS_PATH)/$(DEPS_FOLDER_libretro-deps)/libmpeg2/libmpeg2/motion_comp_arm.o
+endif
+endif
+endif
+
 ######################################################################
 # libcurl settings
 ######################################################################




More information about the Scummvm-git-logs mailing list