azahar/src/core
huesos_96 897447e9bd Android: Dual screen fixes for Handhelds that have 2 screens like Ayaneo Pocket DS (#1341)
* Prevent SecondaryDisplay from stealing focus

The SecondaryDisplay Activity was stealing focus from the main
Activity when it was launched.

Set the `FLAG_NOT_FOCUSABLE` and `FLAG_NOT_TOUCH_MODAL` window flags
to prevent the SecondaryDisplay from gaining focus.

* Implement touch controls for secondary display

This commit introduces touch input handling for the secondary display.

The following changes were made:
- Added `onSecondaryTouchEvent` and `onSecondaryTouchMoved` to `NativeLibrary.kt` and `native.cpp` to process touch events on the secondary display.
- Implemented `onTouchListener` in `SecondaryDisplay.kt` to capture touch events and forward them to the native layer.
- Handles `ACTION_DOWN`, `ACTION_POINTER_DOWN`, `ACTION_MOVE`, `ACTION_UP`, `ACTION_POINTER_UP`, and `ACTION_CANCEL` motion events.
- Tracks the active pointer to ensure correct touch event handling.

* Refactor display logic for multi-display support

This commit introduces a `DisplayHelper` class to centralize display-related logic, particularly for handling scenarios where the application might be launched on an external display.

Key changes:
- Added `DisplayHelper.kt` to manage internal and external display identification based on launch conditions.
- `MainActivity` and `EmulationActivity` now use `DisplayHelper.checkLaunchDisplay()` to determine the initial display.
- `SecondaryDisplay` now uses `DisplayHelper.getExternalDisplay()` to correctly identify the target display for the secondary presentation.
- `InputOverlay` now queries `DisplayHelper.isBottomOnPrimary()` to determine if touch input should be processed for the primary display based on the current screen layout.
- `SecondaryDisplay` now queries `DisplayHelper.isBottomOnSecondary()` to conditionally pass touch events to the native layer based on which screen (primary or secondary) is currently displaying the 3DS bottom screen.

These changes ensure that the application behaves correctly when launched on either the internal or an external display, and that touch input is routed appropriately based on the user's chosen screen layout for the dual screens.

* Removed primary-screen checks so the input overlay always forwards touch events, ensuring all touches reach the native handler even when multiple displays are active

* Remove DisplayHelper class and adjust external display logic

* Formatting adjustments

---------

Co-authored-by: DavidRGriswold <novachild@gmail.com>
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
2025-10-03 14:46:05 +01:00
..
arm Applied clang-format-19 to all files 2025-02-27 15:24:32 +00:00
cheats Fix cheats and rpc server affecting the wrong processes (#956) 2025-04-23 17:09:37 +02:00
dumping misc: fix issues pointed out by msvc (#7316) 2024-01-07 12:37:42 -08:00
file_sys Z3DS: Add title info and smdh to metadata 2025-07-27 17:13:32 +02:00
frontend Android: Dual screen fixes for Handhelds that have 2 screens like Ayaneo Pocket DS (#1341) 2025-10-03 14:46:05 +01:00
gdbstub arm: De-virtualize ThreadContext (#7119) 2023-11-06 17:55:30 -08:00
hle am: fix save data being deleted on CIA install failure (#1319) 2025-08-20 13:51:06 +01:00
hw Fix system files setup for region changed consoles 2025-04-13 19:16:12 +01:00
loader loader: Fix compressed 3dsx icon reading 2025-08-08 22:46:17 +01:00
rpc Fix cheats and rpc server affecting the wrong processes (#956) 2025-04-23 17:09:37 +02:00
tracer video_core: Refactor GPU interface (#7272) 2023-12-28 11:46:57 +01:00
3ds.h Move screen size constants from video_core to core 2017-05-27 18:41:24 -07:00
CMakeLists.txt Major revamps to match game loading decisions. 2025-02-27 14:22:50 +01:00
core.cpp video_core: Refactor state tracking (#1059) 2025-05-26 14:37:03 +02:00
core.h Various savestate bugfixes 2025-03-12 20:50:51 +01:00
core_timing.cpp core_timing: Allow configuring a fixed or random initial system tick value. (#7309) 2024-01-07 09:38:02 -08:00
core_timing.h Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
global.h Refactored out the horrible static var in CoreTiming 2020-03-28 15:47:36 +00:00
memory.cpp Fix cheats and rpc server affecting the wrong processes (#956) 2025-04-23 17:09:37 +02:00
memory.h Fix cheats and rpc server affecting the wrong processes (#956) 2025-04-23 17:09:37 +02:00
movie.cpp Updated a myriad of user-facing strings to refer to Azahar, not Citra 2024-11-21 23:30:29 +00:00
movie.h core_timing: Allow configuring a fixed or random initial system tick value. (#7309) 2024-01-07 09:38:02 -08:00
nus_download.cpp build: Fix web service functionality. (#6903) 2023-08-19 17:34:35 -07:00
nus_download.h build: Fix web service functionality. (#6903) 2023-08-19 17:34:35 -07:00
perf_stats.cpp Add "SWP" frame time information (#1173) 2025-06-20 19:26:12 +02:00
perf_stats.h Add "SWP" frame time information (#1173) 2025-06-20 19:26:12 +02:00
precompiled_headers.h Port yuzu-emu/yuzu#9300: "CMake: Use precompiled headers to improve compile times" (#6213) 2022-12-17 16:06:38 +01:00
savestate.cpp android: add quicksave hotkeys (#181) 2024-11-07 14:47:22 +01:00
savestate.h android: add quicksave hotkeys (#181) 2024-11-07 14:47:22 +01:00
savestate_data.h savestates: save the build name to be displayed when there's a version mismatch (#6493) 2023-08-10 20:55:22 -07:00
system_titles.cpp Fix system files setup for region changed consoles 2025-04-13 19:16:12 +01:00
system_titles.h Add 'Set Up System Files' option (#642) 2025-03-10 10:48:11 +00:00