mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-21 12:29:43 -10:00
codex/android-native-streaming
1545
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b2e58b9389 |
rgui: draw a message box again only when it changes
With a box up, rgui_set_message() forced a redraw every iteration and the box's drawing forced one for the next, so RGUI repainted its whole framebuffer every frame; and the runloop marked the framebuffer dirty whenever a box was up, so it was uploaded every frame too - for a box that stays the same until it is answered. RGUI now keeps the text and button state the framebuffer shows, and redraws when the text, the box, the highlighted button or the one under the pointer changes, or once more when the box is gone. A box no longer marks the framebuffer dirty by itself: RGUI marks it when it repaints. The pointer and animations still redraw as before. |
||
|
|
4c855770d6 |
menu: show built-in message box text without copying it
A Cancel/OK confirm and the "No information available" boxes copied a msg_hash string into menu_state_msg every iteration. menu_state_text now points at such a string instead, and MENU_STATE_TEXT() gives whichever the box shows: the pointed-at string or the buffer the dynamic texts (help, warnings, bind prompts) are still written into. |
||
|
|
0c228a1d0d |
core signatures: poll a parked load only while one waits
core_load_check_iterate() ran every frame, a call into another translation unit even in a build whose check is dormant (no signing key compiled in) or with nothing parked. A park now raises a frame_work bit, RUNLOOP_WORK_CORE_PARK, and its drop lowers it, so the frame loop skips the call as it does Discord, cheats and the camera when they are idle. Every way a park ends goes through core_load_park_drop(), so the bit can't outlive it. The core_load_check harness now polls only under the bit, as the frame loop does, and checks it rises with a park and falls once the park has run. |
||
|
|
7092b43a2b |
core signatures: a startup load the check holds back asks from the menu
-L and launcher loads the check refuses fall back to the dummy core and menu whatever --load-menu-on-error says, and run again as a menu load after Load Once or Always Trust; with no menu they fail as before, saying how to approve the core. A re-run of a core that starts without content, refused again because the core changed since the user was asked, asks again. On a first run, a core the pending seed covers waits for the seed instead of a guess. A load the check held back no longer also says "Failed to open libretro core": the seed's wait, the Security Warning, the refusal with no menu or a lobby join's own message says why. A core the check passed that the loader can't open keeps the message. A startup load that can only fail once the frame loop runs, such as a seed wait with no menu, quits and RetroArch exits non-zero, as for one that fails before. On macOS, where AppKit and the run loop observer end a quit with exit(0), such a quit exits with 1. A netplay lobby join whose core's probe is cached opens nothing at its core push, so the load that opens the core is the one refused: the join's own, or an unload's still in flight. The join marks that load. Its refusal is said and netplay left off, as for a refused push, before the dummy core's init probes the core for the menu, and the load isn't parked, even when the mark lands after its preload stage. |
||
|
|
cd0804d60f |
core signatures: refused loads ask on the Security Warning
A staged load whose core the check refuses ends as a failed load does and is parked with what it needs to run again, its subsystem state included. It keeps that snapshot after the preload stage's pass too, so a core that changes before the core stage opens it is parked, not failed silently. Load Core and the other user actions with no load after their probe park the core load; a parked Load Core whose core changed since its check parks again on its re-run. Probes stay quiet. Subsystem loads from a playlist or from netplay, whose subsystem a refused core can't name, are not parked: they say the core wasn't loaded and how to trust it. So does a netplay lobby join of a refused core, which then leaves netplay off. While the first run's seed hasn't checked the core's folder yet, they say RetroArch is still checking the installed cores. The companion UI's Load Core (Cocoa's menu bar) opens the core before it parks it, so a first Load Core of an untrusted core asks; answered, or trusted already, it starts a core that runs without content, as before. Of the running core, the open reads load_no_content from the running state, not the core; runloop_core_probe_live() says so, and that core keeps its flag and starts as before. Qt's Load Core shows no error box, and the Cocoa and Win32 companion windows clear their status line, for a load the check held back: the Security Warning says why, and Qt's modal box would hold the frame loop the warning needs. A parked Load Core run again by Load Once or Always Trust that then fails to open for another reason says "Failed to open libretro core", as the runloop does; one the check refuses again stays quiet. |
||
|
|
3bbec782cd |
core signatures: the load check parks a refused load and asks
core_load_check_park() holds a user-started load the check refused: Load Once runs it again from the file the user was asked about and lasts until another core loads, Always Trust records the core first, Cancel drops it. With the trusted list full, Always Trust loads the core this once and says so. A core the pending seed covers waits for the seed. A park and a staged load of the same core share one check, the stage's re-check of a file that changed included. Without a menu to ask on, the core isn't loaded and RetroArch says how to approve it. A re-run starts with no refusal recorded, so only its own open can refuse it again: one that opens nothing, such as a load whose core's probe is cached, isn't asked about again. Any other load, built-in cores included, ends a waiting park, and a newer park replaces it. A park whose warning another Security Warning replaces is logged. Nothing parks yet. |
||
|
|
6944cbdb6e |
core signatures: a staged load's core is checked in its preload stage
With a trust store the preload stage is the core's check, with or without a worker. A core the quick check doesn't pass is hashed by a task; one the pending seed covers waits for it first. A worker then opens the core from the file that passed, or the core stage opens it from the slot. The core loaded last passes on its own record, as its reload does: no second hash and no second open file. The stage resolves the core path as load_dynamic_core() does, so on Windows it too leaves a \\?\ path ending in '.' as given. A pass whose file changed before the stage hands it over, or before the worker opens it, is checked again instead of ending the stage with neither a library nor a refusal. The first such re-check in a stage is logged. |
||
|
|
076661e80d |
core signatures: check every core where it is opened
runloop_core_dylib_load opens a core only once the load check passes it: a record, an exemption or the slot of a finished check; a refused probe starts the check quietly. The startup load, before the frame loop, hashes in place, an accepted startup wait now listed in CODING-GUIDELINES. Workers open through runloop_core_dylib_open, only where the main thread found no trust store. Until run-ahead checks its copy, it keeps one instance where there is a trust store. On Windows, with a trust store, load_dynamic_core() leaves a \\?\ core path ending in '.' as given, so the check refuses it instead of loading the file _wfullpath names without the dot. |
||
|
|
738584cd10 |
core signatures: the Security Warning
core_warning_push() holds one request, a copy of the check that failed, and opens a screen built like Load Archive / Open Archive: the reason and the full-access warning as rows above the choices, the line about turning the checks off below, the cursor on Cancel. An install offers Install and Trust, a load Load Once and Always Trust This Core, a core that couldn't be read Cancel only. The text rows are wrapped short because no menu driver wraps a label. The core updater's two refusal messages are added with the rest. The caller's callback gets the choice, or Cancel on Back, a newer request or quit. Each request has a serial that its screen's rows carry, so OK on rows built for an older request refreshes the screen rather than answering the newer one. OK and Back take the screen off the stack before the callback runs, so a callback that changes the menu stack (a load starting content) isn't followed by a pop of the wrong screen. A newer push runs the replaced request's callback with Cancel inside itself, with the newer request already in the slot; a choice made from there is ignored. A request still pending when a stack flush (a tab switch, a menu reinit) takes its screen away gets it back on the next frame; one answered before its screen came up leaves none. Info on the screen does nothing. core_warning_push() refuses during deinit's cancel and when the menu driver shows no screens (null), so the caller keeps its request instead of one nobody can answer. samples/menu/core_warning drives the screen through the shipping handlers, with core_signature.c rebuilt around the test key and a trust store of its own. |
||
|
|
2b5029bc81 |
runloop: ignore equivalent effective aspect hints
Compare effective aspect before dirtying the viewport for geometry and AV-info updates. Treat nonpositive hints as the base-size ratio and avoid resizing, frame-delay recalibration or encoder restart when an explicit hint equals that fallback. Preserve raw hint metadata and debug traces. Keep base-size and meaningful aspect changes active, with regressions covering both environment calls, aspect modes, recording and streaming. |
||
|
|
2887d9c76b |
logging: restore debug-gated geometry environment traces
Restore changed and duplicate SET_GEOMETRY and SET_SYSTEM_AV_INFO diagnostics at frontend log level 0. Guard the call sites before entering the variadic logger, including debug builds, so ordinary levels avoid the logging dispatch and formatting work. Test enabled debug, enabled info and disabled logging through a file capture. Disable the harness power-profile helper while the capture owns its sink. |
||
|
|
080b4aada9 |
recording: retain encoders for unused aspect hints
Avoid finalizing and reopening a recording or stream when SET_SYSTEM_AV_INFO changes only a core aspect hint ignored by the selected viewport. Keep restart handling for size, timing, displayed aspect and video driver changes. Exercise both recording and streaming lifetimes through the real frontend with a fake encoder, including continued frame delivery and required parameter-change restarts. |
||
|
|
738d3296d3 |
video: skip resizes for unused core aspect hints
Distinguish aspect metadata changes from viewport changes in SET_GEOMETRY and SET_SYSTEM_AV_INFO. Keep core hints current, but skip resize notifications and frame-delay recalibration when the selected aspect mode ignores them. Base-size changes continue to resize every mode. Cover both environment operations across core, configured, fixed, square-pixel, custom and full aspect modes. |
||
|
|
618428386b |
drivers: skip video timing work for audio rate updates
Pass the FPS change decision through the live audio-rate update. Sample-rate-only changes still compute the adjusted audio input rate, but avoid video swap-interval selection, headset pacing updates and the video nonblock round trip. Keep full timing setup for FPS changes and driver initialization. Cover the audio-only helper and redundant pacing calls during AV-info updates in the portable threaded-video regression suite. |
||
|
|
82a8cd53d8 |
video: reuse frame capacity and borrow queued commands
Keep opted-in software video drivers alive when new maximum geometry fits their initial input-scale capacity and source format. Retain reinitialization for growth, hardware contexts, filters and incompatible formats. Update only changed AV fields and leave viewport and pacing state alone for fitting maxima. Handle deferred commands and replies in their consumer-owned ring slots until retirement, removing the handler's packet copy and unused reply sink. Preserve the inline, reentrant and waiting-mailbox paths. Keep cached frame and hardware callback ownership across partial restarts that do not tear video down. Preserve an owned frame snapshot for video teardown, and avoid copying an already retained snapshot onto itself on repeated resets. Exercise fitting changes, regrowth, capacity overflow, exclusions, framebuffer loans and restart ownership through the shipping frontend. |
||
|
|
e789b898b9 |
video: avoid redundant geometry and AV-info updates
Return immediately for unchanged AV info and gate viewport, refresh-rate, frame-delay and audio work on the fields that changed. Preserve maximum-size and CRT mode rebuilds, but use an audio-only restart when an in-place rate change is unavailable. Keep SET_GEOMETRY silent on the frame path. Publish viewport parameters before notifying the driver. Coalesce threaded aspect requests in atomic state taken before drawing, avoiding packet copies and the full-queue waiting fallback. Exercise duplicate, geometry-only, timing-only, combined and maximum-size updates, snapshot publication and full-ring geometry bursts through the shipping frontend on Linux and Windows. |
||
|
|
1656558977 |
video: add Skip Duplicate Frames
A repeat the core sends as a NULL frame is left unpresented, so the display receives the content's own frame rate and frame generation or interpolation tools see the real cadence. It stays out of the way where the presents are the effect (Black Frame Insertion, shader sub-frames, Threaded Video Frame Repeat, a headset) and with the menu open, fast-forward or a cached frame shown again. While repeats are being skipped, the runloop holds the loop to the content's period with its timer wherever only VSync or the threaded hold would have, since neither can block on a frame that is never presented, and the driver's release stands aside. Lanes in samples/runloop/pacing and samples/gfx/threaded_video pin both halves. Idea from beetle-psx-libretro#1013 by Razor221. |
||
|
|
34fd7248c0 |
libretro: VFS v6 - reads and writes at an offset, with no lock
read_at and write_at take the offset with the call and leave the stream's own position alone, so any number of threads can use one handle at once and a core no longer needs a lock of its own around seek-then-read. write_at with RETRO_VFS_WRITE_AT_APPEND reserves its place at the end with one atomic add, so appends from several threads neither overlap nor tear. pread/pwrite where the platform has them, a second handle with its own position (ReOpenFile, OVERLAPPED) on Windows, a memcpy for a mapped stream. -1 where there is neither (consoles, UWP, the other schemes); the caller then does what it did before. filestream_read_at / filestream_write_at reach it from libretro-common. vfs_positional_test: four threads read at offsets on one handle while a fifth reads it in sequence, for buffered, descriptor and mapped streams, then four threads append records. With the positional read swapped for seek-then-read it reports tens of thousands of wrong reads. Runs in the libretro-common samples workflow; also built with MinGW and run under wine. |
||
|
|
ae907bff65 |
libretro: OpenGL contexts for a core's own threads
RETRO_ENVIRONMENT_GET_HW_SHARED_CONTEXT_INTERFACE (104, experimental) gives an OpenGL or OpenGL ES hardware core contexts in its own context's share group, for threads of its own: create and destroy on the core's thread, make_current on the thread that uses one. A core can then render or compile shaders off its main thread with nothing of the window system in the core. A frontend that cannot make such contexts answers false, and the core keeps its GL work on the thread that calls retro_run. RetroArch answers it with the context drivers' shared contexts, which GLX, Wayland and X11 EGL already had for OpenXR; WGL, KMS/DRM and Android get them here. The WGL one shares with the context current on the calling thread (the core's), made with the window context's attributes, and binds on the window's device context. samples/gfx/gl_shared_context is a core whose second thread clears a texture through such a context that retro_run then shows; the EGL hardware core workflow runs it on GLX and EGL, threaded and not, with a compatibility and a 3.3 core context. |
||
|
|
b7f61b38be |
rh264, video decode interface v4: tag each access unit, get it back with its picture
A caller that attaches something to each access unit - the Wii U's H.264 API takes the game's output buffer with every unit - has to find it again on the picture that unit produced, and with B pictures output is in display order, not the input's. rh264_video_set_tag gives the picture the next decode opens a value; rh264_video_tag returns the value of the picture handed out. It rides with the picture through the output queue on both the software and the hardware path, and is taken when the picture opens, so a pool or rotating contexts finishing it later do not change it. A field pair keeps its first field's. Savestates carry the queue's tags (version 2; version 1 still loads, with tags 0). retro_video_decode_interface version 4 adds set_tag and get_tag over them. Tests: rh264_hw_test tags every sample and checks each picture's tag names a sample of its own - presentation times rising, each once - on both paths; rh264_state_test compares tags as well as pictures, so a loaded decoder must give back the tags its pictures went in with. tools/test_video_decode_interface.py checks v4 is accepted and v5 refused, that a v3 query writes nothing past get_gpu_frame, and v4 tags in presentation order through the frontend callbacks; it now runs in the libretro-common samples workflow, plain and under ASan/UBSan. |
||
|
|
5756db8659 |
Input: Plays As, several controllers on one player, with hotkeys of their own (#19916)
* OpenXR: the controllers' slots are not read from the driver's view
A joypad driver that keeps its pads' state lends it to the snapshot
bridge through view(), and the bridge reads that in place of a copy
(
|
||
|
|
208da32d26 |
video: lay the menu and notifications out at their own window's size
The menu and the notification widgets each lay out at the size of the window they are drawn in, which can now differ from the main window's: the runloop asks for each layer's size, and under the threaded wrapper the widgets' worker takes the notifications' size from the frame it draws. With both in the main window nothing changes. |
||
|
|
d7de9cc7b6 |
android: open the core path that passed the folder check
runloop_core_dylib_load resolved the core's path to check that it lies in the app's own folders, then handed the original, unresolved path to dlopen. Any symlink on that path could be repointed between the check and the open. android_core_path_allowed becomes android_core_path_resolve, which hands back the resolved path it checked, and that path is the one opened. Which cores are allowed is unchanged. |
||
|
|
d94f129883 |
android: only load cores from the app's own folders
A launch intent's LIBRETRO, DATADIR and CONFIGFILE extras are chosen by whoever sends it, so another app could have RetroArch dlopen any .so. Every core open now resolves the path and refuses it unless it lies under the app's dataDir or nativeLibraryDir, or in one of the package's own code folders in its install folder, all read from ApplicationInfo rather than from the extras. A Play core install moves the package to a new code folder while RetroArch runs, so a fixed nativeLibraryDir is not enough. |
||
|
|
a580d0f3de |
runloop: never count more play time than has passed
Closes #20019 |
||
|
|
23f465bf2d |
runloop: hold the content rate where Driver Pacing has no backend
With Driver Pacing on and nothing else holding the loop, the backend's release keeps the content's frame period. On a driver without a backend - gl, glcore, or a GPU without the extension - the setting did nothing, and with vsync and audio sync off the loop ran unthrottled. The frame limiter now holds the content's period in exactly the iterations a backend would have owned: a content frame at normal speed, focused, the menu down, and nothing else pacing. Driver Pacing off is unchanged. |
||
|
|
591237dc48 |
Clear what fast-forward queued when it ends
Leaving fast-forward drops what it left in the threaded pipeline's ring behind a jump fade, and the device's writer drops core audio until the device has played down to rate control's setpoint, so a blocking writer is no longer held for as long as the queue takes to play out. That held the core in device-period steps for seconds after every fast-forward, which a VRR display shows as judder until the menu is toggled (#19940), and cost every other configuration a hitch on exit. The five-frame non-blocking window Sync to Exact Content Framerate used for this is removed; it never drained the queue. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LBQPGeAnyXTjoifK18NSfm |
||
|
|
b394e0bdfa |
runloop: a playlist Load State Auto pick loads the auto state
Auto, picked from a playlist entry's Load State list, loads the auto state whatever Auto Load State is set to, through the same path as an automatic load, deferred for a core that must run first. The content_load harness's playlist lane picks Auto with Auto Load State off. |
||
|
|
f6018d2b7b |
runloop: keep the audio device running through a staged close
Unloading the game inside a staged content switch ends the core's audio with the pause tail instead of stopping the device: the device keeps running until the driver stage sets it aside or closes it, so the menu's feed and a menu sound playing over the close - the OK of a confirmed Close Content - play on without being written into a stopped device. The core stays gated until the drivers are rebuilt. The content_load harness plays a tone through a confirmed close and checks the device is never stopped while the menu feeds it and that the tone it is handed is whole on both sides of the driver stage. |
||
|
|
eb050c9d4f |
runloop: a playlist Load State pick travels with its load
Picking a slot from a playlist entry's Load State list records the pick on the menu handle, and the content load it starts takes it in event_init_content(), however many frames later that runs. The pick loads that slot ahead of any auto state, and is dropped with a load that fails before the content comes up. The content_load harness runs an entry through the real Load State list and checks which state the core unserialized, with an auto state present and without one. |
||
|
|
6ebf66b643 |
OpenXR: per-screen placement for headset screens, and Edit Screens to arrange them by hand (#19945)
* video: per-screen geometry for the headset's floating screens Each floating screen, by the core's logical screen id, gets its own offsets, yaw, pitch, roll, scale and visibility (video_screen_xr_t), applied on top of where the layout puts it. video_views_xr_reset gives the defaults and video_views_xr_normalize clamps each value to its range: offsets to 10 m either way, angles to 180 degrees, scale from 0.1 to 10. A planner given no screens uses the defaults, so nothing moves until a setting does. * configuration: save per-screen headset geometry video_screen<N>_xr_x, _y, _z, _yaw, _pitch, _roll, _scale and _visible keep each floating screen's adjustments for screen ids 1 to 8, and survive configuration overrides like the other video settings. A minimal save writes only the values that differ from the defaults. The video_screens settings sample checks the round trip and the override cases, and runs in the OpenXR input and Wine views jobs. The defaults fixture now links video_views.c, which the reset uses. * menu: per-screen controls for the headset's floating screens Stereo 3D & Screens gains Screen, which picks a floating screen by its logical id among those in the current frame's map, and for it Horizontal, Vertical and Depth Offset, Yaw, Pitch, Roll, Scale and Visible, with Reset Screen and Reset All Screens. The rows apply live and are hidden where they cannot apply, such as a tracked projection's eyes. Stepping between screens reads one snapshot of the map and is bounded, so a tracking change mid-step cannot leave it walking an empty map. docs/openxr.md describes the controls; the video_screens sample drives them through the shipping menu actions. * video: apply per-screen headset geometry to the frame snapshots Each XR planner, Vulkan's and GL's, takes the normalized screen settings with the frame snapshot, so a screen moves, turns, scales or hides as its rows change, while paused too; recentering and tracked projections are unaffected. Screen images are kept between frames, so shader feedback survives a placement change. A retained XR target that cannot be allocated is skipped quietly, remembered by its size so it is not retried every frame; only the desktop UI and canvas targets log the failure. Covered by openxr_core_test, the video_screens sample, the e2e runner's feedback shader case and the new vulkan_views_target sample. * android: keep the OpenXR EGL context C89 gl_xr_egl_init declared its extension string after statements. * video: pose inverse, layout spots and grab maths for headset edit mode Each item's layout spot comes from one helper that placement uses and the quad set records per slot, so a shown pose turns back into the settings that placed it. Grab maths: the item follows the aim, level unless tilting, offsets clamped to the settings' range; the stick pushes along the ray and resizes. Edit picking sees every item and takes the menu by a handle bar under it. * video: a frame without a view map is screen 1 in the headset A core without a views map (SNES, say) had no screen to select, so its frame could not be moved. Its whole frame now takes screen 1's offsets, turn, scale and visibility, and the selector lists Screen 1. gl's window stays as laid out while the menu is open over it. * video: the headset's menu in front of screen 1, or where it was put The menu sat at a fixed spot, so moving screen 1 closer left the menu behind it. It now floats 10 cm in front of screen 1, facing as it does, at its default angular size and never nearer than 0.4 m, while screen 1 floats and shows, and is still submitted after the screens. A menu place (video_openxr_menu_xr_* with video_openxr_menu_placed) overrides that; it is saved like the per-screen keys, and Reset All Screens clears it. * input: Edit Headset Screens mode for the OpenXR controllers Edit Screens starts from a hotkey, a headset action, the HEADSET_EDIT_SCREENS command or a Stereo 3D & Screens row, and stops on the same, on opening the menu, on a video reinit or when the session ends. It syncs its own action set in place of the game's, points the lasers at every item whatever the Laser Pointer setting, keeps the menu's quad up while editing, and with While Editing Screens set to Pause pauses only content that was running. A runtime that refuses its bindings keeps the game's and leaves edit mode unavailable. The setting reaches the headset's poll with the others, and the pause and resume are asked of the frontend as platform requests, so the input driver issues no command and takes no settings itself. A Laser Pointer value past its choices, which a hand-edited config can hold, reads as Auto rather than as edit mode's. * input: grab, tilt, push and resize headset screens in edit mode A grip on an item takes it in the screens' frame: it keeps its pose relative to the hand, stays level unless the trigger is held, and the stick pushes it along the laser and resizes it, past a deadzone. Each poll writes the item's offsets, turn and scale where the menu's rows write them, through named frontend calls, clamped so it waits at a limit and resumes from there. The menu is taken by its handle; a menu that follows screen 1 is placed as large as it shows. The main button resets a free item as Reset Screen does, or puts the menu back in front of screen 1. A recenter, a screen leaving the map and leaving edit mode let go, counted for the frame snapshot; an untracked hand holds its item still. * openxr: held screens follow the hand at the headset's rate The main thread publishes what each hand holds through a seqlock; each headset frame re-places a held item, both eyes of a stereo screen, from that frame's own aim, so it no longer waits for the next video frame. An item let go stays where the hand left it until a quad set planned at or after its release (an edit count carried in the frame snapshot) shows it, even once the hand holds another item, so nothing steps back. Lazy Follow holds its glide while anything is held. Edit mode outlines every item, brightly the one under a laser, and draws the menu's handle bar under it, from the laser's image, now an atlas of the dot, two outlines and two handle bars. They take only the layers the screens leave after the dots. * openxr: edit mode end-to-end cases and documentation The test layer's aim can roll, and the e2e runner drives edit mode against Monado: grabs that follow the hand on every headset frame and stay where they are let go, level and tilt, the stick, resets of a screen and of the menu, the menu taken by its handle and following Screen 1 at its size, outlines and the handle, a no-map core, a views core's fallback frame, Follow Head, Lazy Follow, recentering, two hands, pausing, and what starts and ends edit mode, including the headset's hotkey bits with no command interface. The cases whose work is a host's or driver's own run on glcore and gl too. docs/openxr.md explains editing screens in the headset and where the menu goes. * openxr: a laser beam from each controller to its dot A thin strip runs from each hand's aim to its dot, or 1.5 m into nothing, turned about its own axis each headset frame to face the head so it never shows edge on. It comes from the laser's image, so it needs no new swapchain, and uses layers left after the dots and edit mode's outlines, so it is the first to go when the runtime has few. The new Laser Beam setting shows it in edit mode only (the default), always, or never; outside edit mode, Laser Pointer and its hotkey hide it with the dot. * openxr: edit mode outlines in three bands, outside the item A light band between two dark ones shows on white, black and busy borders alike. The rim now sits wholly outside its item, 5 mm clear of it even after filtering, so it never covers the picture; its region grows to keep two texels a band at about the old thickness. Screens' outlines are submitted before the screens, so a neighbour placed flush covers the part of a rim over its picture, while the menu's outline and handle bar stay on top. The handle bar moves 5 mm below the menu's outline, which it would otherwise cover, and gets the same bands, faint and bright. * input: choose a headset edit item with Select Next and Previous Edit mode steps from the laser through the screens it can move and the menu. A chosen item is the one lit, either hand's grip takes it from wherever the hand is, and Reset resets it, so a screen hidden behind another can be moved. Whatever a hand holds stays lit. A ray on the menu's handle bar takes the menu before any screen in front of it. Within 3 cm of the bar, a ray that came from the bar keeps the menu even over a screen, and one that came from elsewhere takes it only where no screen is hit. * openxr: snap a held headset screen to the screens near it Snap to Screens, on by default, turns a held screen parallel or square to a nearby screen and lines up its plane, edges or centre. Each pull is exact within 3 cm or 5 degrees and fades out over as far again, so the screen catches up with the hand rather than jumping, and snapping fades in over the first 5 cm or 10 degrees after a grab, so taking a screen never moves it. With several screens near, the snap that leaves the least error wins, so a near screen's exact pull beats a far one's fading pull whatever their order. One stateless function inside the grab serves the main thread and the headset's thread, so a screen is saved where it was shown. The holding hand buzzes as a snap takes hold, once, and not again until the screen has left that pull. * input: turn a held headset item with the free hand's stick A quarter turn of a held screen needed the controller turned a quarter turn, which swung the screen round the hand on its long reach, so a square snap could not be reached. Now the stick of the hand holding nothing turns what the other hand holds about the vertical through its middle, faster the further it is pushed, and snapping still catches it parallel or square. A carried item keeps its pitch and roll and its angle to the way the hand points across the floor, so raising, lowering or twisting the hand no longer tips or swivels it; the trigger lets it ride the hand rigidly. * openxr: smooth the controller aim in edit mode A screen held about 2 m out on the laser magnified every tremor of the hand. In edit mode each hand's aim now goes through a One Euro filter, which smooths a slow hand hard and a fast one little, with its rate taken from the headset frame's own time step. The headset's thread filters once a frame and hands the result to the main thread, which grabs, moves and lets go from it, so a screen is saved where it was shown. The new Edit Smoothing setting picks Off, Low, Medium (the default) or High; outside edit mode the lasers are never smoothed. * openxr: name the chosen edit item beside the controller Edit mode now shows a faint tag just above the hand that last pressed Select Next or Previous, reading Laser, Screen N or Menu, so what the grip will take is plain without a notice. The words are drawn once into the laser's image in the default font and the interface language, light over a dark halo like the outlines so they read on any background, and the tag is one more headset layer; when the runtime is short of layers the beams are dropped before it. On a runtime whose swapchains are too narrow for the words, the laser's image keeps its old width and there is no tag. * input: tilt a held headset item with the free hand's stick In edit mode the free hand's stick already turns the item the other hand holds. Its up and down now tilt that item too, about the item's own left-right line through its middle, at the turn's rate and with no limit: up tips the top back, as when pushing a monitor's top back. It works whether the item is carried or rides the hand with the trigger held, and snaps as the turn does. Within about 25 degrees of left or right the stick only turns, and within about 25 degrees of up or down it only tilts, so a push meant for one does not drift into the other. Edit mode's starting notice lists the turn and tilt and stays about 8 seconds. * input: snap a turned or tilted headset item to angle steps While the free hand's stick turns or tilts a held item in edit mode, the item clicks into steps of the new Snap to Angles setting (15 degrees by default; 30, 45, 90 or Off), so it is easy to set straight. The turn counts from facing the user's head across the floor, the tilt from upright. Within about 2 degrees of a step the item holds there and the holding hand buzzes once; the stick's own angle keeps adding up, so pushing on leaves the step. Only the stick steps: carrying an item or tilting it with the trigger never clicks, and a snap to another screen that would engage wins over a step. * openxr: show the back of a headset screen turned away Runtimes draw only the front of a quad layer, so a screen or the menu turned away from the head vanished. When the head is behind a quad's plane, the frame now submits a plain dark panel in that quad's place: a solid grey cell of the laser's image, at the quad's size, turned to face the head. It takes the quad's own layer, so the layer count and cap are unchanged. Edit mode picks either face, so an item turned away stays grabbable, and its outline, handle and dot turn with its back. * input: keep a screen snap's angle once the free stick lets go A snap to another screen shows a held screen square or parallel to it, but the item's own angle stays where the stick or the hand took it, up to several degrees off. The next turn with the free hand's stick started from that hidden angle, so the screen left the snap early on one side, late on the other, and caught up with a lurch. Now, as the free stick returns to its deadzone and as a push starts, a snap engaged on the turn becomes the item's own angle: the carried turn, or the orientation the trigger tilts. A snap still fading in never does, since that would hop the screen into it. The place is left to the hand, and carrying alone never keeps the angle, so pointing still pulls a screen out of a snap. Letting go of the grip leaves the item where it shows, as before. * openxr: hinge a held headset screen to a neighbour's edge Snap to Screens now also hinges a held screen to another along a shared edge at any angle between them, so a DS or 3DS pair can be opened at a slant: an edge within 5 degrees of parallel to one of the other's, within 3 cm of its line and sharing some length with it, turns exactly parallel and moves onto it, centres or ends level, its angle left free. The pull fades in over the first 3 cm of shared length, so a screen slides off the end of the other's edge without a jump, and a diagonal neighbour never hinges. Screens that would overlap do not hinge; the pull is whole from flat to square and fades out folded shut. Flat and square snap as before and report a hinge at 0 and 90. A turn to the same screen pivots on the shared edge, so the edge stays on the line as the screen leaves flat or square. The snap still keeps nothing between calls; its result carries a hinge bit, and video_xr_snap_hinge also says which edge and line, for the stick to swing about. * input: swing a hinged headset screen about the shared edge While a held screen is hinged to another, the free hand's stick axis that turns nearest the shared edge, the tilt for a top or bottom edge and the turn for a side one, now swings it about that edge, so it stays attached; the other axis still turns or tilts it and can pull it off. Where the swing leaves it, angle and place, it stays as the stick lets go. Snap to Angles counts a hinged screen's steps from flat with the other screen. A hinge counts only while the screen's own edge is within its range, not when other snaps alone hold it on the line, so a swing never carries a screen round a line it is far from. A square corner is a side hinge at 90 degrees, so the turn stick there now swings the screen about the corner's edge. Main thread only; nothing new reaches the frame loop, which still shows the grab through video_xr_grab_pose. * openxr: leave a gap between hinged headset screens Edges that meet in edit mode, side by side, at a corner or hinged at any angle, now click to a set gap from within 1 cm and otherwise keep the gap the hand gives them, still hinged, up to 10 cm (letting go by 13). Screens no longer have to touch, which made them overlap. Each grab carries the gap, so the edit poll and the frame loop snap alike; until a setting sets it, it is 0. Pushed past touching, a hinged edge stops there for the first centimetre of the push, the stop fading out by 3 cm, and ticks once per push. A swing pivots on the held screen's own edge, so the gap keeps through it, and a commit keeps the hand's gap unless the click holds it. After a swing lets go past square, that stick axis and its steps keep pivoting on the same edge until the edge leaves the hinge's reach, so a flick past square and back does not creep. Of two neighbours within the 5 degree turn snap, the nearer edge wins the turn and the hinge, by one measure for every screen, so a screen stacked behind, one off the ends of the edge or a side wall at a corner never outranks a hinge the turn holds. * menu: add Hinge Gap for headset screens Hinge Gap (0, 1, 2, 3, 5 or 10 cm, default 2) sets the gap edit mode's Snap to Screens leaves between screens that meet edge to edge, side by side, at a corner or hinged. Edit mode takes it as it starts and gives it to each grab; the click to it buzzes like the other snaps. * menu: put Edit Screens under Headset Output Stereo 3D & Screens now lists Edit Screens and its snaps right under the switch that reveals them, then the headset's own setup, then where the screens go, with the per-screen rows last and Visible first among them. * openxr: track each held screen's hinge on the frame loop The frame loop already re-snaps each held screen every frame. It now also keeps, per hand, the hinge that snap holds whole, until the edge leaves the hinge's 4.5 cm reach, where the frame draws it, so edit mode can mark it. A kept hinge whose target no longer matches is dropped. video_xr gains the hinge line's ends, along the overlap of the two real edges and midway across the gap, an outline cut that drops one edge's rim, and a green strip in the laser's image, before the tags. * openxr: mark a hinged headset screen with a green line While a held screen's hinge holds, the two edges that meet drop their outline rim and a 6 mm green line runs along the hinge where they overlap, midway across the gap, so it is clear when the hinge has taken hold. The line is drawn as the beam is, a centimetre nearer the eye than the edges, since SteamVR does not keep the order of overlapping quad layers, and comes after the outlines in the layer budget; hidden rims cost no layer. * input: buzz longer as a headset screen hinges A hinge taking hold now gets one 150 ms buzz at 0.8 on the hand carrying the screen, against the 20 ms snap tick, so the attach can be felt. It fires again only after the edge leaves the hinge's reach, hinges elsewhere, or the other hand takes the screen it hinges on, so a swing past square and back does not repeat it. Ticks due while it plays are skipped rather than cutting it short. * openxr: find headset screens resting in a hinge Two screens no hand holds rest in a hinge when their poses pass the test that engages a carried screen's hinge, with either one carried, and the hinge, held whole with nothing else pulling, leaves the carried one where it is. So a hinge found at rest stays hinged when its screen is taken. The engaged test moves into its own function so both use the same one, and one target can pull whole whatever the grab's fade. * openxr: keep a headset screen's hinge shown at rest In Edit Screens, two screens no hand holds that rest in a hinge keep the green line and their hidden rims, whether let go hinged or loaded that way. The main thread counts them only when a resting screen changes and sends them with the hands' record, so a release and its resting pair arrive together; the frame loop places each line from the screens it shows. A screen hinged at rest on two adjacent edges still keeps one of those rims. The hands' record now outgrows the quads, so the seqlock's copy is sized to the larger of the two. * openxr: pick up a hinged headset screen still hinged Taking up a screen that rests in a hinge starts the carry on that hinge, whole from the first poll, with no buzz and no jump, until it leaves the hinge's reach, another hinge takes hold, or the other hand takes the screen it hinges on. Until the grab's own snapping has faded in, the kept hinge's target still pulls whole, so a straight pull out does not hop. The grab carries the hinge so both threads hold it the same; of several, the one the snap ranks best carries over, and only where holding it moves nothing. While the other screens fade in, the hinge's screen also leads the turn, so a nearer one still fading does not take it. * openxr: end a headset screen's hinge where a push passes the stop Pushing a hinged screen into its neighbour holds the edge at touching for 3 cm of push, fading out by 5.5 cm. Where it stops holding, the hinge ends: the line goes, the rims come back, and the lid and buzz are cleared, so screens pushed into each other show no hinge that a let-go there would not rest in. Pulled back, the hinge takes hold again 5 mm short of where it ended, with the long buzz, so a tremor there does not flicker it. The grab carries that through flag, and the frame loop keeps its line until the main thread sets it, so the two threads never disagree for more than a poll. At Hinge Gap 1 a pair let go touching rests hinged and is taken up hinged, as at every other gap. A screen swung into a square corner gets the long buzz on arrival, and the other hand taking the target does not hop the carried screen by the push's depth. * input: let go of a headset screen where it was before the grip opened Opening the grip twitches the hand, and the poll that sees the grip open would move the screen by that twitched aim. Half a degree of pitch moves a screen 1.8 m out by 1.6 cm, enough to knock it off its hinge's gap or out of level, so it would not rest hinged. Each hand keeps a short trail of where, turned and as large as its screen showed, entries at least 10 ms apart, and a grip let go puts the screen as it showed 80 ms before (INPUT_OPENXR_EDIT_REWIND_US), or as it was taken if held for less. Edit mode's end and a recenter let go where the screen shows. * openxr: find where a let-go headset screen settles in its hinge A screen let go while its hinge shows should land exactly in that hinge, so the hinge still shows at rest and a pick-up is hinged. video_xr_hinge_settle holds the hinge whole from the hand's pose, then moves the edge to the set gap from within 3 cm of it (touching stays where the stop holds it) and levels it along the edge within the level pull's reach. Its result must pass the rest test, and it turns no further than a grab's hinge engages, which shares that test. A pair resting inside a settle band but off its point is no longer listed at rest, since a pick-up and let-go would move it. A touching rest is taken 5 mm deeper into the push stop, at every Hinge Gap, so a hand that drifts less than that apart before letting go settles touching rather than at the gap. * openxr: settle a let-go headset screen into its hinge A screen let go while its hinge shows now goes exactly into that hinge: to the set gap from within 3 cm of it, touching from the stop's hold, and level along the edge from within the level pull's reach. It then rests there, listed and green, in the same publish, and is saved there. Elsewhere it stays where it shows, as before. Each trail entry also records where the hand put the screen with no snap and whether a let-go there settles. At the let-go the rewound entry is settled again against the screens as they are now, at that entry's size, and put in one go. * openxr: let a hinged headset screen rest at any fold Snap to Screens' turn to flat, and its turn to square at a corner, is whole within 5 degrees and fades out by 10, so a hinged screen held there shows at twice its angle off less 10. No fold shown in that fade read as a rest: the pair was not listed, a let-go there did not settle into its hinge, and taking it up would have moved it. Where a hand takes a rest, it now holds the screen at the angle the turn's fade shows it from, the inverse of the turn's pull, so every fold rests, is listed and is taken up unmoved. Held snapping is unchanged. * input: keep a headset screen's hinge through a shaking hand Edit Screens' hinge buzz, lid and push stop followed the snap's own engage and reach on every poll. A hand shaking half a degree (1.6 cm at the screen) about a hinge's edge flipped them many times a second, each flip a long buzz. Each hold now keeps one mark: the hinge a let-go would settle into. It takes hold at once, with the long buzz, and lets go only once polls have seen the hand out of where a let-go would settle for 150 ms, each poll counting at most 50 ms, so a stalled main thread or a spell untracked never lets it go alone. The other hand taking its target, hinged elsewhere or not, the target leaving and the let-go end it at once. The lid waits for the mark to go, the push stop follows it, and a let-go while it shows settles into it from where the hand last would have, edit mode's end and a recenter included. * openxr: draw a held screen's hinge as the main thread marks it The grab carries the main thread's hinge mark, and the frame loop draws a held screen's green line and cuts its rims from that mark alone, through video_xr_grab_marked, while it snaps the screen every frame. A frame loop taking the hinge by itself between polls would flicker the line for a hand shaking at the edge of the hinge's range while the mark held. A mark whose target the frame does not show cuts no rim. The other hand taking the mark's target ends it, and the lid, on any poll, tracked or not, so a lost hand's line does not come back when that hand lets go. video_xr_grab_near_hinge loses its past argument, which only the frame loop's keep used. * openxr: keep edit mode's hinge layers in place SteamVR does not keep submission order for overlapping quad layers, so a layer added, dropped or moved to another index can pop the edit outlines in front of the screens, as a wobble at a hinge would do to its line's layer. The hinge lines are fixed slots: one for each hand holding a screen, hand 0 first, then one for each pair at rest. A slot with no line to show is drawn in place from its screen's middle, at rows of the laser image that are empty either way up. The layer count and every index change only at a grab, a let-go or a re-count of the pairs at rest; a mark only changes crops and which rows a slot shows. * input: date a let-go's trail by frame and stop it at a stall Each trail entry is dated by the frame its aims are from, one a frame and per hand, and the release poll records a new frame's aims first. The rewind stops at a stall, entries more than 2.5 frames apart, a frame counted as at least 20 ms so a fast headset's close entries never read as one. Under load a stall of 0.1 to 0.3 s can come just before the release; the entry from 80 ms back would then hold the pose from before it and step the let-go back across all the stall's motion. With Edit Smoothing on, which damps the twitch, a let-go that does not settle into a hinge stays where and as large as it shows: a rewind there would step back by what the smoothed aim still lags. The hinge decision and the settle use the trail either way. * openxr: cut edit outlines from cells instead of turning them Cutting a top or bottom rim from the one outline image turns both outline quads a quarter turn and swaps their width and height, and on SteamVR that can blink every edit outline as the hinge takes hold or lets go; side cuts, which never turn, do not. The laser's image carries twelve pre-cut outline cells after the tags, faint and bright, for a cut top, bottom, left, right, top and bottom, or left and right, so a cut only picks a cell and the quads keep their pose and size. The image is then 5582 texels wide. A runtime whose swapchains are narrower, or that does not say how wide they can be, keeps the turned and cropped outline at 2498 or 1208 wide. One log line at the laser's creation gives the width chosen and the runtime's limit. GL writes the top and bottom cells swapped for its bottom-up rows, and Android's copy of the image is allocated rather than static. The edit-hinge-3ds-narrow e2e case runs the turned cut at RA_XR_LAYER_MAX_WIDTH=4096, on Vulkan and the GL EGL lanes. * video: draw headset screens straight into the runtime's images Each headset screen was drawn into an image of the driver's own and copied from it into the runtime's on every new frame, Vulkan with a render pass and GL3 with a blit. Screens are now drawn into the runtime's image itself, as before per-screen placement, with no image of the driver's and no copy. A screen drawn again with no new frame - resized, made again or moved while paused - replays the last frame's final pass from the chain: build_viewport_pass_replay draws it at the new size from what it read then, the passes' outputs, their feedback and the history that frame saw, with that frame's count. Nothing else runs, feedback does not swap and history stays, so a feedback or history preset holds still while paused. A chain made to replay keeps one more history image, so the frame's end writes where the last frame did not read; the window's chains keep what they did. This also has movie frames reach the headset, which the copy held at the first one, and draws a screen resized while paused at its new size rather than stretching the old image. * openxr: leave what users who never edit see as it was Screens seen from behind turn to their grey backs only while Edit Screens is on, where screens are turned around; outside it nothing changes and no head is located for them. The grabs carry whether editing is on. The menu opens at its own spot, straight ahead of the anchor, as it did. Menu in Front of Screen 1, off by default, keeps it just in front of screen 1 and moving with it. The frame loop copies the main thread's grabs only once their stamp moves, so outside edit mode no frame copies them. A new session clears the frame loop's own copy and passes over what was published before it, rather than publishing itself: the main thread stays the grabs' one writer. On Touch, the left menu button that opens the menu from edit mode is spent until let go: held on as edit mode ends, it is no Start and does not toggle the menu again after a second. --------- Co-authored-by: libretroadmin <[email protected]> |
||
|
|
88c0088a9b |
lakka/libnx: their headers to os/lakka and os/libnx
lakka.h and lakka-switch.h join the rest of Lakka's OS layer in os/lakka; switch_performance_profiles.h, which only HAVE_LIBNX builds read, starts os/libnx. Includes and the iOS Xcode projects follow. |
||
|
|
f23cc50ca4 |
android: play_feature_delivery/ to os/android
The Play Feature Delivery glue is Android's alone - JNI calls into RetroActivityCommon - and the last platform directory of its kind at the tree's root. It joins the other OS layers under os/; includes, the Makefile, griffin, the compile matrix and the two samples that build it follow. |
||
|
|
e867b83f42 |
Lakka: cpufreq and reboot2payload move to os/lakka
The Lakka-only CPU frequency control and the Switch payload reboot live under os/lakka, out of misc/; what includes them names their real path. |
||
|
|
80b3aefa35 |
input: a controller's sub-device sensors, from SDL's left-hand sensors
The frontend passes a core's sensor calls for a sub-device (RETRO_SENSOR_SUBDEVICE) on to the drivers with the index kept. It remembers which sub-device sensors the core enabled, as it does the controller's own, so one not enabled, or whose enable no driver took, reads 0 without asking a driver. The controller's own sensors are handled as before, and sensitivity and orientation apply to both; the profile's axis remap stays the controller's. The SDL2 (2.26 and up) and SDL3 joypad drivers answer sub-device 1 from SDL's _L sensors: a Wii Remote's Nunchuk accelerometer, the left Joy-Con of a pair. SDL3 restores it on a reconnect as it does the others. Every other driver already refuses an index it does not know. samples/input/sensor_subdevice runs the wrappers as they ship. |
||
|
|
efe2158a48 |
rsx: native RSX context, follow-ups
Give the RSX context and render interface proper IDs in libretro.h (RETRO_HW_CONTEXT_RSX = 11, RETRO_HW_RENDER_INTERFACE_RSX = 6) and ship one interface, version 1, with retire_memory in it, instead of two versions picked through the context's version_major. Retired memory goes on a ring and is covered by one label write per frame, with no wait-for-idle and no flush per call. Font vertex pages are all allocated with the font, and batches bigger than a page are drawn in page-sized pieces, so nothing is allocated while drawing. When the menu shows over a duped frame from a hardware core, the core's image is drawn behind it rather than the software texture. The frontend state reset runs only on frames the core rendered. The host mapping default stays 32 MB; RSX_HOST_SIZE still overrides it. The PSL1GHT guards around the new code are dropped: the driver only builds with HAVE_GCM, which only Makefile.psl1ght sets. |
||
|
|
9ec7de02d3 |
feat(ps3): add native libretro RSX hardware rendering support
Expose an experimental libretro RSX context and versioned rendering interface for PSL1GHT cores. Present core-owned RSX textures without CPU uploads, share the command FIFO and unused host mapping, and defer allocation retirement until queued GPU work completes. Integrate context negotiation and enforce main-thread rendering. Restore frontend GPU state before compositing and use fenced per-font vertex pages to prevent oversized Ozone batches from corrupting queued text. Invalidate the vertex cache before menu and font draws. Make the RSX host allocation configurable at build time. Extend regression coverage for hardware image validation, deferred resource retirement, oversized font batches and allocation failures. |
||
|
|
17f017a0ff |
Android: a pen hovering does not hide the overlay; a setting keeps it
The on-screen overlay is hidden while a stylus is in use and comes back two seconds after it was last used. Any pen event counted, a pen merely hovering over the screen too, so the gamepad overlay went away as soon as an S-Pen came near it, and "Hide Overlay When Controller Is Connected" did not keep it (#19824). A hovering pen now counts only where hovering moves the pointer ("Stylus Hover Moves Cursor"); otherwise only a pen touching the screen does. And "Hide Overlay While Using Stylus", on by default, can be turned off to keep the overlay on screen while the pen is used, as melonDS does. |
||
|
|
43580f5b9e |
recording: open output after startup state has settled
Defer recording until the first core frame after pending startup state loading. This lets the core publish its resulting AV information before the output is opened, preserving the requested filename instead of creating a header-only file and restarting into a dated recording. Cancel pending startup on stop, content close and quit. Exercise the actual startup functions and retain the auto-state-load harness link. |
||
|
|
00a3de3cd7 |
Temporal upscaler: HAVE_TEMPORAL_UPSCALER gates the subsystem
HAVE_NGX gated the whole temporal upscaler - the interface handed to cores, the settings, the threaded wrapper's carry and the DLSS, FSR and XeSS backends alike - under the name of one vendor's library. A MetalFX backend on the Metal driver would have to be built under a define that reads as NVIDIA's. The subsystem is now HAVE_TEMPORAL_ UPSCALER wherever HAVE_NGX stood, in the build files, the drivers, the menu, the samples and the compile matrix; nothing changes in what is built. |
||
|
|
27ed906296 |
midi: a core's MIDI request lasts until the core is unloaded
A staged content load runs the new core's init and load on the previous session's drivers, then rebuilds them. The core's GET_MIDI_INTERFACE request now ends in runloop_event_deinit_core after retro_deinit rather than in driver_uninit, so drivers_init reopens the device on the rebuilt drivers for a core that asked during its load. The content_load harness gains a lane for it: a core asking at load has the output open after the load, the next core that does not ask has it shut. |
||
|
|
4284e04654 |
Temporal Upscaler: load the upscaler only for a core that asks for it
The upscaler's libraries were loaded, and the Vulkan instance and device made for them, whenever the setting was on, for every core. OptiScaler standing in for nvngx.dll hooks the whole process once loaded, and its Vulkan hooks hang or crash cores that never use the upscaler. A core now asks with RETRO_ENVIRONMENT_GET_HW_RENDER_UPSCALER_INTERFACE during retro_load_game, beside SET_HW_RENDER; only then are the libraries loaded and the context made for them, until the core unloads. The System Information status finds the NGX library and tells OptiScaler from its version resource without loading it. |
||
|
|
a9ba46af7a |
Temporal Upscaler: the core interface and DLSS on Vulkan
A hardware-rendered core now has a way to feed a temporal upscaler: RETRO_ENVIRONMENT_GET_HW_RENDER_UPSCALER_INTERFACE hands it an API-neutral interface with get_request, which says whether an upscaler will take the frame and what render size it wants for the mode (so the core renders smaller, jittered and without its own temporal AA), and set_inputs, which brings the frame's depth, motion vectors, jitter and optional exposure and transparency masks beside the color image the existing render interfaces hand over, under the same lifetime and sync rules. Images are the context API's own handles, so the same contract serves Vulkan and Direct3D 12, and later FSR and XeSS. No existing interface version changes; a core that never asks is unaffected. The Vulkan driver runs DLSS Super Resolution over it through NGX (gfx/common/vulkan_ngx.c): a session on the device, the mode's render sizes from NGX's optimal-settings callback, a feature made for the mode's full dynamic range and the output size and re-made only when those change, the frame's size as the render subrect, the output image handed to the filter chain in the core's place, inputs in a depth layout moved for the evaluate and back. Retired features and images go after the frames in flight; nothing waits. The context enables the device and instance extensions NGX asks for, on a device the core makes as well, only while the setting is on, which now reinitializes the driver so they can be. A Quality setting picks the mode (Auto, Native, Quality, Balanced, Performance, Ultra Performance). samples/gfx/vulkan_upscaler pins the glue on lavapipe under the validation layer against a stand-in NGX core library, built with gcc and mingw in the samples-gfx workflow. |
||
|
|
fefcbbab58 |
video: keep the Android stub frame out of the shared driver vtable (#19910)
* threaded_video_test: freeze the core across the game-only lane's pause On some runs the harness core dupes an oversize frame, which drops the cached frame. If the game-only lane pauses right after one, the paused redraws have no core image and gl1's game-only read fails. Where the lane pauses depends on how many frames the lanes before it ran, so adding a lane can move it onto one of those runs. Freeze the core across the pause, as pixlane_once and lane_frame_mem already do. * video: keep the Android stub frame out of the shared driver vtable On focus loss Android swapped video_null.frame into the current driver's static video_driver_t, and on focus regain wrote the saved pointer back into whichever driver was current by then. When a core load switched drivers in between, e.g. a core restart asking for the other HW context, video_gl2.frame became vulkan_frame: the next frame ran vulkan_frame on a gl2_t and crashed, and video_vulkan was left drawing nothing. The stub is now a main_flags bit. video_driver_frame calls video_null.frame while it is set, and GET_AUDIO_VIDEO_ENABLE still reports video off. It holds across a driver switch or reinit until focus returns. A focus loss before any driver exists still does nothing. threaded_video_test gains a lane that stubs under one driver, switches to another and unstubs. * video: test the stub frame on Android only Only Android sets the stub, so other platforms take the driver's frame without testing the flag. The flag is set whether or not a driver is up yet, so a focus loss before drivers_init() also holds until focus returns. The stub-frame lane keeps its vtable and AV-enable checks everywhere and checks for dropped frames on Android only. --------- Co-authored-by: LibretroAdmin <[email protected]> |
||
|
|
d5f7078f95 |
Add RETRO_DEVICE_TOUCHPAD: a controller's touchpad for cores
A core reads the touchpad of a port's controller with the pointer's IDs: X/Y across the surface, PRESSED and COUNT, the index the touchpad times 16 plus the finger down. It is not the screen, so a core can read both - a handheld's front touchscreen and rear touchpad, say (issue #19902). The frontend answers it from the pad's state as the HID handlers lend it, and the SDL3 driver hands its touchpads over through a new get_touchpad op, taken once a poll. The capability bit is set where the joypad driver can say. A core that reads the device has the touchpad to itself: the port's Controller Touchpad mapping steps aside until the core is unloaded. |
||
|
|
22ee469999 |
MCP: schema check, readable MENU, smaller tool list (#19878)
* MCP: schema check on all tools, readable MENU * MCP: MENU marks choices, answers when closed * MCP: MENU types, shows dialogs; drop menu option * MCP: fold INPUT, OPTION, CORE_OPTION; trim list * MCP: MENU path, more, tab names; clearer errors * MCP: menu title as a text line; trim the list * MCP: trim STEPS' descriptions * MCP: INPUT says the core gets what is held * MCP: MENU review fixes |
||
|
|
0afe7f41d1 |
netplay: record confirmed multi-player input in BSV replays (#19870)
* replay: accept captured normal states for BSV checkpoints Let netplay supply a frame's saved state after confirmation without serializing the current speculative core state. Preserve the existing on-disk format and local recording path. * netplay: commit BSV input frames after rollback confirmation Stage the input queries seen by the core and replace them during rollback. Commit each confirmed frame once, using portable initial states and checkpoints captured at its emulated boundary. Keep local input sampling and stalled iterations out of the movie. Reject unsynchronized starts and stop at state discontinuities. * test: cover confirmed netplay BSV recording and offline replay Exercise the shipping recorder and rollback loop with delayed input, ring wrap, mid-session starts, stalls, absent ports and checkpoints. Compare host, client and spectator recordings, then replay through the ordinary BSV reader. Add sanitizer and Windows CI coverage. * netplay: keep replay state access in the input frontend Keep recording flags, checkpoint requests and notifications in the input frontend. Exercise the same frontend calls in the netplay BSV harness. * netplay: free BSV staging and keep netplay movies out of savestates Free each staged frame's states once it is committed, and drop all staging when a netplay recording stops, so a session no longer holds a normal savestate per ring slot. Skip the speculative initial state at record start, keep netplay movies out of savestates since they lag the core by unconfirmed frames, and keep the recorder's state in flag words. The netplay BSV tests check that committed and stopped recordings keep no states, and the MinGW lane links statically like the other wine lanes. --------- Co-authored-by: libretroadmin <[email protected]> |
||
|
|
2c1cb91912 |
runloop: bound the paused frame period for unknown display rates
Use the existing frame-time helper when a paused driver reports no refresh rate. Dividing by zero produced an invalid timer margin and a signed overflow in the imageviewer sanitizer smoke run. |
||
|
|
ffbe9957c9 |
video_thread_hw: one GL context, handed between the threads
A context that cannot give a hardware core a shared context - the Switch, where nvservices allows a process one GL context, or any EGL whose share context could not be made - declares it with GFX_CTX_FLAGS_NO_SHARED_CONTEXT. The GL drivers then make none, and the ring hands the driver's one context between the threads instead: the core's thread holds it around the core's work and gives it up around the present and around blocking commands to the video thread; the video thread holds it for a pass of its loop. The owner moves by compare-and-swap on one word and parks on an eventcount; the core's thread takes it back after the present it released for. The core's thread binds it off the window surface, the video thread with it. SET_HW_SHARED_CONTEXT stays refused on the Switch; nothing changes on a context that shares. egl_hw_core's shim gains a mode that refuses the share context, and the lane runs the handoff end to end, with the core that caches its framebuffer too. |
||
|
|
0e52e234ac |
record: integrate native Metal recording with frontend lifecycle
Capture the final Metal drawable on its existing command buffer and service owned VideoToolbox/AVFoundation recording on the dedicated worker. Share frontend GPU lifecycle hooks with NVENC, retain in-flight snapshots through stop, and preserve source timestamps across repeated presentations and allowed drops. Add sanitizer coverage for capture backpressure and output changes, plus a full native frontend build gate. Native frontend runtime acceptance remains pending. |