* Convert all setting keys in settings.h into hana strings
* Derive libretro setting keys from common/settings.h hana strings
* settings.h: Reduce code repetition in key definitions via macro
* Implemented mechanism to pass our C++ setting keys to Android/Kotlin
None of the Android keys have been moved over as of this commit, this is just prep work
* jni_settings_keys.cpp.in: Removed redundant code
* Migrate (almost) all Android setting string keys over to SettingKeys
Also some slight cleanup
* Updated license headers
* Fixed top custom width erroneously being used in place of top custom height
* Migrate (probably) all setting string keys to Settings::QKeys
* Migrated several previously missed string keys to generated keys
* SettingKeys.kt: Visually seperate shared and Android-exclusive keys, similar to GenerateSettingKeys.cmake
* android: sdl2_config --> android_config
Not sure why these values are named this way. Hold-over from SDL2 frontend?
* android: Generate and validate default config.ini dynamically
* Settings: Assume C-style string keys by default
Relative to the previous commit, the following names have changed:
- Settings::Keys --> Settings::HKeys
- Settings::CKeys --> Settings::Keys
* default_ini.h: Fixed formatting warning
* Comment cleanup
* android: Fixed compilation failure due to incorrect namespace
* config.cpp: Use ASSERT_MSG instead of LOG_ERROR and ASSERT(false)
* DirectoryInitialization.kt: Switch to getFilesDir for internalUserPath
Was previously getExternalFilesDir
filesDir is used here, which is just recommended shorthand for getFilesDir
* DirectoryInitialization.kt: Updated license header
This doesn't really address the root cause of the problem because I have absolutely no idea what it is, but this does get around the issue by just forcing the dialog into a pre-determined size rather than letting it automatically set its own size
* Add setup step to grant `MANAGE_EXTERNAL_STORAGE`
* WIP re-implementation of Android `Rename` using native filesystem manipulation
* Applied clang-format and updated license headers
* Support user directories on removable storage devices
* If `MANAGE_EXTERNAL_STORAGE` is lost, re-request it
* Fix missing permission dialog appearing during initial setup
* Added empty code branches to prep for old Android support
* Fixed permission setup completion not accounting for external storage permission
* Implement code for Android <11
* Fixed emulation error if a renamed file is then opened for R/W
* Detect if the current user directory cannot be located, and prompt re-selection
* If an invalid user directory is selected, reject and re-prompt
* [android]: Force app to use the displays max set refresh rate
Since Android 15, google automatically forces "games" to be 60 hrz. This ensures the display's max refresh rate is actually used. Tested on a Google Pixel 7 Pro with Android 16
Emulation Activity was excluded for battery usage concerns
* force60Hrz option
* Code cleanup
* Expanded refresh rate explaination comment
* Moved `enforceRefreshRate` calls to earlier in `onCreate`
This probably doesn't actually do anything, it's a bit of a nitpick
* Moved `enforceRefreshRate` SDK version check to within the function
---------
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
* 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>