Commit Graph
46576 Commits
Author SHA1 Message Date
Henrik Rydgård c8c20985a9 Bump FFMPEG to fix x86-64 2026-07-24 21:15:45 +02:00
Henrik RydgårdandClaude Sonnet 5 e8f85f7804 Fix missing zstd include/link deps in Common and basis_universal
Common and basis_universal call zstd functions directly but never
declared the dependency after being split into their own
CMakeLists.txt files, relying on directory-scope include_directories()
that no longer reached them. Worked on Linux via system zstd.h, but
broke the Android NDK build which has no such fallback.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMv4XdM5dThs9Avr5FPXRv
2026-07-24 20:49:29 +02:00
Henrik RydgårdandClaude Sonnet 5 bb6164e799 Move ten inline vendor libraries out of root CMakeLists.txt into ext/
gason, vma, cityhash, 7zip (ext/lzma-sdk), basis_universal, pugixml,
kirk (ext/libkirk), sfmt19937, xbrz, and xxhash were each defined with
a small add_library() block directly in the root CMakeLists.txt, even
though ext/CMakeLists.txt already exists and handles every other vendor
library (freetype, imgui, naett, discord-rpc, libchdr, zstd, miniupnp,
armips, glew, snappy, ...) via add_subdirectory(). Gave each one its
own ext/<name>/CMakeLists.txt to match that established pattern; xxhash
stays a loose file pair in ext/ (it never had its own directory) so its
add_library() lives directly in ext/CMakeLists.txt instead.

ext/libkirk/CMakeLists.txt already existed but was dead - nothing
add_subdirectory()'d it, and its source list was stale (missing
amctrl.c/.h, which the live inline definition in root had). Replaced
its contents with the current, correct list instead of leaving two
diverging definitions around.

Dropped several target_include_directories()/include_directories()
calls that came along with these (e.g. cityhash, kirk, xbrz, xxhash,
and the lzma-sdk one for 7zip): traced their actual consumers and found
each library's own sources resolve their sibling headers via the
default same-directory quote-include rule, and every external consumer
already uses the full "ext/<name>/..." path resolved through the global
root include - so these were dead weight regardless of position.

Replaced two single-value alias variables (LIB7ZIP_LIBRARY, always
"7zip"; BASISU_LIBRARIES, always "basis_universal") with their target
names directly in Common/CMakeLists.txt, rather than trying to carry
them across the new add_subdirectory boundary - plain set() variables
don't propagate back up out of a child scope without PARENT_SCOPE, so
keeping them as-was would have silently broken Common's link line.

Verified with a fully clean rebuild (removed build/ entirely), a
HEADLESS=ON UNITTEST=ON build, and a LIBRETRO=ON build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00
Henrik RydgårdandClaude Sonnet 5 ae9060d501 Extract UI into its own CMakeLists.txt
Same treatment as Common/Core/GPU: move the ppsspp_ui target definition
(kept that name rather than renaming to "UI", since it was deliberately
named that in a previous commit) into UI/CMakeLists.txt, pulled in via
add_subdirectory(UI). Source paths are now relative to UI/ instead of
prefixed with "UI/".

PPSSPPHeadless and PPSSPPUnitTest already didn't link ppsspp_ui (they
link Core/Common directly) - that's unchanged, just preserved. The main
per-platform binaries (${TargetBin}) and the Android JNI target keep
linking it as before.

add_compile_definitions(USE_DISCORD=1) has to stay in the root file
rather than move into UI/CMakeLists.txt: it only affects targets created
after the call, and add_subdirectory() snapshots the parent's directory
scope at the point it's invoked, so the definition needs to already be
set before add_subdirectory(UI) runs. Verified UI/DiscordIntegration.cpp
still pulls in Discord_Initialize etc as undefined symbols post-move.

Also removed two now-dead variable inits sitting right next to this
block: "nativeExtra" (never appended to or consumed anywhere anymore,
a leftover from before the old "native" target was removed) and a
duplicate early set(UISource) (the real one now lives inside
UI/CMakeLists.txt's own scope).

Verified with a clean ./b.sh --debug rebuild, a HEADLESS=ON UNITTEST=ON
build (confirmed ppsspp_ui/UI never gets built in that configuration),
and a LIBRETRO=ON build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00
Henrik RydgårdandClaude Sonnet 5 688eb99a53 Fix miniUPnPc add_compile_definitions ordering in Core/CMakeLists.txt
Same class of bug as the USE_DISCORD fix: add_compile_definitions() only
affects targets created after the call, but the whole USE_MINIUPNPC block
sat after add_library(Core STATIC ...). That meant Core/Util/PortManager.cpp,
built as part of that same add_library call, never actually saw WITH_UPNP
or any of the other miniupnpc defines - UPnP support was silently compiled
out on every platform.

Split the block: compile definitions and the miniupnpc source-file/include
setup now run before add_library(Core STATIC ...), while building the
bundled miniupnpc target and linking it into Core (which needs the Core
target to already exist) stays after, in its original spot.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00
Henrik RydgårdandClaude Sonnet 5 abe6786ae1 Rename core to Core and extract it and GPU into their own CMakeLists.txt
Mirrors the earlier Common extraction. The old "core" target folded in
all of GPU/ (~200 files) plus a few ext/ files wholesale; Windows
already treats GPU as its own project (GPU.vcxproj), so GPU/CMakeLists.txt
splits that out too. GPU has a genuine two-way dependency with Core
(Core/System.cpp calls GPU_Init(), GPU/* calls back into Core for
Memory/Config/CoreTiming/etc), so GPU is a CMake OBJECT library: its
object files are always included wherever consumed instead of being
lazily pulled from an archive, avoiding the GNU ld single-pass
archive-ordering problem a two-way STATIC dependency would hit.

Also fixed a few library misattributions discovered while tracing what
each file actually uses:
- GlslangLibs (glslang/spirv-cross) moved from Core to Common, since
  it's Common/GPU/ShaderTranslation.cpp and VulkanContext.cpp that
  call into it directly. It only worked before because Core happened
  to always be linked after Common.
- ZSTD and OPENGL_LIBRARIES/X11_LIBRARIES moved from Core to GPU,
  matching where they're actually called (GPU/Debugger/Record.cpp and
  Playback.cpp for ZSTD, GPU/GLES for raw gl*() calls).
- GPU also needs Ext::Snappy directly (Playback.cpp calls
  snappy_uncompress) and the libretro-common include dir under
  LIBRETRO, both previously inherited for free by accident.

Also fixed USE_DISCORD's add_compile_definitions ordering: it was
being defined after ppsspp_ui's add_library call, so the UI target
never actually saw it on non-MSVC platforms.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00
Henrik RydgårdandClaude Sonnet 5 b2d375f2e5 Extract Common into its own CMakeLists.txt
First step of breaking up the monolithic root CMakeLists.txt: move the
add_library(Common STATIC ...) target definition, and every scattered
target_link_libraries/target_compile_definitions/target_include_directories
call touching it, into Common/CMakeLists.txt, pulled in via
add_subdirectory(Common).

Source paths are now relative to Common/ instead of prefixed with
"Common/". The two files living outside that directory (ext/jpge/*)
use ${CMAKE_SOURCE_DIR}/... instead.

include_directories(Common) stays in the root file rather than moving
into Common/CMakeLists.txt: it's a directory-scope command that needs
to affect targets defined *later* in the root file, and add_subdirectory
scope doesn't propagate upward or sideways, so moving it would have
silently broken unprefixed #includes elsewhere in the project.

add_subdirectory(Common) is placed at the point where the *last*
prerequisite variable it needs (PNG_LIBRARIES, RT_LIB, ATOMIC_LIB, etc.)
is guaranteed already set, not where the old add_library(Common ...)
used to start - some of those are resolved later in the file than
Common's original position was.

Verified with a clean ./b.sh --debug rebuild and a HEADLESS=ON
UNITTEST=ON reconfigure/build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00
Henrik Rydgård e9c772cb7e Merge pull request #21971 from hrydgard/android-vr-fix
Link openxr_loader into ppsspp_jni for the Android VR build
2026-07-24 20:15:38 +02:00
Henrik RydgårdandClaude Sonnet 5 4f3336016f Link openxr_loader into ppsspp_jni for the Android VR build
The Android VR build (ANDROID=true, OPENXR=TRUE) was failing to link
ppsspp_jni with undefined references to xrGetInstanceProcAddr,
xrCreateReferenceSpace, xrEnumerateViewConfigurations, etc. - all called
from Common/VR/*.cpp, which is unconditionally part of Common and always
linked into ppsspp_jni via core.

openxr_loader (built via ext/OpenXR-SDK whenever OPENXR AND NOT
ARMV7_DEVICE) was only ever being added to targetExtraLibs, which just
${TargetBin} - the desktop-style executable - consumes. ppsspp_jni,
the actual Android JNI target Gradle's CMake external native build
uses, never got it. Link it in directly, gated the same way OpenXR is
gated everywhere else in the file.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-24 19:57:57 +02:00
Henrik Rydgård 93bfd41e78 Merge pull request #21970 from hrydgard/android-buildfix
Fix Android CMakeLists.txt build
2026-07-24 17:17:15 +02:00
Henrik Rydgård 71e2a87611 Fix Android CMakeLists.txt build 2026-07-24 16:59:41 +02:00
Henrik Rydgård 7ebea84e54 Merge pull request #21960 from hrydgard/more-emuthread-work
More EmuThread/cleanup work
2026-07-24 16:00:23 +02:00
AgRichard 6cd5c535d9 Update en_US.ini
Add name to translator
2026-07-24 15:31:43 +02:00
Henrik Rydgård 85f8715660 Break the circular dependency caused by putting EmuThread in core using an interface 2026-07-24 15:31:42 +02:00
Henrik Rydgård cb1b4067f7 Small optimizations in app-android.cpp 2026-07-24 15:31:42 +02:00
Henrik Rydgård b2c5fdc39f Make EmuThreadFunc match Android's EmuThreadFunc 2026-07-24 15:31:42 +02:00
Henrik Rydgård 02017ad41e Fix name collision between functions 2026-07-24 15:31:42 +02:00
Henrik Rydgård 8b05f703a4 Clean up unused parameters 2026-07-24 15:31:42 +02:00
Henrik Rydgård 906d877019 Android: Remove some state and a race condition 2026-07-24 15:31:42 +02:00
Henrik Rydgård 86c8e9ae68 Minor code cleanup 2026-07-24 15:31:41 +02:00
Henrik Rydgård 2489f5c581 Some CMakeLists.txt reorganization, use EmuThread from SDL 2026-07-24 15:31:41 +02:00
Henrik Rydgård af7977267e Add NeedsRenderThread property to GraphicsContext 2026-07-24 15:31:41 +02:00
Henrik Rydgård 86c98c2d23 Prepare EmuThread for other users 2026-07-24 15:31:41 +02:00
Acts1631 5763a0d731 Validate ZIM image sizes before loading
Check the ZIM header, dimensions, mip count, allocation arithmetic,
and uncompressed payload size before allocating or copying image data.
This prevents crafted texture files from overflowing the image buffer.
2026-07-24 15:31:41 +02:00
Henrik Rydgård 8f91ef7500 Merge pull request #21965 from acts-1631/fix/zim-image-validation
Validate ZIM image sizes before loading
2026-07-24 15:15:31 +02:00
Henrik Rydgård dcb512d2eb Merge pull request #21963 from hrydgard/camera-request
Camera: Use the abstraction on more platforms, refactor CMakeLists.txt
2026-07-24 15:13:09 +02:00
Henrik Rydgård afe4d5beaf Buildfixes, dependency shuffling to make things more logical 2026-07-24 14:43:34 +02:00
Henrik Rydgård dd8c282a26 Add a ppsspp_ui target 2026-07-24 12:06:15 +02:00
Henrik Rydgård 733e07d581 CMakeLists.txt: Remove the confusing "native" target and reshuffle dependencies 2026-07-24 12:06:15 +02:00
Henrik Rydgård e0466dab48 Qt buildfix 2026-07-24 12:06:15 +02:00
Henrik Rydgård b9a3b322cb CMakeLists.txt: Stop using ${CoreLibName} 2026-07-24 12:06:15 +02:00
Henrik Rydgård 78c9952731 Move Qt camera code out of Core 2026-07-24 12:06:15 +02:00
Henrik Rydgård 240a974e95 Remove direct dependency from Core to MacCameraHelper.mm 2026-07-24 12:06:15 +02:00
Henrik Rydgård 6442742f00 Fix issue with insufficient zeroing of VulkanPipelineKey 2026-07-24 12:06:15 +02:00
Henrik Rydgård ea59f473f1 Merge pull request #21964 from acts-1631/fix/upload-filename-traversal
Fix upload filename traversal
2026-07-24 09:51:57 +02:00
Henrik Rydgård f1c3ba2cd5 Merge pull request #21968 from AgRichard/patch-3
Update ms_MY.ini
2026-07-24 09:35:32 +02:00
AgRichard c95fb99701 Update ms_MY.ini
All update for Malay language.
2026-07-24 14:16:37 +08:00
Acts1631 e34fe29625 Validate ZIM image sizes before loading
Check the ZIM header, dimensions, mip count, allocation arithmetic,
and uncompressed payload size before allocating or copying image data.
This prevents crafted texture files from overflowing the image buffer.
2026-07-23 15:17:11 -04:00
Acts1631 2c3437940b Fix upload filename traversal
Reject multipart filenames containing path separators before joining
them to the selected upload path. This keeps LAN upload clients
from creating files outside the selected directory.
2026-07-23 15:04:04 -04:00
Henrik Rydgård c119d9b258 Merge pull request #21962 from hrydgard/networking-crash-fix
Use new/delete properly for SceNetAdhocMatchingContext, fixing multiplayer crash
2026-07-23 12:09:23 +02:00
Henrik Rydgård a7a4c4d110 Merge pull request #21959 from mattakins/fix-ppsspp-vulkan-swapchain-capacity
Libretro: prevent Vulkan launch crashes with large swapchains
2026-07-23 11:34:54 +02:00
Henrik Rydgård 040996f185 Use new/delete properly for SceNetAdhocMatchingContext. It contains non-POD C++ objects. 2026-07-23 11:17:44 +02:00
Henrik Rydgård 8f52820b0d Add more sprite texturing fixes (Another Road, Naruto 3) 2026-07-23 11:17:14 +02:00
Henrik Rydgård 978324fea8 Merge pull request #21956 from mattakins/fix-libretro-vulkan-feature-negotiation
Libretro: fix Vulkan launch crash on Mali devices
2026-07-23 10:36:57 +02:00
Henrik Rydgård 61420477b2 Merge pull request #21958 from cscd98/libretro-fix
libretro: remove CmdLine as not used
2026-07-23 08:08:37 +02:00
Craig Carnell f1f73b0418 libretro: remove CmdLine as not used 2026-07-22 20:16:18 +01:00
Matt Akins a4f83785d9 Libretro: keep Vulkan feature setup valid
- Use VkPhysicalDeviceFeatures2 when supplied by PPSSPP
- Leave pEnabledFeatures null as Vulkan requires
2026-07-22 11:31:25 -07:00
Henrik Rydgård 23d4c27f1c Merge pull request #21953 from hrydgard/more-init-refactoring
More headless and init refactoring
2026-07-21 14:43:28 +02:00
Henrik Rydgård 00a566514e Buildfixes 2026-07-21 14:00:02 +02:00
Henrik Rydgård cb18929f3a Make EmuThread.cpp/h compile outside of Windows. 2026-07-21 13:25:31 +02:00