Commit Graph
48804 Commits
Author SHA1 Message Date
Henrik Rydgård df4ea65ee6 Merge pull request #22540 from hrydgard/ci-tests-in-build
CI: Run tests in the build jobs, fix ccache eviction, fewer macOS jobs
2026-10-13 11:16:43 +02:00
Henrik RydgårdandClaude Opus 5.5 fd79fb0007 Revert "CI: Cancel a PR's running builds when it gets a new push"
Cancelled runs show as failures on their commits, and PRs rarely get
pushed to often enough for it to pay off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:51:24 +02:00
Henrik RydgårdandClaude Opus 5.5 39f4d64abc CI: Suppress the MINGW64/MINGW32 deprecation warnings
Only make and bash come from MSYS2 in the libretro Windows builds, the compiler
is MSVC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:48:50 +02:00
Henrik RydgårdandClaude Opus 5.5 4bdfb8604c CI: Only check out the FFmpeg libraries each build uses
FFmpeg has prebuilt libraries for every platform, 1.5 GB, and every job checked
all of it out, taking 2-3 minutes. checkout-submodules.sh fetches the other
submodules as before, and FFmpeg as a partial clone with a sparse checkout of
the given folders, plus the source headers since some builds have the ffmpeg
folder on the include path. A Linux x86-64 build gets 67 MB. Alpine, which
builds FFmpeg itself, gets the sources and none of the libraries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:47:22 +02:00
Henrik Rydgård d726e736d5 Merge pull request #22539 from hrydgard/validate-ge-dump-commands
GE dump playback: Validate commands, clamp writes, bound allocations
2026-10-13 10:37:55 +02:00
Henrik RydgårdandClaude Opus 5.5 11d16ece2d CI: Build the iOS and tvOS libretro cores in one job
Only five macOS jobs run at once, and with six, one waited about ten minutes
for a runner. The two builds take under five minutes each, a separate job
mostly added another checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:35:21 +02:00
Henrik RydgårdandClaude Opus 5.5 5866231f66 CI: Cache the FFmpeg that the Alpine job builds
Keyed on the FFmpeg submodule, its build script and the Alpine release. Saves
the 3.3 minutes it took to compile it every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:32:40 +02:00
Henrik RydgårdandClaude Opus 5.5 39321af847 CI: Cancel a PR's running builds when it gets a new push
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:10:12 +02:00
Henrik RydgårdandClaude Opus 5.5 3ad5657ff4 CI: Only save ccache on master, cap the AppImage one
The Actions cache was full (10 GB), mostly with caches saved by PR runs that only
that PR could restore, and the AppImage ccache had no size limit. Master's got
evicted, so even master builds found no cache and hit 0.3% of the time. PRs
still restore master's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:10:11 +02:00
Henrik RydgårdandClaude Opus 5.5 6cc7d848a1 CI: Run the tests in the build jobs that build them
The test job needed the whole build matrix, so it only started once the slowest
build was done, though it only used three of its artifacts. Running the tests
right after those three builds also saves the artifact download and a second
round of package installs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:07:16 +02:00
Henrik RydgårdandClaude Opus 5.5 ec76a4d56e GE dump playback: Refuse sections over 1 GB
A zstd frame doesn't always declare its size, and a small one can expand to
gigabytes, so this is the limit that keeps a crafted dump from exhausting
memory. The largest section in the 1042-dump test set is 82 MB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:05:35 +02:00
Henrik Rydgård f8c1e39315 Merge pull request #22535 from hrydgard/tvos-support
Apple tvOS support prototype (and CI)
2026-10-13 10:03:15 +02:00
Henrik RydgårdandClaude Opus 5.5 9c2cf98b84 GE dump playback: Clamp the remaining writes, bound the loader's allocations
Follows up the command range validation:
- Don't require anything of the data commands' sizes or alignment. Version 2
  dumps have empty VERTICES and CLUT commands, and old recorders didn't align
  anything. Registers() drops a trailing partial word instead.
- Split register blocks bigger than the list buffer, which they overran.
- Clamp MEMCPYDATA and MEMSET to valid memory. Only their start was checked.
- Check the compressed sizes against the file, and the decompressed sizes
  against what the frame declares, before allocating. Some version 5 dumps
  leave the size out of the zstd frame; those are checked after decompressing.
- Don't let a large FRAMEBUF size wrap around in MarkNeededTargets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:01:29 +02:00
Henrik Rydgård db8a749536 Merge pull request #22538 from hrydgard/ui-focus-beam
UI: Switch to a much nicer "beam algorithm" for kb/controller UI navigation
2026-10-13 09:41:24 +02:00
Henrik RydgårdandClaude Opus 5.5 625db43746 tvOS: Back on the main screen goes to the home screen, like on Android
tvOS only does that with a Back press it gets to see, so the view controller
lets controller events through to UIKit while the top screen is top level
(the new TOP_LEVEL_CHANGED notification), and passes presses that aren't
keyboard keys on to super. Elsewhere Back stays ours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:29:26 +02:00
Acts1631 80b813f507 Validate GE replay commands before execution
Crafted ppdmp command ranges can extend past the decompressed push
buffer. Frame buffer playback can then copy adjacent host heap data
into emulated VRAM, exposing process memory through rendered output.

Validate each command's type, range, and minimum payload size before
constructing the replay executor.
2026-10-13 09:21:14 +02:00
Henrik Rydgård 76d86d8b9d Merge pull request #22537 from acts-1631/validate-stripped-zip-paths
Validate ZIP paths after stripping their common prefix
2026-10-13 09:18:59 +02:00
Acts1631 8220a0f855 Validate ZIP paths after stripping their common prefix
ExtractZipContents checked each archive path for parent components
before removing stripChars. A name could become ../ only after
stripping and escape the install directory, allowing a crafted archive
to overwrite files in sibling PSP directories.

Validate both archive and output paths, and apply stripping consistently
when checking for overwrites.
2026-10-12 22:17:53 -04:00
Henrik RydgårdandClaude Opus 5.5 31918b8636 UI: Arrow key focus moves by beam and edge distance
Replaces the center-to-center scoring, which skipped a wide view between narrow
ones, since its center is far away even when its edge is right there. Now it
works like Android's FocusFinder: only views in the direction of the move are
candidates, ones in the origin's beam beat ones off to the side (going up or
down, unless those are in a nearer row), and otherwise the nearest wins, with
distance along the move weighted 13 times distance across it. Unlike Android,
the distance across is to the candidate's nearest edge rather than its center.

First/last and page moves keep their scoring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:31:07 +02:00
Henrik RydgårdandClaude Opus 5.5 5b05b34b4e tvOS: Fewer ifdefs, capability checks instead
The Siri Remote setup builds on iOS too, the device type comes from the
interface idiom, and requests for things the platform says it lacks are
refused by checking the property. What's left ifdeffed is API tvOS doesn't
have at all. Reports say tvOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:21:14 +02:00
Henrik RydgårdandClaude Opus 5.5 5ce0eb58fd tvOS: Layered app icon and Top Shelf images
Generated from the iOS icon art by ios/generate_tvos_icons.py: the logo floats
over the background for the parallax effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:11:55 +02:00
Henrik RydgårdandClaude Opus 5.5 7315c0392c Games tab: Hide the browse button where there's no folder browser (tvOS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:03:37 +02:00
Henrik RydgårdandClaude Opus 5.5 9512d619da tvOS: Read the Siri Remote's ring buttons, memstick in Caches/PPSSPP
The 2nd generation remote's ring has real direction buttons and a center
button, which take GCSupportsMultipleMicroGamepads. Its buttonA is pressed
along with all of them, which gave stray enters. Swiping is off for now, it
fought with the ring. The memory stick moves into a folder of its own, out
of the way of what the system keeps in Caches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:59:30 +02:00
Henrik RydgårdandClaude Opus 5.5 56c522260e tvOS: Usable remote, smaller UI, keep file browsing in the container
Tested on an Apple TV 4K. The micro gamepad's dpad buttons flicker with every
wobble on the touch surface, so read the finger position instead: swipes step
once per fixed distance, and clicks are arrows at the edges and enter in the
middle. The UI scale now matches a 1080p Android TV (320 dpi). b-tvos.sh
can sign, install and launch on a device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:52:48 +02:00
Henrik RydgårdandClaude Opus 5.5 b58dd17c2e iOS: Show paths in the app's container as ~/...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:52:48 +02:00
Henrik RydgårdandClaude Opus 5.5 bfdf532965 CI: Build the tvOS app and the iOS and tvOS libretro cores
Adds b-tvos.sh and b.sh --tvos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:15:41 +02:00
Henrik RydgårdandClaude Opus 5.5 3a8a1799ee Add a tvOS build of the app
Shares the iOS frontend, with camera, location, motion, photo/document
pickers, share sheet, clipboard, microphone, battery and rotation compiled
out. The view controller is a GCEventViewController, so controllers only
reach us through GCController, and the Siri Remote is read as a micro
gamepad and sent as arrow/enter/escape/back keys. tvOS has no persistent
storage besides NSUserDefaults, so the memory stick lives in Caches for now.

Configure with -DIOS_PLATFORM=TVOS. The MoltenVK submodule gets the tvOS
slice from the same stock v1.4.2 release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:06:55 +02:00
Henrik RydgårdandClaude Opus 5.5 20d1a58806 CMake: Only build FreeType along with AtlasTool, its only user
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:06:09 +02:00
Henrik RydgårdandClaude Opus 5.5 7c9765d02c Add PPSSPP_PLATFORM(TVOS), skip sigaltstack on tvOS
tvOS doesn't have sigaltstack, which broke the libretro tvOS build. The
exception handler now runs on the faulting thread's stack there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 00:42:33 +02:00
Henrik Rydgård dd6bd1a53d Merge pull request #22529 from hrydgard/android-hidden-bar-insets
Android: Don't leave room for system bars we have hidden
2026-10-12 21:59:03 +02:00
Henrik Rydgård 503b36bf5a Merge pull request #22531 from hrydgard/libchdr-no-warnings
Windows: Turn off annoying compiler warnings in dependencies
2026-10-12 21:58:52 +02:00
Henrik Rydgård fe018ee1e9 Merge pull request #22533 from hrydgard/search-backspace-utf8
Type-to-search: UTF-8 character support, ignore § and other Latin-1 symbols
2026-10-12 21:58:40 +02:00
Henrik Rydgård 4a00ee7667 Merge pull request #22532 from hrydgard/mac-drag-drop
SDL: Boot a file dropped onto the window
2026-10-12 21:58:27 +02:00
Henrik RydgårdandClaude Opus 5.5 671b6ce397 Type-to-search: Backspace removes a whole UTF-8 character, ignore § and other Latin-1 symbols
Backspace popped a single byte, leaving half of a multi-byte character behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:30:32 +02:00
Henrik Rydgård 4c48f85664 Merge pull request #22527 from hrydgard/vulkan-prerotate-270
Android: Pre-rotate reverse landscape on Vulkan again, fix insets for hidden bars
2026-10-12 19:45:55 +02:00
Henrik Rydgård b947316f4b Merge pull request #22528 from hrydgard/darwin-memory-reserve
Darwin: Reserve space for the memory views instead of probing for it
2026-10-12 19:45:43 +02:00
Henrik RydgårdandClaude Opus 5.5 ac8b4c31b3 SDL: Boot a file dropped onto the window
SDL3's Cocoa window already accepts file drags (as do the other SDL
video drivers), we just never handled SDL_EVENT_DROP_FILE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:41:38 +02:00
Henrik RydgårdandClaude Opus 5.5 b230f0f7ca Windows: Turn off warnings for libarmips and glslang
Same as libchdr: they're submodules we don't patch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 19:27:19 +02:00
Henrik RydgårdandClaude Opus 5.5 b8dfcef597 Windows: Turn off warnings for libchdr
It's a submodule we don't patch, and at /W4 it produced a wall of
conversion warnings in every build.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 19:25:26 +02:00
Henrik RydgårdandClaude Opus 5.5 60c06d4f03 Darwin: Reserve space for the memory views instead of probing for it
On iOS, the base search stepped up from 0x100000000 in 8MB increments,
right through the app's binary and early heap: about 100 failed
vm_remaps (each logged twice) every time a game started. On macOS,
Find4GBBase freed its probe allocation before the views were mapped.

Now the kernel picks a free range of exactly the span the views need,
which stays reserved and inaccessible, and the views are mapped over it
with VM_FLAGS_OVERWRITE. One try, no race, and the gaps between views
fault. Unmasked (macOS), ask for 4GB alignment first, which lets the
ARM64 JIT pointerify. The old search remains as a fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:08:03 +02:00
Henrik RydgårdandClaude Opus 5.5 4daa789c5e MemMap: Fix the view index in Memory_TryBase's cleanup loop
It checked views[i], the view that failed, instead of views[j], so after
a failed try it could release views it should skip, or skip ones it
should release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:08:03 +02:00
Henrik RydgårdandClaude Opus 5.5 3afb17f7d4 Android: Don't leave room for system bars we hid
Before Android 11, decorFitsSystemWindows(false) sets LAYOUT_STABLE, and
the system bar insets then keep the space of hidden bars. So in
landscape, where the status bar is always hidden, the UI had an empty
band at the top (seen on a Galaxy S8 and a Pocophone F1). Count only
the bars we show, and reapply the insets after changing that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:59:06 +02:00
Henrik RydgårdandClaude Opus 5.5 09e9c0176b Fix the scissor clamp for 90 and 270 degree pre-rotation
With 270 degree pre-rotation, the rotated y runs along the physical
height, but was clamped to the physical width, so scissors on the left
of the screen moved. This was #15773, which got that pre-rotation
disabled. The 90 degree case had the bounds swapped too, but only too
loose there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:59:06 +02:00
Henrik RydgårdandClaude Opus 5.5 0886063fba Vulkan: Pre-rotate reverse landscape again
The 270 degree pre-rotation was disabled in e6b7817cc6 for #15773 (UI
disappearing in reverse landscape on a Poco X3 Pro), which left reverse
landscape to the compositor, and every present returning SUBOPTIMAL. Try
it again: rotation is handled in place now, and the stale extent after a
rotation is fixed, so it needs retesting on Adreno.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:59:06 +02:00
Henrik RydgårdandClaude Opus 5.5 0b6ffd7c5e Android: Don't leave room for system bars we hid
Before Android 11, decorFitsSystemWindows(false) sets LAYOUT_STABLE, and
the system bar insets then keep the space of hidden bars. So in
landscape, where the status bar is always hidden, the UI had an empty
band at the top (seen on a Galaxy S8 and a Pocophone F1). Count only
the bars we show, and reapply the insets after changing that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:56:07 +02:00
Henrik Rydgård b419238f81 Merge pull request #22526 from hrydgard/crash-review-jni-ui
Claude code review: Fix crashes in the Android JNI layer and UI screen lifetimes
2026-10-12 18:17:01 +02:00
Henrik Rydgård 54d2f7efe1 Merge pull request #22522 from hrydgard/resync-gamecontrollerdb
Re-sync gamecontrollerdb.txt with SDL_GameControllerDB, add a sync script
2026-10-12 17:34:51 +02:00
Henrik RydgårdandClaude Opus 5.5 866cf89b65 Make the resized flag atomic
On Android it's set on the Java UI thread right after writing g_display,
and read on the render thread, which then copies the dp size into the UI
bounds just once. With a plain bool the render thread could see the flag
before the new size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:22:41 +02:00
Henrik RydgårdandClaude Opus 5.5 f7ec86c5d5 Android Vulkan: Don't trust a stale surface extent after a rotation
Since rotation is handled in place, the swapchain is recreated right
after surfaceChanged, and the surface can still report the previous
orientation's extent. On a Galaxy S8+ this happened in about one in four
rotations, leaving a portrait swapchain on a landscape window or the
other way around, squashed into half the screen until the next rotation.

If the extent is exactly the window size transposed, use the window size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:22:41 +02:00
Henrik Rydgård 7bef6ccdda Merge pull request #22524 from LunaMoo/GOWpatchfix
Fix gow vortex patch by making sure changed register value get's used
2026-10-12 17:13:53 +02:00