35 Commits
Author SHA1 Message Date
NovaChildandOpenSauce04 8a6d597dec android: Secondary Layout and Menu Improvements (#1385)
* Add a new Secondary Display Layout option on android that makes the secondary display honor swap button

* add quick menu option for secondary layout

* fix icon

* added other secondary layouts

* Add a new Secondary Display Layout option on android that makes the secondary display honor swap button

# Conflicts:
#	src/core/frontend/framebuffer_layout.cpp

* add quick menu option for secondary layout

* fix icon

* added other secondary layouts

* updated secondary menu with functionality to switch external displays

 Conflicts:
	src/android/app/src/main/java/org/citra/citra_emu/display/SecondaryDisplay.kt

* safety checks for crash prevention

* make secondary menu only appear if a secondary display is available

* update default displayid behavior to exclude "Built"

* update odin 2 bugfix to handle other languages

* Apply clang-format

* Rename "Opposite of Primary Display" option for brevity

* Rename menu_secondary_layout_reverse_primary for consistency

* Rename SecondaryDisplayLayout::ReversePrimary for consistency

* first round of code fixes based on review

* Added android-side enable_secondary_display boolean setting, replacing secondary_display_layout = none on the android side. Exposed it in Layout settings, and secondary display layout is now only selectable if it is enabled.  Support for the old option is still in the code, but should no longer be selectable.

Also renamed opposite to reverse_primary in a few other places.

* Update framebuffer layout and renderers to correctly render hybrid mode on both primary and secondary displays

* Apply clang format

* Re-apply terminology changes which were undone by a recent commit

* Removed unused string emulation_secondary_display_default

---------

Co-authored-by: OpenSauce04 <[email protected]>
2026-06-14 17:37:32 +01:00
David Griswold 64cb0b57fb nullptr check on update_surface 2026-03-20 12:38:41 +00:00
David Griswold f721a474e4 force android emu_window to update height and width on surface change, solving aspect ratio issues on some screens (#1907) 2026-03-19 13:46:56 +01:00
David Griswold 1febb83942 qt: Add controller touchpad support (#777) 2026-03-12 00:21:17 +01:00
David Griswold b477ba09c1 Ability to select which layouts to cycle with the cycle layout hotkey (#1430) 2026-02-27 13:21:53 +01:00
David Griswold 6b2ac400eb Android: Hotkey Enable Button (#1464) 2026-02-26 18:40:42 +01:00
David Griswold 5ac0ef8fde hide portrait layout menu on landscape and vice versa (#1473) 2026-02-26 14:27:18 +01:00
David Griswold 3255620934 Implement integer scaling (#1400) 2026-02-26 13:33:13 +01:00
David Griswold a6688abcf5 update language and use UP instead of DOWN on axis mapping 2026-01-24 23:31:01 +00:00
David Griswold 102f7d24fc android: prioritize non-built-in displays (#1667) 2026-01-22 12:55:58 +01:00
David Griswold 4bdcf342b6 video_core: Stereo Settings Improvements: Full Width SBS, Swap Eyes, Select which display(s) to render on (#1212) 2026-01-03 21:40:59 +01:00
David Griswold 48cbeb0993 Android: Bug fix for incorrect screen size detection (#1495) 2026-01-03 14:09:45 +01:00
David Griswold b1717b6fc2 Android: Keep track of the axis direction when mapping axes (also allows inversion for external pads) (#1483) 2026-01-03 12:15:49 +01:00
David Griswold 41f1be91eb poll all displays (#1455) 2025-12-27 22:27:03 +01:00
David Griswold b7540aa019 store opacity in layout to avoid applying opacity incorrectly (#1496) 2025-12-27 16:15:36 +01:00
David Griswold 356aa3d3ae make it so clearing to default ACTUALLY clears gamepad settings 2025-12-05 13:08:04 +00:00
David GriswoldandOpenSauce04 04b6c69083 Default VSync to false on Android
Co-authored-by: OpenSauce04 <[email protected]>
2025-11-29 14:37:30 +00:00
David Griswold f309d4881a android: Add Display Listener methods for smoother secondary display updates 2025-10-03 17:04:57 +00:00
David GriswoldandOpenSauce04 a2e6891f01 android: Re-fixed game termination bug (#1357)
* 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 <[email protected]>
2025-09-05 21:36:01 +01:00
David GriswoldandOpenSauce04 70f9379eef Fix android termination bug (#1354)
* move hook additions to onCreateView

* Updated license header

* Formatting nitpick

* Added prefix to log messages

---------

Co-authored-by: OpenSauce04 <[email protected]>
2025-09-04 22:35:10 +01:00
DavidRGriswoldandOpenSauce04 e5c3a0eef7 android: Prevent crash when editing a slider option with an out of bounds value
Co-authored-by: OpenSauce04 <[email protected]>
2025-09-03 13:16:55 +01:00
David GriswoldandOpenSauce04 aca8b45664 android: Implement secondary display support (#617)
* 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 <[email protected]>
2025-08-08 21:41:52 +01:00
David GriswoldandOpenSauce04 36a0b7824d desktop: Fix horizontal centering single window mode (#1211)
* fix horizontal centering single window mode

* Formatting adjustment

---------

Co-authored-by: OpenSauce04 <[email protected]>
2025-07-31 17:27:35 +01:00
David Griswold 967263fc80 Implement screen gap setting (#622)
* implement screen gap

* type conversion fix for windows

* int setting
2025-04-16 19:05:46 +01:00
David GriswoldandOpenSauce04 240e968d73 android: Lime3DS to Azahar migration adjustments (#917)
* change dialog without write permissions

* Added update path from lime to azahar on android

* Shows the correct dialog info now

* remove unnecessary comments

* Adjusted `select_which_user_directory_to_use` string to be more readable

* improve the dialog box itself

* tougher fix than originally expected but all works as planned

* remove unnecessary code

* Updated license headers

* MainActivity.kt: Removed stray newline

* PermissionsHandler.kt: Move repeated "LIME3DS_DIRECTORY" string to `LIME3DS_DIRECTORY` constant

* Nitpicky comment adjustments

* Reverted superficial changes to HomeViewModel.kt

* PermissionsHandler.kt: `updateDirectory` --> `attemptAutomaticUpdateDirectory`

+ nitpicky formatting adjustment

* Moved PR additions to PermissionsHandler.kt to new file CitraDirectoryUtils.kt

---------

Co-authored-by: OpenSauce04 <[email protected]>
2025-04-14 19:08:11 +01:00
David GriswoldandOpenSauce04 8e477e35bb android: Original Portrait Layout (#625)
* 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 <[email protected]>
2025-04-11 18:23:07 +01:00
David Griswold 227f35aadf android: Fix header padding 2025-03-01 18:10:14 +00:00
43c4d3981d Added "Small Screen Position" feature
* error checking for layout value from older config

* rename enum and update aspect ratio code

* rewrite LargeFrameLayout to support multiple positions

* add settings for smallscreenposition, fix minsize function

* fixed framebuffer from res scale (screenshots)

* add desktop UI for small screen position

* small screen position submenu on desktop

* fix int-float conversion warning

* rename Above and Below to hopefully fix linux issue

* Add Small Screen Position Setting to android settings menu

* fix sliders to work with floats, mostly

* fix android slider textinput ui

* change None enums in settings and cam_params

* Apply clang-format-18

* SettingsAdapter.kt: Make more null pointer exception resistant

* Updated license headers

* Code formatting nitpicks

* fix bug in main.ui that was hiding menu

* replace default layout with a special call to LargeFrame (like SideBySide does)

* fix bug when "large screen" is actually narrower

* edit documentation for LargeScreenLayout

* update PortraitTopFullFrameLayout to use LargeFrameLayout

* fix unary minus on unsigned int bug

* Applied formatting correction

* Added `const`s where appropriate

* android: Add mention of the bottom-right small screen position being the default

* review fixes + more constants

* refactor all Upright calculations to a reverseLayout method, simplifying code and reducing bugs

* Removed stray extra newline

* SettingsAdapter.kt: Fixed some strange indentation

* Removed unnecessary `if` in favour of direct value usage

---------

Co-authored-by: Reg Tiangha <[email protected]>
Co-authored-by: OpenSauce04 <[email protected]>
2024-11-10 20:41:28 +00:00
David Griswold 42a0a72c96 android: Refactor layout code to use LargeScreen layout instead of MobileLandscape 2024-11-10 18:16:50 +00:00
David GriswoldandOpenSauce04 e884d5f3f3 android: Implemented custom layout customization GUI
This commit also changes the name of the 'Portrait' landscape layout to 'Original'

Co-authored-by: OpenSauce04 <[email protected]>
2024-11-10 18:16:50 +00:00
David Griswold b293a253f5 Refactored layout code in preparation for Android custom layout GUI 2024-11-10 18:16:50 +00:00
David Griswold c78e893cd7 android: Updated custom layout coordinate system to match desktop 2024-11-10 18:16:50 +00:00
David Griswold 6cb61c8ff7 android: Added portrait-specific config values for custom layouts 2024-11-10 18:16:50 +00:00
David Griswold 12ff3e5fb0 Reenable dpad axes option (#262)
* Reenable dpad axes option

* Update Header Setting to allow for a description under tht title

* Add header descriptions for dpad axis and buttons
2024-11-07 14:47:31 +01:00
David Griswold af015fd9b9 Use buttons instead of axes for the d-pad, enabling mapping from gamepads with only digital dpad outputs (#203) 2024-11-07 14:47:28 +01:00