azahar/src
huesos_96 3716f6b9b6
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:45:49 +01:00
..
android Android: Dual screen fixes for Handhelds that have 2 screens like Ayaneo Pocket DS (#1341) 2025-10-03 14:45:49 +01:00
audio_core Improve consistency of capitalization and colon usage in UI (#1306) 2025-09-01 01:43:54 +01:00
citra_meta macos: Patch QMetalLayer.setNeedsDisplayInRect at runtime to avoid freezing on recent Qt 2025-09-03 03:15:14 +01:00
citra_qt Improve DLP and multiplayer compatability (#1375) 2025-09-20 19:59:54 +02:00
citra_room citra_room: Added removed option warning for --enable-citra-mods/-e 2025-05-15 16:19:20 +01:00
citra_room_standalone Updated help strings to reflect new room implementation 2025-04-16 16:39:09 +01:00
citra_sdl Replace/remove leftover links for citra website and API #1236 (#1250) 2025-07-28 19:33:53 +02:00
common Improve DLP and multiplayer compatability (#1375) 2025-09-20 19:59:54 +02:00
core Android: Dual screen fixes for Handhelds that have 2 screens like Ayaneo Pocket DS (#1341) 2025-10-03 14:45:49 +01:00
input_common Replace deprecated and removed in boost 1.88 io_service to io_context (#1126) 2025-06-17 18:41:22 +00:00
installer Installer: Further cleanups and high DPI support (#1234) 2025-08-04 13:59:00 +01:00
network MacOS: fix(network): fixes ArticBase UDP buffer handling on macOS (#1263) 2025-08-07 21:16:15 +02:00
tests Removed some remaining .3ds extension references 2025-03-02 17:45:54 +00:00
video_core vk_pipeline_cache: Fix directory creation failure if shaders/vulkan/ is missing 2025-09-13 01:19:52 +01:00
web_service Remove the telemetry (#45) 2024-11-07 14:42:32 +01:00
.clang-format clang format: add objective c++ formatting 2022-01-10 13:52:39 +01:00
CMakeLists.txt cmake: Suppress -Wpsabi warnings when building with GCC 2025-06-03 20:58:30 +01:00