From 6517f50f5348ac6d2db74e47249a432d7d2ccd63 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 11:38:49 +0000 Subject: [PATCH 1/4] Fix Windows libretro_flash externals and Emscripten jpeglib include - Uncomment src/swf_parser.cpp, src/avm2_vm.cpp, and src/display_list.cpp in libretro_flash target to resolve 17 unresolved externals on Windows (MSVC). - Add -sUSE_LIBJPEG=1 and -sUSE_ZLIB=1 compile options to gameswf_core in EMSCRIPTEN block so jpeglib.h can be found at compile time. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com> --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2ac7e8..c106d7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,6 +272,11 @@ if(EMSCRIPTEN) TU_CONFIG_LINK_TO_JPEGLIB=1 TU_CONFIG_LINK_TO_ZLIB=1 ) + + target_compile_options(gameswf_core PRIVATE + "-sUSE_LIBJPEG=1" + "-sUSE_ZLIB=1" + ) endif() # Target 1: Libretro Core Shared Library @@ -279,11 +284,11 @@ add_library(libretro_flash SHARED src/core_stub.cpp src/gameswf_render_wasm.cpp src/gameswf_tu_file_mem.cpp - # src/swf_parser.cpp + src/swf_parser.cpp # src/abc_parser.cpp src/input_manager.cpp - # src/avm2_vm.cpp - # src/display_list.cpp + src/avm2_vm.cpp + src/display_list.cpp src/audio_mixer.cpp src/audio_stream_decoder.cpp src/vector_rasterizer.cpp From c87b435de126e7ef864d7f3f3d0a6893ac741448 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 11:49:55 +0000 Subject: [PATCH 2/4] Fix Windows libretro_flash externals and Emscripten jpeglib compile flags - Uncomment src/swf_parser.cpp, src/avm2_vm.cpp, and src/display_list.cpp in libretro_flash target to resolve 17 unresolved externals on MSVC/Windows. - Add -sUSE_LIBJPEG=1 and -sUSE_ZLIB=1 compile options to gameswf_core in EMSCRIPTEN block so jpeglib.h can be found at compile time. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com> From 880cce10c6e4eaab876afd6deb20d46fa01cc7ac Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 12:00:17 +0000 Subject: [PATCH 3/4] Fix Windows libretro_flash externals and Emscripten jpeglib interface options - Uncomment src/swf_parser.cpp, src/avm2_vm.cpp, and src/display_list.cpp in libretro_flash target to resolve unresolved externals on MSVC/Windows. - Add INTERFACE compile and link options (-sUSE_LIBJPEG=1 and -sUSE_ZLIB=1) to gameswf_core in the EMSCRIPTEN block so all dependent targets (such as test_wasm_api) properly compile and link against Emscripten's libjpeg and zlib. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com> --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c106d7d..5252225 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,10 +273,18 @@ if(EMSCRIPTEN) TU_CONFIG_LINK_TO_ZLIB=1 ) + target_compile_options(gameswf_core INTERFACE + "-sUSE_LIBJPEG=1" + "-sUSE_ZLIB=1" + ) target_compile_options(gameswf_core PRIVATE "-sUSE_LIBJPEG=1" "-sUSE_ZLIB=1" ) + target_link_options(gameswf_core INTERFACE + "-sUSE_LIBJPEG=1" + "-sUSE_ZLIB=1" + ) endif() # Target 1: Libretro Core Shared Library From fb03834c201128367d633a8e5a142dae293eade8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 12:07:33 +0000 Subject: [PATCH 4/4] Fix Windows libretro_flash externals and Emscripten jpeglib interface options - Uncomment src/swf_parser.cpp, src/avm2_vm.cpp, and src/display_list.cpp in libretro_flash target to resolve unresolved externals on MSVC/Windows. - Add INTERFACE compile and link options (-sUSE_LIBJPEG=1 and -sUSE_ZLIB=1) to gameswf_core in EMSCRIPTEN block so all dependent targets (such as test_wasm_api) compile and link against Emscripten's libjpeg/zlib. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>