* 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
* Enable the SecondScreenPresentation class
* Update everything to enable second screen on android under GL and Vulkan. Still some issues!
* Some attempts to enable surface changes
* OpenGL is working on surface change, vulkan still no
* release surfaces (also fixed vulkan?)
* added and enabled layout setting
* resolve merge conflict
* rearrange switch cases to satisfy linux compiler
* openGL is working!
* several vk changes to try to fix crashes
* maybe vulkan is working?
* removing unnecessary code attempts
* Simplified secondscreen for better performance
* vk_platform.cpp: Fixed build failure caused by bad rebase
* vk_present_window.h: Removed stray newline
* Applied clang-format
* bug fix for odin 2
* Applied clang-format
* Updated license headers
* Moved SecondScreen class to org.citra.citra_emu.display
* Various formatting and readability improvements
* Added brackets where previously absent for readability
* Additional readability improvement
* RendererVulkan::NotifySurfaceChanged: Simplified condition checking
* change all references to "secondary screen" to "secondary display" to limit confusion with top screen / bottom screen
* rename main_window to main_present_window and second_window to secondary_present_window
* Reverted accidentally downgraded compatibility list submodule
* Removed unnecessary log message
* Applied clang-format
* Added a description to the Secondary Display Screen Layout setting
* Added `_ptr` suffix to `secondary_present_window`
This distinguishes it as a pointer, as `main_present_window` isn't a pointer, so there could be confusion on whether to use `.` or `->`
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
* Add upright boolean for portrait mode
* Add the `upright_screen` boolean to the UI as a switch & in-game
* ScreenAdjustmentUtil.kt: Updated license header
---------
Co-authored-by: Kleidis <167202775+kleidis@users.noreply.github.com>
* Original Portrait Layout
Original Portrait Layout
* type conversion fix for win
* Updated license headers
* Applied clang-format
* android: Reordered Portrait Screen Layout menu
Custom Layout is now at the bottom of the list
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
* framebuffer: Add hybrid layout mode to FrameLayoutFromResolutionScale
* framebuffer_layout.cpp: Moved seemingly misplaced `default` case to proper location
* framebuffer_layout.cpp: Fixed incorrect calculation of framebuffer dimensions for hybrid layout
* framebuffer_layout.cpp: Made implicit cast from float to int explicit
---------
Co-authored-by: Kleidis <167202775+kleidis@users.noreply.github.com>
* Check that the country setting is valid for selected region
* `SystemSaveGame.checkCountryCompatibility` -> `SystemSaveGame.getCountryCompatibility`
* SettingsFragmentPresenter.kt: Moved `checkCountryCompatibility` definition out of `addSystemSettings`
* SettingsFragmentPresenter.kt: Renamed `compat` value to `compatFlags` for better readability
* configure_system.ui: Corrected indentation
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
* Mark console as "linked" when using the azahar artic setup tool
* Updated strings related to console linking
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
* Stereoscopic 3D Enhancements
- Increase maximum 3D depth to 255%
- Fix touch screen to only render 2D when separate window layout is used
- Cleanup some 3D option localizations
* qt: Added warning label below depth slider for values over 100%
* Fixed broken rendering for Interlaced, Reverse Interlaced and Anaglyph options when using 3D with seperate windows
* android: Added warning label below depth slider for values over 100%
* Fixed a bracket and break statement being incorrectly positioned
---------
Co-authored-by: oneup03 <oneup03@gmail.com>
- Added option to enable required LLE modules for online features.
- (Android) Fixed bug that would cause FS RenameFile to fail sometimes on Android.
- (Android) Moved New 3DS mode and LLE applets to system settings tab on Android.
- (Android) Fixed cfg save data related issues (mostly Console ID).
- Made AM title scanning asynchronous, which makes game boot way faster on Android on most cases.
- Made more AM functions asynchronous, to prevent stutter.
- Fixed bug in SOC that could cause the emulator to crash when disconnecting.
- Fixed keys not being initialized when processing console unique files.
* Implement "Set Up System Files" on Android
* Use correct strings + Remove chunks of unused code
* Updated license header
* SystemFilesFragment.kt: Use radio buttons for selecting O3DS/N3DS
* HomeSettingsFragment.kt: Moved `Install CIA` above `Set Up System Files`
* strings.xml: Updated system file setup button strings
* android: Remove System Files Warning
This warning is no longer relevant due to changes in how system files are installed
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>