Commit Graph
57 Commits
Author SHA1 Message Date
xbzk 54c3d10b86 [vk, renderdoc] (VUID-02997) avoid vk_image_view as VK_NULL_HANDLE when feature nullDescriptor is unavailable (#4056)
This minor change in src\video_core\renderer_vulkan\pipeline_helper.h allows renderdoc capture on mhr sunbreak.
Maybe it sanitizes some crashes on old vulkan GPUs.

Device log (nvidia kepler gpu vulkan 1.1.117):
[  17.605262] Render.Vulkan <Info> video_core\vulkan_common\vulkan_device.cpp:1041:GetSuitability: Device doesn't support feature nullDescriptor

VUID-VkWriteDescriptorSet-descriptorType-02997
For sampled/combined/storage image descriptors, Khronos says imageView must be valid or VK_NULL_HANDLE
(https://docs.vulkan.org/refpages/latest/refpages/source/VkPhysicalDeviceRobustness2FeaturesKHR.html)

but then it says: if nullDescriptor is not enabled, imageView must not be VK_NULL_HANDLE.
(https://docs.vulkan.org/spec/latest/chapters/descriptorsets.html)
nullDescriptor is exactly the feature that allows descriptors to be written with null handles.

The fix relies on conditionally replacing the null sampled view with Eden’s dummy null-image-view object (ImageView constructor checks HasNullDescriptor which checks features.robustness2.nullDescriptor. cheap checks, and only for null handles, so no notable cost).

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4056
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
2026-07-02 03:23:08 +02:00
xbzk bdf60d79a0 [video_core] gate Mesa EXIT terminator detection behind non-proprietary driver (#4151)
FIXES A REGRESSION FROM 4012.

TryFindSize's Mesa fallback matched the unconditional @PT EXIT (0xE30000000007000F) that nv50_ir emits at program end.
That exact word is also emitted by NVN mid-program for unconditional early-outs, so on retail titles (e.g. Super Mario 3D World) the scan truncated at the first early EXIT and dropped the rest of the shader, making textures vanish.

Mesa's terminal EXIT and NVN's mid-program EXIT are bit-identical, so no mask can separate them. Gate the heuristic on !is_proprietary_driver:

NVN binaries (bindless cbuf slot 2) keep self-branch-only sizing, while nouveau/Mesa homebrew (single terminal EXIT, no self-branch trailer) still uses the EXIT terminator. nv50_ir emits exactly one EXIT (early returns lower to BRA-to-exit, discard to DISCARD), so a single terminal match is correct for that path.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4151
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
2026-07-01 13:06:00 +02:00
xbzk b6ee847947 [hle/am] make Service::Process move-only to fix #3908 KProcess use-after-free (#4137)
#3908 changed process_creation.*, CreateProcess/CreateApplicationProcess, to return std::optional<Process> instead of std::unique_ptr<Process>, so the AM sites now transfer a Process by value via make_unique<Service::Process>(*std::move(opt)).

The consequence: Process owns a refcounted KProcess* but its user-declared dtor suppressed the implicit move ctor, so that "move" silently shallow-copied and the temporary's dtor Close()/RemoveProcess()'d the shared handle -> use-after-free.

It's seems to be user end based, so whether it crashes may depend on machine, compiler, allocator reuse, refcount slack, and the AM event-observer thread race, idk. It reliably crashed my MSVC build at launching games (cstack: ProcessHolder -> MultiWait -> KSynchronizationObject::Wait -> null) multiple times.

Fix: give Process a move ctor that steals the handle (nulling the source so the moved-from dtor is a no-op) and delete copy/move-assign, making the optional<->unique_ptr transfer safe.

Bonus: explicited delete for the 3 kinds of assignment: copy ctor (the one used in eden), copy assign and move assign (currently unused) to force compile error if they ever come to use.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4137
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
2026-06-29 02:39:11 +02:00
xbzk 09b6b3b71e xbzk/gpu-logging_qt-controls_android-fix (#4018)
5af7771f83-Bugfix: Made gpu_log_level global-only (was per-game switchable). Fixed Android non-determinism where a per-game profile silently overrode the global to Off and trapped GPULogger::Initialize() in a dead state, making shader dumps fail invisibly. Android per-game UI now hides the whole GPU logging block; Qt UI is untouched (global-only anyway).

bf4aabe8ab-Refactor/Cleanup: Removed gpu_logging_enabled master toggle as redundant with gpu_log_level == Off. Introduced GPU::Logging::IsActive() helper, replaced 14 call sites across vk_*.cpp. Refactored LogShaderCompilation() to be text-only and extracted SPIR-V dumping into a standalone GPU::Logging::DumpSpirvShader() free function. No singleton dependency, gated only by gpu_log_shader_dumps. Now gpu_log_level and gpu_log_shader_dumps are fully orthogonal. Cleaned up Android (BooleanSetting, SettingsItem, presenter, 7 locale string files).

865a1c5027-Refactor: Renamed dump_shaders → dump_guest_shaders to disambiguate from gpu_log_shader_dumps. Updated Qt label to "Dump Guest (Maxwell) Shaders" and rewrote the tooltip to mention .ash, the DumpDir/shaders/ location, and nvdisasm.

7cab456fdf-Feature: Added Qt UI control for GPU log level in the Logging session. Added gpu_log_shader_dumps checkbox to the Graphics column right below dump_guest_shaders.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4018
Reviewed-by: MaranBr <[email protected]>
2026-06-27 02:52:13 +02:00
xbzk 73918d23d5 [video_core, maxwell] fixes for homebrew games that use MESA compiler (#4012)
two main issues:

shader_environment.cpp

Support Mesa nv50_ir-compiled homebrew fragment shaders
Mesa nv50_ir (used by NZP-Switch via libdrm_nouveau) emits Maxwell SASS that differs from NVN in two ways our shader pipeline didn't account for, causing "infinite" loops during shader scanning.

How?  TryFindSize() previously detected end-of-shader only via NVN's "BRA $-1" self-branch trailer (SELF_BRANCH_A/B). Mesa-compiled shaders end with an unconditional @PT EXIT and emit no trailer, so scanning ran past the shader and looped to MAXIMUM_SIZE.

Fix: Added a secondary match against @PT EXIT T (opcode 0xE30, predicate PT, flow T) as a fallback terminator. The mask is estrictive enough to reject predicated EXITs, conditional-flow EXITs, and sched control words, so well-formed NVN shaders see no ehavior change (their single @PT EXIT immediately precedes BRA $-1, and both detections return the same size).

load_store_attribute.cpp + attribute.h

IPA's is_perspective check only applied the ×position_w correction for IR::IsGeneric() attributes, and used a per-component SPH lookup. Two failure modes followed:

1. Mesa fragment shaders read varyings via legacy attribute slots
(ColorFrontDiffuse, FixedFncTexture, FogCoordinate) which are
remapped to generic varyings later by ConvertLegacyToGeneric. At
IPA-translation time they're still legacy, so IsGeneric() was
false and the inject was skipped — but the resulting GLSL/SPIR-V
varying was Smooth (perspective-correct), and the SASS still
issued its manual perspective dance via MUFU.RCP(ATTR_W)+FMUL,
compounding an extra ×clip_w factor. NZP fog (eye_z distance
varying) ended up as eye_z⁴×density² instead of eye_z²×density²,
saturating fog to white everywhere.

2. Even for legacy attrs that should inject, Mesa stores them in two formats selected by the IPA's interpolation_mode field:
Pass/Multiply/Constant → attr/w (perspective); inject ×position_w
Sc (ScreenLinear)      → raw attr; do NOT inject
Unconditionally injecting for Sc dims vertex colors by 1/clip_w because there's no SASS multiplier to round-trip it back.

Fix: extend the IPA correction path to also fire on IsLegacyAttribute(), gated on interpolation_mode != Sc. While here, the generic-path check is widened from per-component to vector-level (first non-Unused PixelImap, with all-Unused fallthrough treated as Perspective) so it matches the GLSL interpolation qualifier picked by CollectInterpolationInfo — this fixes the same all-zeroed-imap case Mesa exposes for explicit generics. IsLegacyAttribute moved from translate_program.cpp's anonymous namespace into attribute.h next to IsGeneric so IPA can reach it.

Tested on NaziZombies:Portable (Switch homebrew): fog now matches real
hardware, vertex-colored geometry (hand, gun, decals) renders correctly.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4012
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
2026-06-15 03:05:11 +02:00
xbzk 78a1cd0533 [hle] support passing arguments to homebrew applications (#4013)
Homebrew (.NRO) program args support

Adds a 'program_args' setting and delivers it to NRO homebrews via libnx's homebrew ABI. NROs previously had no way to receive CLI flags (e.g. NZ:P's -noglsl).

Setting: program_args, Category::System, startup-only.
Surfaced in Qt + Android Debug sections.

NRO loader: builds a 4-entry 'ConfigEntry' table + argv at the data segment tail; prepends 'homebrew ' so user args land at argv[1]; scans for 'svc #7' to use as LR. Drops the stale NSO-style argdata append.

KProcess: stores loader-provided guest addresses; 'Run' switches to the homebrew entry (x0=config_ptr, x1=-1, lr=svc7) and patches the real MainThreadHandle into the ConfigEntry slot. Legacy NSO path unchanged.

Tested on NZP — args reach 'argv' correctly.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4013
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
2026-06-15 03:02:33 +02:00
xbzk 026974211e [vk, homebrew] ETC2 format list added (#4061)
Liz' command. ETC2 format list added. Used mainly in homebrew, NZ:P for example.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4061
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
2026-06-15 03:00:58 +02:00
xbzk ec2b9b0400 [vk, renderdoc] fixed zero-sized streambuffer bug on old heap-absent GPUs (#4052)
This fix a bug in which eden crashes when renderdoc is attached to vulkan.
that kept me away from renderdoc for around a year now.

the bug:

in video_core\renderer_vulkan\vk_staging_buffer_pool.cpp
in GetStreamBufferSize(...)
if device.HasDebuggingToolAttached()
but heap is empty/unavailable <-- Case in my old nvidia kepler gpu

the original method returns size 0, right?
the change honors same original behavior, while covers my case properly, returning MAX_STREAM_BUFFER_SIZE.

addl some log tip and some minimal doc. fully safe. let it rip.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4052
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
2026-06-03 05:02:13 +02:00
xbzk 8e5419209c [video,buffer] rewrite storagebufferbinding size() lambda to be full data driven instead of cbuf_index based (#4041)
fixes an yxzx era bug where eden assumed NVN-style packed SSBO descriptors (u64 gpu_addr followed by size) only happen in cbuf_index == 0.

Mega Man Star Force Collection proves that assumption is false. It has an unbiased/global-memory SSBO descriptor in cbuf_index == 3, offsets 0x100/0x300, but the descriptor still appears to be { address, size }.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4041
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: crueter <[email protected]>
2026-06-02 03:31:59 +02:00
xbzk 8a11bec55a [vk,fence_manager] improvement for antiflicker showed bad for some games, so it was removed from balanced/accurate and kept for antiflicker toggle only (#4010)
in short:

unrelated to the toggle, we found a missing piece that improved antiflicker and shader issues in some games, and we integrated it to balanced/accurate.
now testers confirmed side effects in some other games, so we reverted the integration.

the toggle itself is innocent. and the missing piece was kept for the toggle.
now, when the toggle is off, things are as they were before it.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4010
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
2026-05-26 01:41:11 +02:00
xbzk eabd1017cc [fence_manager, ui] antiflicker fix + toggle integration (#4004)
tldr: we (me and maran) found the missing piece to make delay_fence and should_flush coop and cover all remaining flicker issues tested so far.
the lil change is in src/video_core/fence_manager.h
the rest is toggle stuff.

END

(credits rolls up)

post credits scene for the toggle drama:

i've been forced to use custom builds for around 1 year now, coz gpu mode above fast was pulling performance down yet not covering flicker entirely in most games tested. and we know that it's a mess to rely on gpu mode as it brings along a bunch of undesired stuff.
i need this toggle. and i've seem far less relevant before, so hey, gimme this one so i can call it mine :3

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4004
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
2026-05-24 01:02:01 +02:00
xbzk 83683440b2 [net] ban api.epicgames.dev domain (#3999)
Adding 'api.epicgames.dev' to the banlist, as instructed by lizzie.

MCI insists on connection and randomly crashes at Network::Poll(...).
Airplane mode would do, but then the DLC gets unavailable.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3999
Reviewed-by: Maufeat <[email protected]>
Reviewed-by: Lizzie <[email protected]>
2026-05-22 22:48:15 +02:00
xbzk 27cadb24f3 [android, intent] Run restoreContentForGame for shortcut launching + Improve custom settings context for shortcut launching (based on normal launch) (#3854)
intended to fix two bugs identified by Pavel upon android shortcut launching (and prolly all FEs since the rely on intent launching too):
1. external content not loading: fixed by running restoreContentForGame  for per game mount in content path.
2. custom settings no loading: that was proven to be user side, but adjustments were made to match normal launch.
should be harmless for normal usage. once validated can be merged.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3854
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-04-14 00:21:51 +02:00
xbzk abb616c357 [vk,swapchain] vsync: Changed Immediate fallback from (FIFO) to (Mailbox, then FIFO) (#3746)
Just discovered that stock adreno drivers on a730 had no Immediate VSync mode available, and it was falling back to FIFO, which causes a lot of response delay in Unity games.

But if someone chose Immediate, it prefers low latency above buffering, so Mailbox is his friend, and FIFO is his nemesis.

So i just changed Immediate to fall back to Mailbox first, and only if Mailbox is not available either it falls back to FIFO:

Immediate -> Mailbox -> FIFO;
Mailbox -> FIFO;
FIFO Relaxed -> FIFO.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3746
Reviewed-by: crueter <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-04-11 02:49:55 +02:00
xbzk b4a485e244 [android, intent] Added proper ext content mount and game swap support for intent launch (#3755)
Required so that frontends can launch a game while there is already one running (for CocoonFE usage)
Fix for mounting external content was merged.
This patch also fixes multiple reasons for infinite game "Shutting down..." issue (hope all, who knows...)

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3755
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-31 21:59:57 +02:00
xbzk 81a344f3db [android,addons] after a crash, launch button will wait for reloadGames to complete, and system will initialize after global config for proper firmware mounting (#3803)
This fixes two problems:

1. After a crash, it was possible to launch a game before external content gets mounted. Now the button will wait for it to complete.
2. Directory initialization was init system before init globalconfig, so after a crash firmware was not being remounted
(have you ever noticed fw version = N/A in device overlay, after fiddling with applets?)
(this had been fixed in 3755, which was not thoroughly tested by cocoon dev)

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3803
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-31 21:32:24 +02:00
xbzk 5856beac54 [android,addons] per-game screen ext content unmount upon rotation hotfix (#3788)
Fix the bug reported by Pavel in which when per-game settings screen is rotated a reloadGames() call causes external content reference to be missing.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3788
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-27 20:55:31 +01:00
xbzk f0d77e86e3 [android,ui] driver management: fixed driver add/removal unsync (#3757)
Complementary for 3750.
User found a way to get same driver doubled and deleting one would lead to a crash.
Reason: manual driver install was still adding drivers directly to adapter, instead of thru drivermodel. fixed.
Also added guards against crash upon driver removal.
Thoroughly tested.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3757
Reviewed-by: Maufeat <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-25 12:13:04 +01:00
xbzk 5ebdb29afd [android,ui] feat fullscreen app setting (#3676)
why not? i like it a lot on both phone and TV.
toggle in app settings. disabled by default so no hassle.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3676
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-22 02:06:45 +01:00
xbzk 844e0360c7 [addons] fixed manual installation from per-game fragment (#3743)
maybe consequence of code centralization. reverted for now.

-please test: install update from per-game path
-install update on manage eden data path
-install update when another update is already installed and check both versions

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3743
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-19 05:38:57 +01:00
xbzk 2650d22057 [android,ui] driver management: uninstall and refresh upon install hotfix (#3750)
To fix orphan fragments' black flicker transitions, these fragments were bounded to SettingsSubscreenActivity.
Since driver removal is queued for when leaving driver screen, but new activity dies too soon, old uninstall was being cancelled.
Changed to uninstall directly upon leaving screen. Also fixed the driver list refresh right after driver installation (prolly compromised for the same transition reason).

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3750
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-19 03:54:13 +01:00
xbzk 4a60085a76 [android,settings] fix for *_combined (fastmem, gpu unswizzle) kotlin side only settings being unnecesarily requested to native (#3724)
Fixes jni reporting error when these settings change.
Combined settings are the grouping reference for settings like gpu unswizzle.
As far as i recall, fastmen only uses it coz it has a sub setting in the past.

[ 445.450666] Frontend <Error> main/jni/native_config.cpp:33:getSetting: [Android Native] Could not find setting - gpu_unswizzle_combined
[ 450.054470] Frontend <Error> main/jni/native_config.cpp:33:getSetting: [Android Native] Could not find setting - fastmem_combined

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3724
Reviewed-by: DraVee <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-14 03:30:37 +01:00
xbzk 2aea7f9584 [android,settings] addons: fix crash when launching Install addons from per game addons menu (#3727)
to fix navigation issues (PR3699), i've bounded all orphaned fragments to SettingsSubscreenActivity.
(IIRC that were tested, whatever) Somehow the launching from per-game settings (where addons fragment is bounded to MainActivity got broken).
This PR just made ContentTypeSelectionDialogFragment self-sufficient so it lives under both MainActivity and SettingsSubscreenActivity.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3727
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-13 19:46:35 +01:00
xbzk 2896fa3835 [android,ui] chore: settings subscreens transition and other minor conformances (#3699)
- Fix black screen in transition animations

- Adjustments to about fragment
made about text more label and less button like, header transparency, spacing adjustments, word Contributors replaced by People in Contributors field for de-duplication.

- installable actions code de-duplication
Extracted install/update/import firmware/user data flows into InstallableActions.kt and reused it from MainActivity and InstallableFragment, reducing duplicated logic, ensuring single source of truth.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3699
Reviewed-by: DraVee <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-11 22:47:16 +01:00
xbzk a1b50e9339 [android] patches bin button + version bug fixes (#3691)
This fixed the delete button enabled for external content (which is auto handled and the proper way to get rid of them is either by removing its folder from ext content list, or removing the file itself) by streaming patch source thru jni.

Along the way stumbled upon another bug: If you have an external content update installed (say latest version for example) and you NAND install a previous update (like in silksong's hard mode update), the newest update version string would leak to the previous one.

Did videos for both. Fixed both. Seems good to go.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3691
Reviewed-by: crueter <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: DraVee <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-09 00:30:10 +01:00
xbzk 7a17fd8c71 [android,ui] chore: minor standardization layout (#3694)
Amost no visual differences, but tons of layout cleanups and fixes
Most notable change, Freedreno option only show on Adreno GPUs

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3694
Reviewed-by: DraVee <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-08 16:16:23 +01:00
xbzk 9423a33fc2 [android,ui] fix addons list not refresh upon rotation (#3687)
Fixes a bug reported by Pavel, in which an RC as returning empty patchList after phone rotated.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3687
Reviewed-by: DraVee <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-08 00:41:40 +01:00
xbzk ddac8c8eb5 [vk] fix crash introduced in 9a07bd0570 (#3685)
Fix for current crash on master.
Just reverted only the necessary stuff so that PresentManager can hold a reference to khr and resist death upon application hold/restore.
@Lizzie shall judge.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3685
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-06 19:52:17 +01:00
xbzk 529b069499 [android,ui] fixed top disalignment between buttons of each column in settings fragment (#3675)
this silly little thing tickles obsessive compulsive disturbed fellas a lot hu3
was shipped along PR 3660, which was rediscussed for other reason, hence this tiny lonely PR.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3675
Reviewed-by: DraVee <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-05 13:58:46 +01:00
xbzk 05f6942bef [android, ui] fixed setting reset to defaults infinite loop (#3659)
fixed a bug discovered by Pavel in which the settings' "reset to defaults" dialog would get stuck in a infinite loop, due to a recall prior to cleaning state.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3659
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: DraVee <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-05 00:58:49 +01:00
xbzk 7f5de6bcd6 [android/fs] external content loader + nca/xci patches (#3596)
Foreword: WHY DON'T EVERYBODY USE ONE FOLDER FOR EACH GAME+CONTENTS? AIN'T THIS THE FORMAT GAMES COME WHEN YOU BUE THEM? DO YOU LIVE WITH ALL YOUR FRIENDS AND HAVE A 2ND HOUSE FOR ALL THE CHILDREN?

Nice, i feel better now.

This feat extends Maufeat's work on external content loading. It harmonically additions:
"...also, if in each game folder X, you find a folder Y, and in this folder Y you detect ONLY a single game, then mount all external content for that game found in that folder Y and its subfolders."
Permanent (not toggleable). External Content folders are supported equally.

Also:
-Reworked several routines for preserving single source of truth between android and other systems;
-Fixed the annoying unknown format error for content files, by providing proper format detection.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3596
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-04 22:51:35 +01:00
xbzk a8fc994c0b pr3655 gradientbordercardview fix (#3658)
This complements PR3655, where a change in theme setting caused gradientbordercardview theme color setting mismatch.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3658
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-03-01 23:21:26 +01:00
xbzkandDraVee 963f9981ce [chore] Resolve more "warning C4127: conditional expression is constant" while building under MSVC (#3595)
NOISY warning on NINJA MSVC build log.
Complement for PR 3567. Now in another place.

D:\dev\eden\src\dynarmic\src\dynarmic\backend\x64\emit_x64_vector_floating_point.cpp(207): warning C4127: conditional expression is constant
D:\dev\eden\src\dynarmic\src\dynarmic\backend\x64\emit_x64_vector_floating_point.cpp(207): note: consider using 'if constexpr' statement instead

Signed-off-by: xbzk <[email protected]>

Co-authored-by: DraVee <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3595
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: DraVee <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-23 06:40:42 +01:00
xbzk 978ba3ed6f [android,ui] added toggle to swap confirm/back buttons (#3601)
Most android joypads has xbox layout, so while when in UI CONFIRM buttom (A) is the bottom one, in games it is the right one. And the opposite for BACK (B) button.
And that kinda sucks. And some users complained, so i had this idea.
Disabled by default. Toggle in the lonely App Settings menu. No impact at all.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3601
Reviewed-by: DraVee <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-22 06:04:41 +01:00
xbzk d19303883e [chore] Resolve "warning C4127: conditional expression is constant" while building under MSVC (#3567)
NINJA REPORTS THIS SHIT ALMOST EVERY STEP!

[161/863] Building CXX object src\hid_core\CMakeFiles\hid_core.dir\frontend\input_interpreter.cpp.obj
D:\dev\eden\src\.\core/hle/kernel/k_auto_object.h(100): warning C4127: conditional expression is constant
D:\dev\eden\src\.\core/hle/kernel/k_auto_object.h(100): note: consider using 'if constexpr' statement instead
D:\dev\eden\src\.\core/hle/kernel/k_memory_manager.h(246): warning C4127: conditional expression is constant
D:\dev\eden\src\.\core/hle/kernel/k_memory_manager.h(246): note: consider using 'if constexpr' statement instead

The reason, any mention to UNIMPLEMENTED() macro reaches this point where a constant expression (macro argument) is not declared so.
There must be several other ways to suppress, like via cmake C4127 suppression or making every source constexpr, but lazy.
Since it's an unimplemented() feature assert call, i`ve just made it non constant. Covers everything. No charges.

Signed-off-by: xbzk <[email protected]>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3567
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: DraVee <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-21 03:01:19 +01:00
xbzk 5ee81a4932 [settings] changed debug knobs category to allow per-game usage (#3564)
as the name says, plus changed android type for shortsetting, and added communication good pratices to handbook (.md) file.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3564
Reviewed-by: DraVee <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-21 02:35:05 +01:00
xbzkandcrueter 732b7eb560 [file_sys] added packed language entries support (#3585)
Normally,  language_entries contained plain UTF-8 names.
In BotW v1.9.0, that title block is no longer directly readable as old UTF-8, so we were parsing binary data as text and going nuts.
...
In patch_manager.cpp (ParseControlNCA), I added a validity check: If update title text is unreadable, we keep update metadata but copy only the base language_entries block (0x0000..0x2FFF) so the game name is valid again.

UPDATE:
managed to decode the new language entries is a raw headerless zlib deflate.
added support for proper detection and inflation.

Co-authored-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3585
Reviewed-by: crueter <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-20 23:28:24 +01:00
xbzkandPavelBARABANOV 2ab5b37137 [android, ui] unswizzle combo picker core (#3516)
Combo picker for unswizzle. Attempt to combine settings + Enable toggle added.
WARNING! The toggle won't have effect! It just controls GPU_UNSWIZZLE_ENABLED boolean setting, and will need @PavelBARABANOV unswizzle enable/disable integration.

Co-authored-by: PavelBARABANOV <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3516
Reviewed-by: CamilleLaVey <[email protected]>
Reviewed-by: Maufeat <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-12 00:11:54 +01:00
xbzk 6065e9aa09 [cmake] Reduce spam on builds for MSVC (#3454)
Fix for disable-warning-as-error flags set for MSVC not CLANG dripping into externals and causing override warnings on Ninja (cl)

Signed-off-by: xbzk <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3454
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: Maufeat <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-02-03 13:53:07 +01:00
xbzk 64ff59e82f [android] build id and driver version overlays added + vulkan driver version fix (#3381)
About overlays: just as the title suggest. added to avoid misleading user feedbacks, as now captures can bring proof of build and driver in use.

About driver version: Android always showed stock driver version (major.minor.patch) as 0.x.x and that because getSystemDriverInfo() from GpuDriverHelper driver version getter has no proper treatment for qualcomm driver version values. BUT getVulkanDriverVersion from NativeLibrary does! So i just migrated to Native's getter.

A low prio todo would be to merge all VersionString getters into a single centered one inside vk device class. Suit yourselves.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3381
Reviewed-by: DraVee <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-01-25 16:18:13 +01:00
xbzk d72553f519 fixes joypad overlay autohide during holding actions (#3337)
fixes joypad overlay autohide during holding actions

suppose holding right to move character. that wouldn't clear autohide countdown, and it also would deny other touches to do so.
i guess this was buried coz those who truly use joypad overlay don't use autohide.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3337
Reviewed-by: Maufeat <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-01-18 16:11:31 +01:00
xbzk 4ea8311113 revert old mocking for bindless textures (#3331)
this revert is intended to bring back the original behavior (throw exception) for untracked bindless textures.
reason: this was a mock intended to extend ender magnolia's mean time to crash.
by reverting it we will be able to identify more games which rely on bindless textures, and avoid to obfuscate visual issues investigation on them.

this is super safe to merge. if any game that was benefitting of it gets visual regression, we will know immediately via the throw message in logs.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3331
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Maufeat <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-01-18 04:31:24 +01:00
xbzk 8df41f06c7 [android, ui] joypad overlay show/hide overhaul + touchpad fix (#3315)
As stated by @PavelBARABANOV when joypad overlay was being hidden via quick toggle or autohides (time/input), touchpad was being disabled along (hiding via original show/hide checkbox was working ok).

This PR fixes this by centering all joypad overlay toggling paths, and using correct method to not disable touchpad.
Additionally, mirror state variable was removed for better sync, and also touching screen will only unhide if hiding was triggered via autohides.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3315
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: DraVee <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-01-17 23:42:34 +01:00
xbzkandCaio Oliveira 9c5203d922 [debug] added functions to enable access to debug knobs from kotlin side + docs (#3265)
Co-authored-by: Caio Oliveira <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3265
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: DraVee <[email protected]>
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2026-01-13 04:22:46 +01:00
xbzk 80327312dd [android] added barrier for joypad overlay autohide after emulationfragment is destroyed (#3243)
This PR fixes the real culprit for the crash mentioned in #3212 (which has its value coz it fixes other layout's minor navigation issues)
The reason was not the carousel, but the joypad overlay autohide instead.

To reproduce the crash, just enable autohide, launch the game, and leave before overlay gets hidden. eden should crash in few seconds.
The fix was adding barriers to ensure fragment is currently attached to its activity and the binding is not null.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3243
Reviewed-by: Maufeat <[email protected]>
Reviewed-by: DraVee <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-12-31 17:11:28 +01:00
xbzk d76edfc683 [android] layout mode transition issues (corruption/gamepad navigation) fixed (#3212)
fellow mike22 pointed out some vulnerabilities related to layout mode transitions.
let us give it a go!

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3212
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: DraVee <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-12-29 13:08:18 +01:00
xbzk cfae726289 [video_core] nvn descriptor layout fix (#3206)
Yxzx presumes this:
// The NVN driver buffer (index 0) is known to pack the SSBO address followed by its size.
But in MCI i`ve discovered that there are no sizes, both registers are GPU addresses (hence the 2.8gb allocation, it was an address actually)

Method could be much simpler but for safety i`ve routed both old and new worlds.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3206
Reviewed-by: Caio Oliveira <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-12-26 04:54:14 +01:00
5b019a81a7 [docs] debug knobs user guide (#3159)
* initial debug knobs guide
* integration with add boolean guide

Co-authored-by: Caio Oliveira <[email protected]>
Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3159
Reviewed-by: CamilleLaVey <[email protected]>
Reviewed-by: Caio Oliveira <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-12-07 20:33:14 +01:00
xbzkandAllison Cunha e63f71c787 [android, qt] 16 bit debug knob set for quick development toggles (#3076)
**Aims to dismiss the needing of developers to wait for someone to provide new toggles only to test temporary stuff**

This is a classic debug knob set for development use.
Developers will be able to call Settings::getDebugKnobAt(0 to 15) to pick one of the 16 bits of that setting, allowing users to easily enable or disable multiple features in testing builds, by entering values instructed by the developers.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3076
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Caio Oliveira <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-11-25 00:41:45 +01:00
xbzkandAllison Cunha 65fa1a37e2 READY TO MERGE [android] fix for carousel late bottominset and one single game bugs (#3028)
kleidis found a rare condition that pops when using gesture navigation, in which by the lack of bottom inset availability in time, carousel sizes get oversized. then i've put some non zero value backup to cover.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3028
Reviewed-by: Caio Oliveira <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-11-20 19:19:14 +01:00
xbzkandAllison Cunha 32db6c1877 [renderer] NG ragebound workaround via LoadOverrides + vk_rasterizer UpdateBlending TouchBlendequations Rework (#2934)
this pull should impact ninja gaiden ragebound only! it makes it playable past stage 4-1.
it contains a workaround for missing maxwell_3d's iterated_blend functionality, which fixes several graphics all over the game.
the issue causes transparency enabled blends (mostly lighting fx) to be wrongly blended into destination, turning textures into black frames.
in stage 4-1 there are lighthing layers in the foreground, causing sprites layer to become overlapped by these opaque black frames, including entire screen in a mid boss fight, making it unplayable* (players maneuvered by turning immortal option on and swinging sword all around until defeating it).
also only in stage 4-1 the fix has a short drawback: when you buff up next attack these problematique blends will be drawn back as black frames, but only for a split second, so no big deal.
this workaround was already discovered and available in PR 302,  but in an unconventional way for a game specific override, so we did forbidden it. now it uses classic game specific override solution exampled in core.cpp's System::Impl::LoadOverrides method, so now i guess it's worth to merge it and deliver this to players until we harness iterated_blend control.

additionally I've slightly reworked vk_rasterizer.cpp's RasterizerVulkan::UpdateBlending, if (state_tracker.TouchBlendEquations()) {...} session.
it was made in a way that for a single blend, it exhaustly calls 48 (6 x 8) MaxwellToVK redundant functions, and declared a lambda function inside a 8 laps loop.
reworked it so that instead of 48 calls it makes only the necessary 6 calls, and then merely safely copy the result for the other 7 times.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2934
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Shinmegumi <[email protected]>
Reviewed-by: Maufeat <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-11-13 14:01:32 +01:00
xbzkandAllison Cunha 6abaee94a6 fix for the rotate -> unpause bug (#2938)
Some lore:
On Android, whenever you pause emulation, next you will a lot likely move your phone, and then proly cause a rotation.
Unpause upon rotation makes me unpause my games accidentally very often.
I acknowledge that as a bug, and believe most will agree.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2938
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: Caio Oliveira <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-11-04 16:59:06 +01:00
xbzkandAllison Cunha c788dbb3ef single commit to fix glCcolorMagic logic (#2842)
just pushing this fix for some silly bug before i forget it for the second time.

just too obvious that don't even need to test.

may fix some blued stuff where it should be green, and vice versa.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2842
Reviewed-by: MaranBr <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-10-26 20:51:21 +01:00
xbzkandAllison Cunha 56e2dbc619 added barriers against zero valued overlayControlData.individualScale (#2721)
Some recent change already in master caused some @android users to reach a state in which they were missing individualScale value to some input overlay controls.

I was affected, and some fella in #tester-chat even shared a video.

These 3 new barriers makes eden ignore individualScales if they're zeroed (feeding 1f instead), avoiding the crash, and allowing users to further adjust controls scales.

Safe and functional.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2721
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: Shinmegumi <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-10-13 15:37:41 +02:00
xbzkandAllison Cunha dfca07f4e3 Initial a9 (minsdk=28) support (#2600)
Minimal changes to make android 10 installable and emulationFragment not immediately crashable.
Testers (mainly android 10) NEEDED!!!

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2600
Reviewed-by: Lizzie <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-10-01 00:10:59 +02:00
xbzkandAllison Cunha cbbdfc75cc [android] fix for intent launch + emulation fragment binding rc barriers (#471)
trial to confirm whether some emulationState related race condition is causing crashes on android

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/471
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: crueter <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-09-21 16:06:56 +02:00
xbzkandAllison Cunha e7560183fa [android] minor ui tweaks + translations (#326)
CHANGES:
fix drawer pause/unpause sync (upon leaving/returning to app)
add quick toggle controller overlay to drawer (for players with multiple gear style)
added translation for emulation_hide_overlay
changed Show overlay to Show controller in all langs
added missing translations for values-de

WHAT TO TEST:
sync of pause/resume when you leave eden (screenshot, home, alt tab, etc).
show controller toggle: if it works it works.

Co-authored-by: Allison Cunha <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/326
Reviewed-by: crueter <[email protected]>
Co-authored-by: xbzk <[email protected]>
Co-committed-by: xbzk <[email protected]>
2025-09-03 03:55:19 +02:00