diff options
| author | coolone <trukhin.nick@pm.me> | 2026-04-22 05:32:52 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-04-22 05:32:52 +0200 |
| commit | 860acb4faf0b453912c451238b44f77e6a7a7fdf (patch) | |
| tree | 28e18e09711df67544d72f368f74c7679106f2b2 /src/video_core/macro.cpp | |
| parent | a0bb6324c0a11bf6578fe7d6951d08968fc16e12 (diff) | |
[android] Fix crash on start any games for many handhelds (Ayaneo, Retroid etc) (#3647)
## Summary
This change hardens Android Picture-in-Picture handling to avoid runtime crashes on devices/ROMs where PiP APIs are unavailable or behave inconsistently.
## What changed
- Added a feature gate for PiP support using `FEATURE_PICTURE_IN_PICTURE`.
- Early-returned from PiP flows when unsupported.
- Wrapped PiP API calls (`enterPictureInPictureMode`, `setPictureInPictureParams`) in guarded handlers that catch `IllegalStateException` and `UnsupportedOperationException`.
- Logged one warning per failed PiP action to avoid log spam.
## Why
On some Android devices, calling PiP APIs can throw at runtime even when the app is otherwise functioning normally. This patch prevents those calls from crashing/interrupting emulation and keeps behavior unchanged on supported devices.
## Notes
- No behavior changes for fully PiP-capable devices.
- Safe no-op on unsupported devices.
Co-authored-by: Nikolai Trukhin <coolone.official@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3647
Reviewed-by: DraVee <chimera@dravee.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/video_core/macro.cpp')
0 files changed, 0 insertions, 0 deletions
