Commit Graph
46571 Commits
Author SHA1 Message Date
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
Henrik Rydgård 32f975ef85 Windows: Move the graphics context creation to main.cpp 2026-07-21 13:13:01 +02:00
Henrik Rydgård cc69070f19 Remove MainThread_Start/Stop to increase visibility 2026-07-21 12:58:45 +02:00
Henrik Rydgård 221aba92da Move EmuThread.cpp/h to Core, in preparation for sharing logic 2026-07-21 12:50:22 +02:00
Henrik Rydgård 16c7ec390f Headless: Start taking logic out of the "HeadlessHost"
Also update some agent files
2026-07-21 11:01:48 +02:00
Henrik Rydgård 8666a3cd57 Add resolution scale parameter to headless 2026-07-20 21:40:14 +02:00