Commit graph

799 commits

Author SHA1 Message Date
Zephyron
3698478977 android: Fix battery temperature reading in EmulationFragment
Replaces the battery temperature reading implementation with a more
compatible approach using ACTION_BATTERY_CHANGED broadcast intent.
This change provides better backwards compatibility and adds proper
error handling for the temperature reading functionality.
2025-01-17 19:59:13 +10:00
Zephyron
382999025a shader_recompiler: Add stubs for CSM/FCSM flow test conditions
Add stub implementations for previously unhandled flow test conditions in the
shader recompiler's IR emitter. These conditions were previously throwing
"Not Implemented" exceptions when encountered.

The following flow test cases are now stubbed:
- FCSM_TR (Fragment Shader Coarse/Fine Mode Test and Reject)
- CSM_TA (Coarse/Fine Mode Test Accept)
- CSM_TR (Coarse/Fine Mode Test and Reject)
- CSM_MX (Coarse/Fine Mode Maximum)
- FCSM_TA (Fragment Shader Coarse/Fine Mode Test Accept)
- FCSM_MX (Fragment Shader Coarse/Fine Mode Maximum)

Currently these stubs:
1. Return false (ir.Imm1(false)) as a placeholder value
2. Log a warning message indicating the stub
3. Allow shaders using these conditions to compile rather than fail

This is a step toward proper implementation of coarse/fine mode shader
operations. The stubs prevent crashes while making it clear which code paths
need full implementation.

Technical notes:
- Removed the previous FCSM_TR implementation that used flag operations
- Added consistent warning messages for tracking stub usage
- Kept within the existing GetFlowTest switch statement structure
2025-01-17 19:28:11 +10:00
Zephyron
62de5aa9de Downgrade Android SDK and build tools
- Reduce compileSdkVersion and targetSdk from 35 to 34
- Change NDK version to 26.1.10909125
- Downgrade Android Gradle Plugin from 8.8.0 to 8.1.2
- Add androidx.constraintlayout dependency

These changes improve compatibility with current Android development
environment and add necessary layout support.
2025-01-17 15:16:15 +10:00
Zephyron
3635b6e602 android: Add USE_AUTO_STUB setting
Implements the USE_AUTO_STUB setting in the Android frontend:

- Added USE_AUTO_STUB to BooleanSetting enum
- Added UI switch setting with description in SettingsItem
- Added setting to system settings section in SettingsFragmentPresenter
- Added string resources for setting title and description

The setting allows users to toggle automatic stubbing of missing services
and functions, which may improve compatibility at the cost of stability.
2025-01-16 17:05:02 +10:00
Zephyron
236ad28d61 feat: Improve thermal display and build system
- Replace emoji thermal indicators with modern progress bar UI
- Switch temperature source to battery sensor for better accuracy
- Adjust temperature thresholds (30°C-45°C range)
- Add automatic Vulkan Validation Layer download for Android
- Downgrade Java/Kotlin target to 17 for wider compatibility

The thermal display now shows a visual progress bar with percentage
instead of emojis, making it easier to gauge system temperature at
a glance. Temperature reading now comes from the battery sensor
which is more reliable across devices.

Build system improvements include automated VVL binary downloads
and installation for Android builds when CITRON_DOWNLOAD_ANDROID_VVL
is enabled. Java target downgraded to 17 to ensure compatibility
with current Android toolchain.
2025-01-15 16:44:07 +10:00
Zephyron
9ae0eeeb87 Revert incorrect copyright attribution for non-contributed files
- In commit b3facaa6bb, the copyright header was
  updated to include "Citron Homebrew Project" across multiple files, regardless
  of whether any contributions were made.

- This commit removes the incorrect attribution and reverts the copyright header
  to its previous state.

- Copyright attribution should only be added when meaningful contributions have
  been made to the file.

- This commit ensures proper compliance with copyright standards and maintains
  correct attribution to the respective contributors.

- Special thanks to Tachi for pointing out the need for these corrections and
  ensuring that proper attribution practices are followed.
2025-01-14 15:33:24 +10:00
Zephyron
cce4abbb0b Android: Update dependencies and improve UI feedback
- Update Kotlin and various AndroidX dependencies to stable versions
- Add temperature monitoring with color-coded display in emulation
- Add FPS color indication (red to green based on performance)
- Add legal disclaimer page to initial setup
- Remove x86_64 ABI filter to focus on arm64-v8a
- Adjust thermal and FPS update intervals for consistency
- Clean up redundant dependency declarations

The temperature display now shows both Celsius and Fahrenheit with
color coding based on safe operating ranges [WIP]. FPS counter provides
visual feedback through colors, making performance issues more
immediately apparent to users.
2025-01-13 17:48:02 +10:00
Zephyron
6d5475a9cf Android: Update build system and dependencies
- Update Gradle from 8.1 to 8.10.2
- Update Android Gradle Plugin from 8.1.2 to 8.8.0
- Update Kotlin from 1.9.20 to 2.1.20-Beta1
- Update various AndroidX dependencies to latest versions
- Update NDK from 26.1 to 27.2 (with RC1/RC2 options commented)
- Update Java target from 17 to 21
- Update Android target SDK from 34 to 35
- Enable additional optimizations in release builds:
  - Enable shrinkResources
  - Use proguard-android-optimize.txt
  - Disable JNI debugging
- Replace vector drawables with PNG for ic_citron
- Comment out unused ComputeInline constant in dma_pusher.cpp
- Update Gradle wrapper and configuration files

This updates the Android build system and dependencies to their latest
versions while enabling additional optimizations for release builds.
The ic_citron icon was converted from vector to PNG format for better
compatibility.
2025-01-13 15:17:39 +10:00
Zephyron
b3facaa6bb
chore: update project references and add Citron copyright
- Replaced all references to the old project name with Citron.
- Added Citron copyright information alongside existing notices in all files.
2024-12-31 17:07:49 +10:00
Zephyron
6778aa8ec8
chore: update project branding to Citron 2024-12-31 16:22:24 +10:00
Zephyron
9427e27e24
chore: update project branding to citron 2024-12-31 16:19:25 +10:00
Pengfei Zhu
2f57c5a0e9
Revert arbaic translation 2024-03-01 15:20:53 +08:00
Pengfei Zhu
338e088b9d
Remove trailing whitespaces 2024-03-01 14:19:02 +08:00
The yuzu Community
56c9107d08 Update translations (2024-03-01) 2024-03-01 03:12:19 +00:00
liamwhite
0da6704fc2
Merge pull request #13073 from FearlessTobi/fsp-srv-ipc
fsp: Migrate remaining interfaces to cmif serialization
2024-02-23 11:34:06 -05:00
liamwhite
8bbc209950
Merge pull request #13105 from t895/connection-fix
android: Misc controller fixes
2024-02-21 10:43:46 -05:00
t895
de5422b1fd android: Connect controllers with supported styles
If you tried to connect a controller that was previously configured with an unsupported style for your game, when you try to connect that controller, it will immediately disconnect. This ensures that the controller that is being connected will be changed to the first supported style index before being connected.
2024-02-21 08:37:55 -05:00
t895
45f450fca5 android: Add additional check for hasMapping
Controls can have no mapping if they are either "[empty]" or and empty string. This was causing an issue if you reset mapping on all controllers and then tried to play a game. The check to determine whether auto mapping was required would fail and leave you will no mapped controllers. This feels a bit like user error but it smooths things out if you forget so I see it as necessary.
2024-02-21 08:17:30 -05:00
t895
9a3fd76b25 android: Enable all controller styles on emulation shutdown 2024-02-21 08:13:54 -05:00
t895
de2d496e71 android: Fix extra stick setting default values
The default value was accidentally hardcoded for all extra stick settings
2024-02-20 22:13:59 -05:00
t895
6a90db8c19 android: Expose device name setting 2024-02-20 08:16:38 -05:00
t895
0e5972b0b5 android: Add StringInputSetting settings item 2024-02-20 08:06:56 -05:00
liamwhite
10e27a2902
Merge pull request #13086 from t895/clear-button-fix
android: Fix broken clear button check
2024-02-19 19:18:05 -05:00
Charles Lombardo
f567a41f53
android: Have input overlay follow player 1 style index (#13085) 2024-02-19 22:47:21 +01:00
t895
704c62ca01 android: Fix broken clear button check 2024-02-19 15:54:52 -05:00
Charles Lombardo
3b1b98c645
android: Fix overlay visibility reset (#13083) 2024-02-19 19:44:42 +01:00
Charles Lombardo
daf350f5d3
android: Show done button when configuring input overlay (#13082) 2024-02-19 19:26:18 +01:00
FearlessTobi
b5a17b501b Address review comments 2024-02-19 19:11:07 +01:00
FearlessTobi
310c1f50be scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
liamwhite
5583957616
Merge pull request #13064 from t895/auto-map-fail
android: Only do first startup automapping if nothing has been mapped
2024-02-18 10:27:49 -05:00
liamwhite
839ded7d59
Merge pull request #13065 from t895/cancel-button-fail
android: Show cancel button for the content install notice
2024-02-18 10:25:04 -05:00
t895
0a3bc6c0cf android: Map touches to touchscreen
I neglected to map touches to the touchscreen when refactoring in the input mapping PR. This fixes that regression.
2024-02-18 10:00:37 -05:00
t895
55a7815064 android: Show cancel button for the content install notice 2024-02-18 09:23:46 -05:00
t895
a1c4f53c8c android: Only do first startup automapping if nothing has been mapped 2024-02-18 09:18:54 -05:00
t895
35a3c7226a android: Create lifecycle utility to simplify common StateFlow operations 2024-02-17 23:09:09 -05:00
t895
0010d42f82 android: Use extension functions for view visibility and text marquee 2024-02-17 22:45:33 -05:00
liamwhite
316089c39f
Merge pull request #13052 from t895/serializable-stuff
android: Move CoreErrorDialogFragment to its own file
2024-02-17 22:22:46 -05:00
t895
c327d2a62c android: Move CoreErrorDialogFragment to its own file 2024-02-17 21:58:25 -05:00
t895
50ecad547e android: Input mapping 2024-02-17 12:32:33 -05:00
t895
a251f77556 android: Allow SettingsItems to use String or StringRes 2024-02-16 21:04:26 -05:00
Narr the Reg
1e8554b01f
Merge pull request #12993 from liamwhite/am-rewrite-part1
am: rewrite part 1
2024-02-14 11:02:38 -06:00
liamwhite
ad4ae39903
Merge pull request #13009 from t895/message-dialog-fix
android: Message dialog tweaks
2024-02-13 14:46:56 -05:00
t895
f813dc78b2 android: Prevent user from dismissing mod/cheat notice
Makes sure that a user can't miss this dialog by touching outside the window. They must press "OK" or "Close" to continue.
2024-02-13 13:46:14 -05:00
t895
10ba318807 android: Show cancel option for delete addons dialog 2024-02-13 13:45:17 -05:00
t895
86fc1e5b32 android: Swap ok and close default strings for MessageDialogFragment 2024-02-13 13:44:35 -05:00
t895
3c823254ff android: Add screen vertical alignment setting
It's a bit of a hack since I'm moving the view instead of telling the Vulkan surface to bias itself to the top/bottom/center but it works fine for now.
2024-02-13 10:10:59 -05:00
t895
a0513bc45b android: Expose FSR sharpness slider 2024-02-13 10:04:59 -05:00
t895
836592c447 android: Swap confirmation buttons for delete save data dialog 2024-02-12 16:54:46 -05:00
t895
fbc1b61bff android: Extend MessageDialogFragment to support a negative action and button titles 2024-02-12 16:54:19 -05:00
Liam
b2e140b032 am: rewrite appletAE, appletOE 2024-02-11 21:59:33 -05:00