Open
Conversation
Co-authored-by: Adrien Beudin <beudbeud@gmail.com>
- Point to existing image when the overlay cfg reuses a path - `images` array in `input_overlay_t` holds unique `texture_image`s
- When overlay_next is pressed, block only that touch pointer - Move desc touch masks to similar descs in the next overlay so that range_mod carries over
Use second touch as a mouse button while controlling the cursor.
…18587) When launching a different game via FLAG_ACTIVITY_CLEAR_TOP (e.g., from Daijishou), onNewIntent() was calling finish() + System.exit(0), which killed the app without restarting. Users had to tap twice to launch a new game. Now starts a fresh activity with FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK before calling System.exit(0). This queues the new game to launch, then kills the current process so Android starts fresh.
Co-authored-by: PoloniumRain <poloniumrain@users.noreply.github.com>
ps2atad IRX requires ps2dev9 IRX, the former has to be unloaded before the latter.
This partially reverts commit e824225. The strlcat was irrelevant to the strlcpy in the previous line. The result was that the : was added at a random point in the string.
Renamed "mountPoint" to "partition" and "mountString" to "mountPoint". Previously, "mountPoint" and "mountString" were misleading as the data they hold are the partition and the mount point, respectively. This change aligns variable names with the actual data to improve readability.
Commit 3e0a4fa unconditionally appended a slash to the CWD, assuming that it never ends with one. However, this is not always true (e.g. when CWD is the root of the device).
Workaround for PS2SDK issue ps2dev/ps2sdk#805. PS2SDK's initialization routine does not properly set the CWD for HDD paths, leading to all slashes being converted to backslashes. This change ensures that they are converted back to slashes, until the issue is properly fixed in PS2SDK.
PS2: Fix booting from internal HDD
* Makefile.ctr: enable gc-sections This frees ~160k of RAM without any downsides that I know of. It's not much, but helps pcsx_rearmed on old3ds where it barely fits in RAM. * remove some dupe logic Regardless if `save_state_in_background` is enabled or not, it does exactly the same so the check can be removed. * optimize RAM state load content_load_state_from_ram() doesn't need the backup copy, content_save_state() never touches the ram_buf. It seems the whole logic was copy-pasted from content_undo_load_state() without thinking. * avoid useless memory use and copying Just take the source pointer instead of making a copy and then freeing it. This is a big deal on slow platforms having to deal with large states, like psx on old3ds. * allow the core to disable the savestate undo feature The undo feature may amount to at least 4 simultaneous buffers: save undo, load undo, the current save/load buffer, temporary buffer. When emulating a system with relatively large states on a system with little RAM (like PSX on old3ds) that amounts to something like ~18MB of ~42MB available to the core. Under memory pressure the libctru variation in RetroArch tries to salvage some memory from the main stack and linear memory, but since those are variable, they start to overlap creating instability. The solution is to just disable the undo feature.
* D3D11/D3D12/Vulkan: Disable internal HDR10 conversion for RGBA16 output When a shader preset's last pass explicitly outputs RGBA16, disable the internal hdr10 conversion flag the same way RGB10A2 already does. This lets the user's shader fully control HDR10/PQ output rather than having the internal conversion applied on top. * Refactor HDR setting: replace EnableHDR bool + Linearize with HDRMode uint enum Replace the bool video_hdr_enable toggle and separate Linearize shader uniform with a single HDRMode setting (0=Off, 1=HDR10, 2=scRGB). Menu now shows HDR: Off/HDR10/scRGB instead of Enable HDR: ON/OFF. Slang semantic renamed from EnableHDR (float) to HDRMode (uint). Internal HDR pipeline shader updated to use HDRMode == 2u for scRGB path. * Vulkan: Fix scRGB HDR pipeline mode using emits_hdr10/hdr16 flags The runtime game_hdr_mode selection used back_buffer_format from get_pass_rt_format() to decide between mode 2 (sRGB→scRGB) and mode 3 (PQ→scRGB). However, the last pass's rt_format is overwritten with the swapchain format in shader_vulkan.cpp, so it always returned RGBA16F in scRGB mode regardless of the shader's #pragma format. Use vulkan_filter_chain_emits_hdr10/hdr16() instead, which are set before the rt_format overwrite and reliably reflect the shader's declared output format. * Vulkan/D3D: Add scRGB HDR pipeline with PQ→scRGB and sRGB→scRGB conversion Add HDRMode enum to shaders (0=passthrough, 1=HDR10, 2=sRGB→scRGB, 3=PQ→scRGB). Swapchain format selection driven by menu HDR mode: Off→B8G8R8A8, HDR10→A2B10G10R10+ST2084, scRGB→R16G16B16A16F+ExtLinearSRGB. ConvertHDR10_To_scRGB() decodes PQ, converts Rec.2020→Rec.709, and scales by 125 (10000/80 nits). GLSL and HLSL shaders updated in parallel. * D3D12: Port scRGB HDR support and fix shader pass HDRMode semantic - Port scRGB swapchain/format/colorspace selection from Vulkan driver - Fix 16-bit format: UNORM→FLOAT for R16G16B16A16 swapchain - Add HDR10↔scRGB mode change detection (triggers swapchain resize) - Set hdr_mode UBO at all 3 HDR draw points (stock, back_buffer copy, menu) - Fix back_buffer format to match shader's declared output (prevents 10-bit PQ data being quantised to 8-bit through R8G8B8A8 intermediate) - Fix shader pass semantics: enable_hdr(float)→hdr_mode(unsigned) to match SLANG_SEMANTIC_HDR (uint), and expand_gamut(float)→unsigned to match SLANG_SEMANTIC_EXPAND_GAMUT (uint) - Fix configuration.c: move video_hdr_mode from bool to uint settings section * GLSL/HLSL: Rename ConvertHDR10_To_scRGB, add kscRGBWhiteNits constant - Rename ConvertHDR10_To_scRGB() to HDR10ToscRGB() - Add kscRGBWhiteNits = 80.0 constant (scRGB reference white) - Replace all hardcoded 80.0 with kscRGBWhiteNits - Replace hardcoded 125.0 with kMaxNitsFor2084 / kscRGBWhiteNits * D3D11: Port scRGB HDR support and fix shader pass HDRMode semantic Port all scRGB HDR changes from D3D12 driver to D3D11: - Replace per-pass EnableHDR float with HDRMode uint semantic - Fix 16-bit swapchain format (R16G16B16A16_FLOAT, not UNORM) - Add swapchain bit depth selection: scRGB→16bit, HDR10→10bit - Add scRGB colorspace (DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709) - Dynamic swapchain resize on HDR mode changes (Off/HDR10/scRGB) - Full hdr_mode logic in shader preset loading and HDR pipeline - Mode-aware UBO values at all 3 upload sites (Point 1, Point 2, menu/overlay composite) with proper save/restore of hdr_mode - Per-pass HDRMode semantic uses video_info->hdr_mode (menu setting) not pipeline conversion mode, so shaders see 1 for HDR10 * Vulkan/D3D: Add colour boost (ExpandGamut) to scRGB HDR path The scRGB (HDRMode 2) non-scanlines path was ignoring the ExpandGamut setting entirely. Now applies gamut conversion matching the "Colour Boost" menu option: 0 (Accurate): k2020to709 — convert to clean Rec.709 1 (Expanded): kExpanded709to2020 * k2020to709 — slight saturation boost 2 (Wide): kP3to2020 * k2020to709 — wider boost 3 (Super): passthrough — no gamut conversion Updated in hdr.frag (Vulkan) and hdr_sm5.hlsl.h (D3D11). * GLSL/HLSL: Fix ExpandGamut matrices and scRGB scanline path Replace incorrect gamut conversion matrices that treated Rec.709 input AS the target colourspace (kP3to2020, kExpanded709to2020) with proper 709-to-target matrices (k709toP3, k709toExpanded709) computed as k709to2020 * k2020toTarget. Fix scRGB scanline path: skip InverseTonemap (HDR()) for HDRMode==2 since scRGB input is already in linear HDR, but keep LinearToSignal gamma 2.4 encode needed for CRT scanline simulation. Always apply k2020to709 back-conversion in scRGB paths regardless of ExpandGamut level, so Super mode gives maximum colour boost (matching HDR10 behaviour). * D3D12/D3D11: Fix HDR pipeline format mismatch for scRGB Fix D3D12 validation error where HDR pipeline state objects (PSOs) were hardcoded to R10G10B10A2_UNORM but the scRGB swapchain uses R16G16B16A16_FLOAT. Extract HDR PSO creation into d3d12_gfx_init_hdr_pipes() which creates both stock HDR shader pipes and sprite HDR pipes for a given render target format. Called at init and dynamically recreated whenever the swapchain format changes (e.g. switching between HDR10 and scRGB). Fix D3D11/D3D12 hidden HDR pass detection: only insert a conversion pass when the shader output has LOWER precision than the swapchain. RGBA16F writing to a 10-bit HDR10 swapchain is just a precision downsize the hardware handles naturally.
Co-authored-by: Hunter Sadler <aurokin@users.noreply.github.com>
Change the direct bl initSystem to a register-indirect call f724cc3 added -ffunction-sections -fdata-sections and -Wl,--gc-sections to Makefile.ctr. While this saves ~160KB RAM by enabling dead code elimination, it has a side effect: every function now gets its own ELF section (e.g. initSystem goes into .text.initSystem). The linker is free to place these sections in any order, and with a large core like ScummVM, initSystem ends up >32MB from the .crt0 section at the start of the binary. The ARM bl (branch-with-link) instruction at line 43 of 3dsx_custom_crt0.s only has a +/- 32MB range. When initSystem is beyond that range, the linker emits relocation truncated to fit: R_ARM_CALL. This fix uses the same pattern already used for main (lines 52-54: ldr r3, =main; bx r3). The ldr r2, =initSystem loads the absolute address from a literal pool, and blx r2 branches to it with no range limitation. The bl ClearMem call is fine because ClearMem is defined locally within the .crt0 section.
Co-authored-by: PoloniumRain <poloniumrain@users.noreply.github.com>
Add separate HDR10 and scRGB support flags so the menu only shows HDR modes that the driver actually supports. Vulkan enumerates surface formats to set each flag independently; DXGI sets both when the display reports PQ/ST.2084 (Windows HDR compositor guarantees both paths). The HDR mode selector range is dynamically capped and unsupported modes are clamped at swapchain creation time.
…ning - Port Sony Megatron v2 scanline chromaticity fix to internal shaders (hdr.frag and hdr_sm5.hlsl.h): scanlines now computed in Rec.709 space to prevent chromaticity shift from per-channel beam widths - Switch internal scanline from gamma-space to linear-space to match Megatron v2 (fixes darker/narrower scanlines vs external shader) - Add scRGB mask softening warning to HDR mode sublabel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.