mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
codex/android-native-streaming
4529
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ae0d9d456d |
menu: C89 in the three drivers' cut-off message box lines
materialui, xmb and ozone reset box_wrap.len between two declarations, which the C89 build refuses (-Werror=declaration-after-statement). The reset follows the declarations. |
||
|
|
6bac0e5c24 |
ozone: a message box taller than the screen is drawn
ozone_draw_messagebox() kept the box's position in size_t. For text taller than the screen the top of it is above the screen, a negative float stored into an unsigned: the box landed off the screen and the cut to fit dropped every line, so nothing of the box was drawn - not its text, not its buttons. The position is an int now, as XMB's and MaterialUI's are. |
||
|
|
61e55fd782 |
gl2: the XMB effects in a build with Cg and no GLSL
Since the menu installs its effects, gl2 made them from GLSL only, and a build with Cg but no GLSL drew no background effect. Each effect now carries a Cg source for GL as well (cg_gl in the effect description, the six gl_shaders/pipeline_*.cg.h back, the ribbon's built from the shared ribbon code as D3D9's is), and gl2 makes the program from it when there is no GLSL program to be had. The Cg programs live in a context of their own (gfx/drivers_shader/shader_gl_cg.h), so they outlive the backend's context, which a preset change remakes, and go with the video driver. Like the GLSL ones they draw from the mesh's buffer, with their uniforms found once. Two things drew wrong under Cg and are dealt with here: - The backend's own program leaves its vertex arrays on between draws, and one of them is the attribute an effect's position aliases. Left on, it won: the ribbons were drawn from the wrong vertices, the simple ribbon a solid blot of layer on layer. An effect's draw now turns the backend's arrays off first. - The Ribbon's glow left its GLSL program bound. gl2 under GLSL binds a program for every draw, but the Cg backend's ARB programs do not unbind it, and a GLSL program wins over them: everything after the glow went through it, a grey screen. The glow's passes now unbind their program when done. gl2 also sets the GLSL dialect for its context whatever the shader backend, so the GLSL effects build under a Cg chain too. Test: samples/gfx/menu_effects/menu_effects_cg_test.c (make check-cg), run in samples-gfx under Xvfb (Cg finds its profiles through GLX). In a legacy GL context, through the Cg backend itself, every effect's Cg compiles in its ARB profiles and draws the same whether or not the backend's own program drew just before, and the glow leaves no GLSL program bound. Without the two changes above it fails on the ribbon, the simple ribbon and the glow. |
||
|
|
22ba917922 |
libretro-common: word_wrap_offset(), with a test
menu_wrap_offset(), which finds where a byte of a string landed in its word_wrap() or word_wrap_wideglyph() wrap, moves to stdstring.c beside them as word_wrap_offset(), and MaterialUI and XMB call it from there. It gave a glyph the wide-glyph wrap had put a line end before the offset of that line end, so the input dialog's caret sat at the end of the line above; it now gives the glyph's own. word_wrap_offset_test wraps plain, wide-glyph and mixed text at every width from 1 to 39, with line ends left or made NUL as the drivers make them, and checks that every character lands on itself or on the line end its space or newline became, in order, that the end lands on the end, that no wrap more than doubles its text, and that the caret before a word moved to the next line is on that line. It found the wrong offset and the wide-glyph wrap's runaway at narrow widths. |
||
|
|
b4fce6fdfc |
menu: draw the input dialog's text from where it was last wrapped
MaterialUI and XMB joined the input dialog's label and typed text into a stack buffer every frame, only for the wrap cache to find it the same as the text it kept. menu_input_dialog_text_is() compares the label and the typed text with the kept text in place, and while they match the box is drawn from the kept text itself: the two are joined again only after a key changes what is typed. |
||
|
|
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. |
||
|
|
45ca066beb |
menu: firmware dialog - one button row's room, and its text borrowed
The missing firmware dialog added room for a button row of its own to the box in Ozone, XMB and MaterialUI, on top of the room every driver now makes for a confirm's buttons, which left a gap under them the height of a second row. That room is gone, with the variables it left unused. The dialog's text was copied into menu_state_msg every iteration; menu_state_text now points at it, as at a built-in confirm's. A load job freed with the dialog still up takes the dialog down with it, so the menu never draws a freed message. |
||
|
|
881b1d41d1 | Show a dialog when firmware is missing when it is required for launching a core | ||
|
|
9b6b5f6ded |
menu: place the input dialog's caret in the text's own wrap
MaterialUI and XMB found the caret's line and column by copying the text up to the cursor to the stack and wrapping that copy, and the text up to the input line again for a selection: up to three wraps a frame, with two copies. A wrap only turns whitespace into line ends and adds line ends, so menu_wrap_offset() walks the box's own wrapped lines to where the cursor's byte landed. The input dialog's text now uses the box's kept wrap too, wrapped again only as it is typed. The prefix's wrap could break differently from the text's: with the cursor before a word that moved to the next line, the caret sat after the previous line's last space. It now sits where the character is. |
||
|
|
6848606aa4 |
menu: measure a box's button labels only when they change
MaterialUI, XMB and Ozone measured each button's label with the font on every frame a confirm box was up. menu_dialog_label_widths() keeps the widths with the label strings and the font they were measured in, and measures again only a label that is new, or every label when the font, its size or the font generation moved. A label is told apart by its string: another language's is another pointer. The drivers read the widths in place. |
||
|
|
384c9e5404 |
ozone: fade the message box from the frame, not from shared flags
The box's fade ran on three bits of ozone->flags. The main thread set two of them every iteration (the render_messagebox callback, and the input handler clearing one unless the keyboard was up) while frame() read and wrote them - on the video thread under threaded video, where the two threads' read-modify-writes of the same word could lose each other's bits, these or any other. frame() now fades the box in when its frame carries one, or the keyboard is up, and out when neither is, keeping whether it showed one in a field only it writes. The render_messagebox callback is gone; ozone_render() takes whether a box is up from the menu's own state. |
||
|
|
ff35e8d193 |
ozone: wrap and measure a message box's text only when it changes
The box's text was wrapped and every line measured with the font each frame, though it stays the same for as long as the box is up. The handle now keeps the wrapped lines and the longest width with the text and font they were made from, and a frame with the same text, font and width draws from them. The text is copied only when it changes, and a box cut short to fit the screen is wrapped again. |
||
|
|
3b9846235d |
xmb: wrap and measure a message box's text only when it changes
The box's text was wrapped, sometimes twice, and every line measured with the font each frame, though it stays the same for as long as the box is up. The handle now keeps the wrapped lines, the width they were wrapped to and the longest line, with the text and the layout they were made for (screen, font, button row), and a frame with the same text and layout draws from them. The text is copied only when it changes. The input dialog's line, which changes as it is typed, is wrapped as before, and a box cut short to fit the screen is wrapped again. |
||
|
|
331f287879 |
materialui: wrap and measure a message box's text only when it changes
The box's text was wrapped and every line measured with the font each frame, though it stays the same for as long as the box is up. The handle now keeps the wrapped lines and the longest width with the text and font they were made from, and a frame with the same text, font and width draws from them. The text is copied only when it changes. The input dialog's line, which changes as it is typed, is wrapped as before, and a box cut short to fit the screen is wrapped again. |
||
|
|
d4330754f1 |
menu: hand the message box's text over with the frame
XMB, MaterialUI and Ozone copied the box's text into their handles on the main thread every iteration, and their frame() read it there - on the video thread under threaded video, with nothing ordering the write against the read. Ozone also read the menu's own buffer from frame(). The frame info now carries the text: video_info->menu.msgbox points at the menu's buffer, and the threaded wrapper gives a frame that has a box its own copy, as it does the statistics text. Without the wrapper the drivers draw the menu's text in place, with no copy at all. XMB and MaterialUI no longer need a render_messagebox callback; Ozone's only sets its fade flags, and its fade animations are tagged with the alpha they drive. |
||
|
|
3020a024fa |
rgui: measure a message box line's glyphs once
Each line's UTF-8 length was counted for the box's width and again to centre it when drawn; the first count is kept for the second. |
||
|
|
294e68294c |
rgui: draw the message box from the menu's own text
rgui_set_message() copied the menu's text into a 1 KiB array in the handle every iteration, for rgui_render() to draw a moment later on the same thread. The handle now borrows the menu's string: it belongs to the menu handle, outlives the driver's data, and is only rewritten by the next menu iteration, after this one's render. |
||
|
|
0e48f64456 |
ozone: keep the message box's text in the handle
ozone_messagebox() freed and strdup'd the text every iteration, while the frame drew it - on the video thread under threaded video. The fade animations were tagged with that string's address, which changed each iteration, so the fade-out never matched the fade-in it kills, and a context reset dropped the string without freeing it. The text now goes into a buffer in the handle: no allocation per frame, and a tag that stays put. |
||
|
|
63d82eae74 |
xmb: keep the message box's text in the handle
xmb_messagebox() strdup'd the text every iteration and xmb_frame() copied it to the stack and freed it, so a box on screen cost an allocation, a free and two copies per frame. Under threaded video the frame runs on the video thread, which freed the main thread's string. The text now goes into a buffer in the handle, which the frame draws in place and empties. |
||
|
|
52342b0223 |
menu: center a confirm box with its buttons (#20109)
Ozone, XMB, MaterialUI and RGUI centered a confirm box on its text and then added the button room below it, so every box with buttons hung low: the Security Warning, Quit's confirm, Check Core Signatures Off and the first-run prompt. The box was only lifted when its bottom left the screen. Each driver now centers the whole box, text and buttons, and still never lifts it above the top of the screen, so a box taller than the screen is laid out as before. The plain message box is unchanged. core_warning_test checks that RGUI centers the warnings' boxes and the Check Core Signatures Off confirm. |
||
|
|
e3cdcbe82b |
menu: the menu installs its effects; drivers draw any effect
The six XMB background effects (ribbon, simple ribbon, simple snow, snow, bokeh, snowflake) were baked into every video driver as fixed shader slots, VIDEO_SHADER_MENU to VIDEO_SHADER_MENU_6. Each driver carried its own copies of the sources, built them whether or not a menu used them, and had a case per slot in its draw code. Now the menu owns them. XMB keeps one table of the effects (menu/drivers/xmb_effects.h) with each effect's sources for every backend - GLSL (legacy and core), SPIR-V, HLSL SM3 and SM4, Metal and GX2 - and how it draws (a mesh or a quad, its blend, whether it takes the ribbon data, whether it flips Y). XMB installs them through gfx_display_effect_install() and draws one by handing the draw its effect. The drivers have a single generic path: an effect_install callback that makes a program from the backend's source, and a draw that goes by the effect's flags. VIDEO_SHADER_MENU..MENU_6 are gone, and so is the shader backend's init_menu_shaders. Installs are kept in a small lock-free table in gfx_display. The programs are made on the drawing thread when the first effect is drawn, all at once, so nothing is compiled while an effect is on screen. When the video driver goes away the programs are dropped and made again under the next one. What this removes or speeds up: - Menus that draw no effect (Ozone, MaterialUI, RGUI, XMB with the effect off) build no effect programs at all. - GL: effect draws use their own program with every uniform and attribute location looked up once at compile. Before, every effect draw looked up "time", "Ribbon" and "OutputSize" by name through the shader backend, with prefix retries, each frame. The quads draw from the full-screen mesh's buffer, as the ribbon draws from its own: no vertices are uploaded per draw, and nothing is read from client memory, which a core profile does not allow. - GL core: effects no longer switch to and from the shader chain's program through the chain path; the chain program is put back only after an effect was drawn. - D3D9 (HLSL and Cg): the constant registers/parameters are found once when an effect is compiled, not on every draw. - Vulkan: display.pipelines shrinks from 9 to 3 (plastic stays at its own slot); the effect pipelines are made from the effect's own SPIR-V and remade with the passes. - D3D12: effect bytecode is compiled once; only the PSOs are remade when the render target format changes. - The seven Cg effect sources (gl_shaders/pipeline_*.cg.h) are gone. Unchanged: the plastic effect and the stock shaders keep their ids; fonts and other menus use them, and moving them buys nothing. Behaviour notes: - GL (gl2) effects need GLSL; a Cg-only GL build no longer draws them. - GL core draws effects only when built with slang (they come from the SPIR-V); without it the background is plain. - D3D9 HLSL no longer falls back to stock shading when an effect fails to compile; the effect is skipped instead. Tests: - samples/gfx/menu_effects (new): every effect carries a source for every backend, its flags hold together, and each source names the inputs and uniforms the drivers set for those flags. Each GLSL program is made through shader_glsl.c as gl2 makes it - GL legacy and core profile, GLES 3 and 2, on Mesa's EGL device - its locations checked and drawn once into a framebuffer. The SPIR-V goes through spirv-val. Cross-built with mingw-w64, the HLSL is compiled under Wine as D3D9 (SM3), D3D10/11 (SM4) and D3D12 (SM5) compile it; what Wine's compiler does not yet support (SM1 branches and loops, atan) is reported as skipped. Run in samples-gfx and samples-gfx-d3d. - samples/gfx/gfx_display_mesh covers install-once, re-making after the driver is lost, and no draw without an install. - samples/gfx/d3d9_failed_lock's ribbon test follows the new ids. |
||
|
|
303e9087c4 |
menu: Ozone, XMB and MaterialUI keep a confirm on screen
The box is centred on its text, so the buttons' room only grows it downward: at scale 1.50 the Security Warning ran off the bottom in XMB and MaterialUI, and in Ozone on a short screen. A box whose bottom would leave the screen now moves up, never above the top. If it is still too tall, XMB first wraps it wider by the font's measured width; then the box is drawn as tall as the screen with the buttons at its bottom and the text cut back to the last whole paragraph that fits, or to a line ending in "..." when the first paragraph alone doesn't. A named row too wide for the box drops its icons; one too wide even then stacks its buttons one under another, each as wide as the text column, and a stack whose labels still don't fit drops its icons too. Text, buttons and hit boxes move together; boxes that fit are drawn as before. |
||
|
|
3d041547e0 |
menu: draw a confirm's buttons as one row inside the box
Every confirm's buttons come from one getter: Cancel and OK for a classic confirm, the named buttons of the Security Warning with the highlighted one lit. RGUI draws them as one row. When three don't fit its narrowest layouts they stack one per line, the box widening to the widest button up to the framebuffer's width, and the box stays on screen. A button wider than the screen is lit where it shows. Ozone, XMB and MaterialUI lay the row out from the box's bottom edge, so it no longer drifts onto or under that edge as the text grows, as the first-run downloads prompt showed. XMB and MaterialUI placed it from the text's top, mirrored, about half a line further down per line of text. In XMB and MaterialUI a row wider than the screen no longer widens the box past it, and MaterialUI's row stops one margin inside each side of the screen; Ozone stops the box at the screen's width and packs from the left. The Security Warning's highlighted button is drawn with the cursor in Ozone and on the selection colour in XMB and MaterialUI. Its buttons carry their pad icons, and in XMB and MaterialUI Cancel and OK keep theirs. In Ozone every button keeps room for an icon, so nothing moves with the highlight, and icon and label are centred on the ink, in the cursor as drawn. The Security Warning harness now taps each button through RGUI under a scripted mouse, including a click that wakes the screensaver and a tap begun on a box since replaced. |
||
|
|
b54fc15ea9 |
core signatures: Settings > Core > Check Core Signatures
The value lives in the trust store, not retroarch.cfg, so no config file can turn the checks off. Turning them off always asks first with the OK/Back confirm, even with confirmations off; turning them on asks nothing. The row is hidden when the feature is inactive, and in a session whose store couldn't be read it shows its value but says it can't be changed. The row is a switch like Core Lock's: Left and Right leave it alone when it already sits on that side, and Start resets it to On. |
||
|
|
8498482587 |
xmb: Ribbon Particles setting
The ribbon's drifting specks of light are drawn only with Ribbon Particles on, off by default like Ribbon Glow and Plastic Effect. With it off the ribbon draws its sheet alone, as Simple Ribbon does, and the glow is made of what the ribbon draws. The Wii U, which builds the specks on the CPU, skips them too. |
||
|
|
7219a7e189 |
rgui: retain upscale column maps across frames
Rebuild the horizontal map only when its source or output width changes, and invalidate it when scratch storage is freed. Keep the infrequent map builder separate using RGUI_NOINLINE so it does not disturb the unscaled path. Reuse the existing scratch allocation and preserve upload-buffer loans and fallback copies. Cover dirty-frame reuse, changed pixels, width changes and height-only reuse in the menu framebuffer fixture. |
||
|
|
08a6f540cb |
xmb: new ribbon, Ribbon Glow and Plastic Effect
The Ribbon is a lit sheet with drifting dust, worked out from the menu's clock alone, so every frame shows it at its own time at any refresh rate. Plastic Effect shades XMB icons and text as translucent plastic, and Ribbon Glow adds a soft bloom to the Ribbon; both are settings of their own, off by default, since both cost GPU time. The Simplified Ribbon draws from the Ribbon's mesh. Drivers: - Every driver draws the sheet on the GPU from the mesh's positions, read in place; the Wii U works out only the dust on the CPU. - The ribbon's data reaches the GPU straight from gfx_display: its own buffer index on Metal, written into the mapped constants on D3D10/11/12, bound only for the ribbon draw. - With float images the glow takes one output pass. Vulkan, GL and Metal draw its capture and blurs before the frame's first pass, so the pass the menu draws in is never split, which on a tiled GPU would store and reload the whole target. Based on PR #20101. Co-authored-by: Jean-André Santoni <[email protected]> |
||
|
|
64b2dfc719 | Cleanups; reduce memsets | ||
|
|
bfb8c1517d | Menu: Standardize portrait vs landscape messagebox size and usability | ||
|
|
ec71393b7b |
XMB: free a node's console name with the node
xmb_free_node() frees the console name each horizontal-list node owns, so the playlist and Explore view tabs no longer leak it when the list is torn down (the 4-byte leaks in #20065). menu_icon_ownership now ends through main_exit(), so the menu driver's free() runs, and its xmb lane counts the copies of the fixture playlist's name made with strdup (link-wrapped) that are still unfreed afterwards. |
||
|
|
2c80e1abd6 | Add Bluetooth settings visibility option | ||
|
|
afcfce0d67 |
ozone: retain media previews through settings refreshes
Do not replace the settings preview player in browser selection or thumbnail refresh callbacks while media settings are active. Other thumbnail update paths already preserve this ownership. Exercise external movie activation, the settings mouse button, stale browser selection and thumbnail refresh notifications, playback progress and Back. Check root and subfolder paths on Windows and rendered preview pixels in the GPU menu jobs. |
||
|
|
56952c9a25 |
Android: follow-up fixes for screens on other displays (gl and vulkan) (#20044)
* rgui: upload the menu again to the video driver a reinit makes Closing content with RGUI up left the screen black until a key press. The staged content load presents frames between its stages, so RGUI can upload its framebuffer to the old video driver and clear FB_DIRTY just before the driver stage replaces that driver. The new one has no menu texture, nothing in the menu changes, and RGUI never uploads again. command_event_reinit sets FB_DIRTY after its reinit, but the staged load and video-only resets reach the menu only through context_reset, so RGUI marks its framebuffer dirty there. The menu_icon_ownership harness gets an rgui lane that reinits the video driver and checks the next upload reaches the new one. * video: draw a frame queued before a view count shrink with its views Under threaded video the wrapper ran SET_VIEW_COUNT ahead of the frame it had already claimed, so a closing core's last queued frame drew after its view chains were gone: whole, both screens stacked, until the menu's first frame replaced it. The wrapper still answers at once, but a smaller count reaches the driver only once the frames queued before it have drawn. A grow applies at once as before, with the main thread waiting for the preset parse. Vulkan and glcore therefore build view chains only when the count grows, so a deferred shrink never parses a preset. They also keep the headset's whole-frame chain across a count change: it does not depend on the count, and with chains built only on a grow nothing would rebuild it after a shrink to 0. * android: don't make a second screen's EGL surface once Java took it back Java can take the second screen's surface back between the poll that hands it over and the frame that makes its EGL surface. Skip making one then; the screens go back to the main window as they do when a make fails. Java can still take the surface back during the make itself; the node's own ANativeWindow reference keeps the window alive through that. * android: ask a display move by display id and number it A move named its display by its place in the list, and Java looked that up later on the UI thread against whatever list was newest, so a display coming or going in between could send RetroArch elsewhere. Java now gets the display id and fails the move when that display is gone. Native code now counts the ids when it compares display lists, so a display unplugged and plugged back is a new list and its failures clear. A failure was a bare flag, so one move's failure could end the next move and mark its display unable. Each move now carries a number and a failure counts only for the move it names. The move code also loses two stores that were always overwritten. * android: end the refocus hold after a move only when it is done A move onto a display that is no longer valid now fails at once instead of waiting out its timeout. The hold that keeps RetroArch's window unfocusable after a move ends only on the focus loss Android answers it with, not on a gain that was already queued; an earlier hold ends only once the new move has started; and onStop() ends a running hold rather than leaving it to its timer. * video_windows: tell an external monitor by its display type Android lists the AYN Thor's two panels and a DP monitor with the same unknown connection type, so Auto took the monitor for a second panel: on a one-screen phone Game Screen 2 went to it. Java now reads the hidden Display.getType() by reflection where it can and passes internal or external with each display. A display typed internal is never a monitor; where the type is unknown, a non-default display with an unknown connection and a product name now counts as one. * video: give a Presentation on another display its own UI wait The menu waits up to a second for the Presentation it is laid out for to show, but the wait was only counted from the first one. Once a Presentation had shown, one made on another display had no wait left and the menu fell back to the main window at once. * input: keep the menu's mouse where it was while the menu is in a window With Mouse Support on, the menu moving into the Presentation read as a mouse move to (0,0) for a frame, which marks the pointer active there. The view keeps the main window's last mouse position instead. * input: match a window's touches only from a windowed publication A publication without windows after one with them left the old window ids in place, so a window's touch lookup could still match them. Only touches published in a window match now. No Android path publishes that way today. * vulkan: copy a waiting window's views on a new frame A screen window that was up but had no free image on a new frame did not get its views copied, so a later repeat that drew it, as a pause with the menu there does, left black areas where those views go. They are copied on every new frame now. * video: load the idle logo from the assets directory without widgets The idle logo's path came from the widgets, which only start with On-Screen Notifications on, so with them off the idle window stayed black. Without the widgets' path it is built from the assets directory the way the widgets build it. * android: hold the focus when Android moves RetroArch between displays When the display RetroArch is on, or moving to, goes away, Android moves the Activity to the default display and can send that display's focus gain before the removed display's loss. A task moved to another display and straight back gets no configuration change, and can read the old display's loss last too. With the loss last, RetroArch pauses while Android keeps it focused, and no later focus event wakes it. Count these as moves, as RetroArch's own moves are: a removal, and any change of RetroArch's display it did not ask for. From Android 10, with more than one display, so is losing and regaining the top-resumed place while focused, or regaining it unfocused within a second of losing it after a loss no hold asked for. The refocus hold that covers a move's late loss then covers these too: the window is made unfocusable until Android has taken the focus, then gets the gain again. A gain already on its way skips the hold, and a move marked while RetroArch is focused ends after a second with no focus event. * samples: close test gaps in video_windows and android_focus The is_default check set the flag and read it back, so it could not fail; Auto's fallback to the default display now shows the flag at work. Cover a display listed without an ordinal, and display keys at sizes 0 to 3, two unnamed displays and a 63-character name. Drop a stale note from android_focus_test's header. * video: fix wording left over from the display rows The Screen Display sublabel still named the Separate mode, a setting the display rows removed; it now says "when it has a window of its own". The warnings for a screen window that can't be drawn, or whose surface is gone, said its screens go back to the main window, but a window that shows only the menu reaches them too. They now read like the one for a window that can't be made: what it shows stays in the main window. Comments that no longer matched the code are reworded. pointer_frame's model of the driver before the publication is named was_* rather than today_*, and a wrong commit hash and a plan tag go from the tests. video_driver_free_internal() uses VIDEO_ANDROID_RELEASE_KEPT_WINDOWS() rather than open-coding it, with no change in behaviour. |
||
|
|
9b31b1bcea |
ozone: OK on the Images sidebar tab leaves the sidebar
With the cursor on the Images tab, OK opened the list's selected image instead of moving into the list and collapsing the sidebar, and Back could not close the viewer, since Back's sidebar branch runs first. The history shortcut to the viewer now applies only outside the sidebar. The history image test enters the tab from the sidebar and presses OK. |
||
|
|
a4cde9db7d |
Fix clang warnings from the macOS build
rslc_front: the parser's error returns go through rslc_p_fail()'s false directly instead of a comma expression. encoding_deflate: the past-end refill counts its overrun in a branch. gl2: drop an unused local. record_ffmpeg: ok starts false and the lowered-thread flag lives only under FFMPEG_HAVE_THREAD_NICE. rgui: subtitle glyph counts are narrowed after clamping to the column count. r7z: pend_method takes the resumable coder's method ID explicitly as 32 bits. |
||
|
|
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
(
|
||
|
|
5bf0c36d14 |
First-run downloads: reuse the Online Updater path, fix the space check
Follow-up to the first-run download prompt (PR #18878). - Downloads go through action_ok_download_generic (new public wrapper action_ok_download_bundle) instead of a copied version of it. The copy predated the stream-to-disk sink, so a first run held the 72MB assets zip and the 52MB database zip in RAM, and skipped the check that refuses to truncate an archive still being extracted. - The free-space check asked about the target directory, which on a real first run does not exist yet: statvfs failed, -1 came back, and assets and databases were never offered. It now asks the nearest existing parent, and an unknown answer no longer blocks the download. - The prompt is an ordinary msg enum through menu_dialog_confirm_set. The 512-byte confirm_text buffer in menu_dialog, the second confirm setter and the extra branches in the iterate path are gone. - Missing bundles are scanned once at menu init into a bitmask that the confirm handler uses; directories are not walked a second time. - Offered only with HAVE_CONFIGFILE, the only first-run signal there is; dead have_bundled_assets logic removed. - path_get_free_space: GetDiskFreeSpaceExA resolved at run time (not in the first Windows 95), GetDiskFreeSpaceA fallback, no <windows.h> on Xbox, statfs on Android (statvfs needs API 19), statvfs only on platforms known to have it instead of every __unix__ target. - path_is_empty_directory: dotfiles (.nomedia, .DS_Store) do not count, the open call does not filter them outside Windows; documented. - Ozone caches the Cancel label with the other footer labels instead of measuring it every frame the dialog is up. - Pointer: one close, then confirm or cancel. - Prompt text no longer promises overlays on platforms that skip them. |
||
|
|
bf93e5568a | Add popup on first run if missing assets/controller profiles/core info files to download them | ||
|
|
535ab2e8e3 |
Menu: Bind + remap list corrections
- Fix remap dropdown title with keyboard type - Fix bind list item help texts - Fix bind touchpad icons |
||
|
|
2443ac01fe |
menu: the media viewer's title follows the image shown
In Ozone, opening an image from the file browser with OK and pressing Up/Down to step to the next image changed the picture but kept the first image's name as the title. The title was refreshed by each menu driver on a selection change, and Ozone only did that when the fullscreen view had been asked for with START. The viewer opened by OK sets the "shown" flag but not the "wanted" one, so its title was never refreshed while stepping. Every step through the viewer - the OK that opens it, Up/Down/Left/ Right, continuous playback - goes through menu_media_open_selected_file, so the title now belongs there: it takes the driver's title buffer and rewrites it for the file it opens. Ozone and XMB pass theirs; no driver can open a file in the viewer and leave the old name up. A row the viewer cannot show leaves the title alone. samples/gfx/media_controls: viewer_title drives the real menu_media_browser.c through OK, Down, a row the viewer cannot show, Down past it and Up, checking the title each time, plus truncation to the buffer and no buffer. It fails on the old code. |
||
|
|
08e5b72a88 |
Scan from the command line: exit status, Manual Scan options, playlist refresh (#19977)
* file_path: stop at the end of the path after '~'
fill_pathname_expand_special() skipped two characters after a leading
'~' or ':', so a bare "~" read past its NUL and "~x" lost the x. It
now skips the prefix and a slash after it, if there is one.
* scan: hand the callback user data and what the scan did
task_push_dbscan() and task_push_manual_content_scan() take user data
for their callback, and the callback's task_data is now a
task_dbscan_result_t: how many entries the scan added, how many its
playlists already held, and how many files matched nothing. A file is
counted by what became of it, so an archive that is expanded is not
counted as unmatched, and a loose scan's unmatched files count as
added. Callers pass NULL for now.
* scan: say in the result when a scan failed
A scan that ends before it runs (bad setup, no valid content, a DAT
that will not load) or ends with a task error now sets the result's
failed flag. A database folder that is missing or unset is treated as
an empty one, so it reports the same "no database" error instead of
finishing as if it had scanned.
* scan: count the files a scan could not read
A file whose scan fails (an unreadable file, a failed lookup) was in
no count. The result now carries an errors count for them. They do
not fail the scan.
* scan: print --scan errors on stderr and totals on stdout
A command-line scan now ends with a totals line on stdout, or with the
reason it failed on stderr. A file it could not read is listed on
stderr. The ++/==/?? marks are coloured only when their stream is a
terminal, so pipes and redirected output get plain text; on Windows
redirected output keeps its marks instead of losing them to
WriteConsole.
* scan: the manual scan finder skips a finished task
A finished scan stays in the task queue while its callback runs, and
the finder that refuses a second scan for the same playlist still
matched it, so a scan pushed from that callback was refused.
* retroarch: run every --scan, then exit with what the scans did
Each --scan is collected while the command line is parsed and run in
turn once it is done, so later options and further --scan flags are
no longer dropped. A path is expanded and made absolute first; one
that does not exist, or a scan that cannot start, is reported on
stderr and the next path still runs. --scan with --cloudsync or
--command is refused.
Without --menu the exit status is 1 if any scan failed, else 0 if any
added an entry, else 2, and a content path given with the scans is
ignored, with a line on stderr. With --menu each finished scan starts
the next, as a second scan is refused while one runs.
* manual_content_scan: clear the database name a refresh did not save
A playlist with no saved database name left the name buffer
uninitialised, and the refresh compared it against every installed
database, so whatever was on the stack could pick a database the
playlist never named.
* scan: Skip Database References names the scan's one playlist
The option was meant to put the playlist's name in each entry's
db_name, even for a database match (#18641), for users who build
their own thumbnail sets. When the scan picks the playlists, db_name
also picks the playlist an entry goes to, so with the option on every
match went to one playlist named after the content folder.
It now applies only when the scan writes one playlist, and gives
that playlist's name, a loose scan's unmatched entries included. With
the target on <Automatic>, or Fully Automatic with the option left on
from a Custom scan, matches go to their databases' playlists as with
it off; the entries of a custom playlist look their thumbnails up
under its name, not the folder's.
* scan: name the scanned folder in the start line
The "Scanning content" line, in the log and in --scan's output, has
named the database folder since the manual scan and the database scan
were merged (
|
||
|
|
311fed569e |
menu: view Images history entries in place
OK on an entry of the Images (image history) list opens the image in the menu viewer at once, in all four menu drivers, instead of offering Run and loading it as content - a load that the menu then turned into a file browser at the image's folder, so Back went to that browser. Back now closes the viewer and leaves the Images list as it was, the same entry selected; on Ozone's Images tab that also needed the depth-one Back to stop moving the selection while the viewer is open. An entry whose file is gone, or with the built-in image viewer off, keeps its Run action. The menu-media workflow runs a new history-image lane through each driver's real input path. |
||
|
|
3e4d9ae7dc |
rgui: upscale by whole factors exactly
The upscale mapped output pixels to source pixels through a 16.16 ratio rounded down, (fb_width << 16) / out_width. At any factor that is not a power of two the ratio comes out short, so the first source column and row are repeated once too often and the last ones once too few: at 3x, column 0 is three pixels wide plus one and the last column is two, and the drift moves every column boundary between them. It shows as uneven text and uneven borders at Internal Upscale 3x, 5x, 6x and 7x, and at the Auto level whenever it lands on one of those. The source of each output pixel is now floor(dst * fb / out), stepped along each row and column with a remainder, so there is no division and nothing can overflow. At a whole factor each source pixel is repeated exactly that many times. Output at 2x, 4x and 8x is unchanged byte for byte; at other factors it now matches an exact reference (checked over 1500 random sizes, factors and pitches, under ASan and UBSan). |
||
|
|
9e4aabacc5 |
rgui: draw text from row masks, build each upscaled row once
Text: every glyph pixel was a bool to test, so each character cost 50
(5x10) to 100 (10x10) branches, set or not. The font LUTs now also
hold each glyph row as a bit mask (bitmapfont_lut_t.rows, built by the
loaders from the bool LUT, which stays for the other users), and the
blits walk only the set pixels: each mask is taken 5 bits at a time
through a 32-entry table of set columns, in ascending order, so pixels
and shadows are written in the same order as before. No compiler
builtins. The eight blit variants share two helpers for the glyph.
Upscale (Menu > User Interface > Internal Upscale): the source column
of each output column is worked out once per redraw instead of per
pixel, and each output row is built once into a line buffer and copied
to every output row that repeats it. The output can be a buffer loaned
by the driver (upload heap, dumb buffer), so it is written row by row
and never read back. The line buffer is allocated before the loan is
taken, grown only when the output gets wider, and freed with the
upscale buffer.
Output is unchanged byte for byte. Text, 22 lines of 40 characters:
x86-64 armhf (qemu) aarch64 (qemu)
5x10 0.47 0.54 0.67
5x10 shadow 0.56 0.49 0.63
10x10 0.37 0.61 0.51
10x10 shadow 0.41 0.44 0.46
6x10 0.37 0.57 0.57
6x10 shadow 0.57 0.52 0.57
Upscale of 320x240, 2x to 6x: 0.27-0.39 of the time on x86-64 (at 4x,
460 us down to 145 us), 0.26-0.58 on armhf and 0.22-0.51 on aarch64
(qemu, relative only).
Tested against the old code with standalone harnesses: all ten blit
functions on random glyphs (blank, full and mixed rows, so shadows
overlap the next glyph) and random UTF-8 text across every font range,
40000 blits; the upscale loop over 600 random sizes, integer and
non-integer factors and padded pitches, under ASan and UBSan. Changing
the walk order, run step or line reuse makes them fail. Builds clean
with GCC (gnu99 and gnu89 with -Wdeclaration-after-statement, with and
without HAVE_LANGEXTRA) and Clang.
|
||
|
|
2f46e4c979 | android: integrate hardware movie decoders with Vulkan imports | ||
|
|
18cd961f51 |
media: retain transport state across video context resets
Save the current movie path, position and pause state before the viewer releases its player. Restore only the matching movie once its transport is ready, and discard saved state on media changes or cancellation. Cover delayed readiness and refusals in the shared controls tests, plus paused-position recovery through a real driver reset in all four menu harnesses. |
||
|
|
ccd885c4f2 |
Temporal Upscaler: DLSS Neural Rendering
DLSS 5's Neural Rendering model runs over DLSS Super Resolution's output when its library, nvngx_dlssnr.dll, is in the DLSS directory. It goes through the same NGX session as Super Resolution: the driver's NGX core loads the library from the directory it is given at init, creates the feature (18) on the frame's command buffer and evaluates it on Super Resolution's output with the core's depth and motion vectors at render size. Cores before its driver (616.64) have no such capability; the session then marks it unavailable and Super Resolution goes on alone. Settings > Video > Scaling > DLSS Neural Rendering holds the switch, off by default, and the model's tuning: preset, style, intensity, local structure, local tone, skin structure and auto skin mask. The entry is shown only with DLSS selected, the library found, NGX not OptiScaler's, and no session having found the driver without it. The settings reach the backends as one word. The model reads its tuning only at creation, so a changed setting rebuilds the feature once it has held for 30 frames; turning it off retires the feature through the same ring as Super Resolution's. System Information and the log name the library's version, read from its file without loading it, or say the driver needs updating. The upscaler samples drive both backends against stand-in NGX cores that know the feature: the tuning at creation, the evaluate's inputs and guide sizes, the rebuild after a change holds, the release when off, and a core without it; the loader sample finds the library and reads its version. |
||
|
|
184f65aa03 |
menu: image picks keep their OK action in the media viewer (#19911)
The fullscreen viewer opens a file-list row only when it is not a FILE_TYPE_IMAGE pick, so choosing a Background image in XMB sets the wallpaper again instead of opening the image. The same rule gates OK in the viewer on XMB, Ozone, MaterialUI and RGUI. The menu media harness gains --wallpaper-pick, which goes through the Background setting and its browser with the real driver and callbacks; it runs for XMB and MaterialUI, the menus that offer the setting. Closes #19911 |
||
|
|
77f2e5d56e |
menu: keep media playing while browsing its settings
Retain the current media preview across settings navigation and restore the fullscreen viewer on Back without changing playback or pause state. Cover all four menus, real browser rebuilds and visible preview pixels. |
||
|
|
a352690514 |
media: add continuous folder playback and fullscreen settings
Advance naturally sorted folder movies only after clean playback completion. Retain the final frame, stop on decode errors, and expose previous/next and settings controls in all four menu drivers. Drain terminal AV1 output and update preview audio repeat policy without reopening the player. Cover completion, queue lifetime, invalid next files, toolbar actions and native menu presentation. |