* 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>
* Added NWM spectator mode (DLP now partially working), fixed debug assert, added applet utility cmd fallback
* Reverted AppletUtility command change
* Fixed inconsistent mac address
* Enabled DLP Child authorization
* Added the DLP module to recommended online modules
* Clean up
* Changed the returned number of words on GetProgramInfoFromCia to 7 insteead of 8, futher reverted AppletUtility function to match its original form
* EmulationActivity and EmulationFragment clear only their own hooks
* EmulationLifecycleUtil: Rename `remove()` to `removeHook()`
* EmulationLifecycleUtil: Removed unused function `clear()`
* Corrected somewhat incorrect usage of the word "hook"
* Define `onShutdown` and `onPause` hook functions in constructors
* Formatting nitpicks
* Updated license header
* Re-added log messages for attempting to add duplicate hooks
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>