From 393e1b4b9863a2f9e00fedebf26303fd530b8ca8 Mon Sep 17 00:00:00 2001 From: BinBashBanana <51469593+BinBashBanana@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:15:50 -0700 Subject: [PATCH] Fixes for #17750 --- CHANGES.md | 3 +++ config.def.h | 2 +- pkg/emscripten/libretro-thread/libretro.worker.js | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 97d9a4d711..d114c9b52f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,9 @@ - CLOUDSYNC: Handle ignored directories properly - EMSCRIPTEN: Scale window to correct size - EMSCRIPTEN: Additional platform functions +- EMSCRIPTEN: Add new default video context driver: emscriptenwebgl_ctx +- EMSCRIPTEN: Add new audio driver: AudioWorklet +- EMSCRIPTEN: Add new modernized web player which will eventually replace the existing one - EMSCRIPTEN/RWEBINPUT: Add touch input support - GENERAL: Fix save state auto increment - GENERAL: Fix softpatching with periods/dots in the file name diff --git a/config.def.h b/config.def.h index 2e36cc09a3..5f9814a532 100644 --- a/config.def.h +++ b/config.def.h @@ -1174,7 +1174,7 @@ /* Desired audio latency in milliseconds. Might not be honored * if driver can't provide given latency. */ -#if defined(ANDROID) || defined(EMSCRIPTEN) || defined(RETROFW) || defined(MIYOO) +#if defined(ANDROID) || defined(RETROFW) || defined(MIYOO) || (defined(EMSCRIPTEN) && !defined(HAVE_AUDIOWORKLET)) /* For most Android devices, 64ms is way too low. */ #define DEFAULT_OUT_LATENCY 128 #define DEFAULT_IN_LATENCY 128 diff --git a/pkg/emscripten/libretro-thread/libretro.worker.js b/pkg/emscripten/libretro-thread/libretro.worker.js index eee8dacaeb..881ed8f705 100644 --- a/pkg/emscripten/libretro-thread/libretro.worker.js +++ b/pkg/emscripten/libretro-thread/libretro.worker.js @@ -140,7 +140,11 @@ FS.rm = async function() { const child = path.substr(dir_end + 1); const parent_dir = await getDirHandle(parent); if (!parent_dir) continue; - await parent_dir.removeEntry(child, {recursive: true}); + try { + await parent_dir.removeEntry(child, {recursive: true}); + } catch (e) { + continue; + } } }