This adds support for the Performance and Battery Saver modes in the Game Dashboard mostly found on Google Pixel devices.
This does not yet define the specifics for the performance modes but does provide the initial basic support.
Co-authored-by: Emma <153868115+gaypotatoemma@users.noreply.github.com>
Currently, the RESOLUTION_FACTOR preference is being set with the GRAPHICS_API key and default. Therefore, it will set/retrieve the wrong values
This revision updates the RESOLUTION_FACTOR preference to use the RESOLUTION_FACTOR key and default value. As a result, RESOLUTION_FACTOR and GRAPHICS_API should store and return the correct (separate) values
* do not move constant variables
* applet_manager: avoid possible use after move
* use constant references where pointed out by msvc
* extra_hid: initialize response
* ValidateSaveState: passing slot separately is not necessary
* common: mark HashCombine as nodiscard
* cityhash: remove use of using namespace std
* Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
based on 7d8f115
* shared_memory.cpp: fix log error format
* fix compiling with pch off
* core_timing: Apply random base ticks value on startup.
* core: Maintain consistent base system ticks in TAS movies.
* frontend: Add setting to configure a fixed base system ticks value.
* feat(android-hotkeys): Introduce hotkey support for Android app
* android: Fix settings not saving for layout options - screen swap + layout.
* android: Fix `from` method to default to "DEFAULT" if passed an invalid method (and also not be based on ordering)
* android: PR response - name to togglePause
* android: Rework cheats
Reworks cheats to use the navigation component, kotlin, and a tweaked layout for a better tuned look.
* android: Convert remaining files to kotlin and add overlay home button
* android: Remove Picasso dependency
* android: Fix home option layout centering
* android: Adjust logo size in-app
* code: Remove some old msvc workarounds
* android: Upgrade to NDK 26
* Allows access to newer libc++
* common/swap: Make use of std::endian
Allows removing a bunch of defines in favor of a two liner.
* common: Remove misc.cpp
* GetLastErrorMsg has been in error.h for a while and also helps removing a depedency from a hot header like common_funcs
* common: use SetThreadDescription API for thread names
* common: Remove linear disk cache
* Has never been used?
* bit_set: Make constexpr
* ring_buffer: Use feature macro
* bit_set: Use <bit> and concepts
* gsp_gpu: Restore comment
* core: Ignore GCC warning
---------
Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Liam <byteslice@airmail.cc>
* android: Rework Emulation Activity's UI
- New in-game menu
- Ability to open games from file manager
- New shader loading UI
- Fixes an issue where the system bars would stay visible during emulation
* android: Port yuzu's foreground service logic
Fixes an issue where the foreground service notification would be stuck with no way to dismiss it
* android: Android 14 support
* android: New home UI flow
Port of the yuzu-android home UI with a few Citra specific tweaks.
A few important things to note
- New and existing Citra users will be guided through the new setup flow
- Existing game directory location is discarded and will have to be reselected
- Protections around making sure the user has selected a user directory were reworked to fit this new UI. I removed async directory init and DirectoryStateReceivers and check during MainActivity's onResume callback.
- Removed Citra premium. The light/dark theme is now available for everyone.
* android: New blue app theme
* android: Extend UI into status/navigation bar area
* android: Remove yellow theme specific styles
* android: Disable status/navigation bar contrast enforcement
We handle it ourselves so there's no need to use a contrasty background on the system bars
* android: GPU Driver Manager
Includes a rewrite of FileUtil with some helper functions for the manager
* android: Rework NativeLibrary in Kotlin
Besides the rewrite this cleans up the alert dialogs that are used for system errors. Generally removes unused JNI code and makes things a little more consistent.
* android: Home menu support + downloader
* android: Enable minify and resource shrinking
* android: Remove premium page and expose texture filtering modes
* android: Update AGP to 8.1.2
* android: Don't display emulation in cutout area
We don't currently handle the notch properly in the emulation fragment so just don't render under it for now.
* android: native.cpp ClangFormat fixes
* core: SystemTitles: Include std::optional
Without it, the android build would fail
* vk: android: Properly override GetDriverLibrary
* vk_instance: Blacklist timeline semaphore ext on turnip
* vk_platform: Hardcode apiVersion to VK_API_VERSION_1_3
* android: native: Use const where applicable
* android: native: Array pointer access style fix
* android: Share relevant log
Shares the old log if it exists and you haven't booted a game yet and shares the current log if you have booted a game.
* android: Apply dark theme color for software keyboard text
---------
Co-authored-by: GPUCode <geoster3d@gmail.com>
* android: Unify DocumentNode's `key` and `name`
They're effectively the same data, just obtained in different ways.
* android: Remove getFilenameWithExtensions method
After the previous commit, there's only one remaining use of
getFilenameWithExtensions. Let's get rid of that one in favor of
DocumentFile.getName so we no longer need to do manual URI parsing.
* android: Use case insensitivity in DocumentsTree
External storage on Android is case insensitive. This is still the case
when accessing it through SAF. (Of course, SAF makes no guarantees about
whether the storage location picked by the user is backed by external
storage or whether it's case insensitive, but I'm just going to ignore
that for now because I am *so tired of SAF*)
Because the underlying file system is case insensitive, Citra's caching
layer that had to be implemented because SAF's performance is atrocious
also needs to be case insensitive. Otherwise, we get a problem in the
following scenario:
1. Citra wants to check if a particular folder exists in sdmc, and if
not, create it.
2. The folder does exist, but it has a different capitalization than
Citra expects, due to a mismatch between Citra's code and (typically)
files dumped from a real 3DS using ThreeSD.
3. Citra tries to open the folder, but DocumentsTree fails to find it,
because the case doesn't match.
4. Citra then tries to create the folder, but creating the folder fails,
because the underlying filesystem considers the folder to exist.
5. The game fails to start.
(Sorry, did I say creating the folder fails? Actually, a new folder does
get created, with " (1)" appended to the end of the name. SAF makes no
guarantees whatsoever about what happens in this situation – it's all
determined by the storage provider!)
This commit makes the caching layer case insensitive so that the
described scenario will work better.
* code: Prepare frontend for vulkan support
* citra_qt: Add vulkan options to the GUI
* vk_instance: Collect tooling info
* renderer_vulkan: Add vulkan backend
* qt: Fix fullscreen and resize issues on macOS. (#47)
* qt: Fix bugged macOS full screen transition.
* renderer/vulkan: Fix swapchain recreation destroying in-use semaphore.
* renderer/vulkan: Make gl_Position invariant. (#48)
This fixes an issue with black artifacts in Pokemon games on Apple GPUs.
If the vertex calculations differ slightly between render passes, it can
cause parts of model faces to fail depth test.
* vk_renderpass_cache: Bump pixel format count
* android: Custom driver code
* vk_instance: Set moltenvk configuration
* rasterizer_cache: Proper surface unregister
* citra_qt: Fix invalid characters
* vk_rasterizer: Correct special unbind
* android: Allow async presentation toggle
* vk_graphics_pipeline: Fix async shader compilation
* We were actually waiting for the pipelines regardless of the setting, oops
* vk_rasterizer: More robust attribute loading
* android: Move PollEvents to OpenGL window
* Vulkan does not need this and it causes problems
* vk_instance: Enable robust buffer access
* Improves stability on mali devices
* vk_renderpass_cache: Bring back renderpass flushing
* externals: Update vulkan-headers
* gl_rasterizer: Separable shaders for everyone
* vk_blit_helper: Corect depth to color convertion
* renderer_vulkan: Implement reinterpretation with copy
* Allows reinterpreteration with simply copy on AMD
* vk_graphics_pipeline: Only fast compile if no shaders are pending
* With this shaders weren't being compiled in parallel
* vk_swapchain: Ensure vsync doesn't lock framerate
* vk_present_window: Match guest swapchain size to vulkan image count
* Less latency and fixes crashes that were caused by images being deleted before free
* vk_instance: Blacklist VK_EXT_pipeline_creation_cache_control with nvidia gpus
* Resolves crashes when async shader compilation is enabled
* vk_rasterizer: Bump async threshold to 6
* Many games have fullscreen quads with 6 vertices. Fixes pokemon textures missing with async shaders
* android: More robust surface recreation
* renderer_vulkan: Fix dynamic state being lost
* vk_pipeline_cache: Skip cache save when no pipeline cache exists
* This is the cache when loading a save state
* sdl: Fix surface initialization on macOS. (#49)
* sdl: Fix surface initialization on macOS.
* sdl: Fix render window events not being handled under Vulkan.
* renderer/vulkan: Fix binding/unbinding of shadow rendering buffer.
* vk_stream_buffer: Respect non coherent access alignment
* Required by nvidia GPUs on MacOS
* renderer/vulkan: Support VK_EXT_fragment_shader_interlock for shadow rendering. (#51)
* renderer_vulkan: Port some recent shader fixes
* vk_pipeline_cache: Improve shadow detection
* vk_swapchain: Add missing check
* renderer_vulkan: Fix hybrid screen
* Revert "gl_rasterizer: Separable shaders for everyone"
Causes crashes on mali GPUs, will need separate PR
This reverts commit d22d556d30.
* renderer_vulkan: Fix flipped screenshot
---------
Co-authored-by: Steveice10 <1269164+Steveice10@users.noreply.github.com>
* renderer_gl: Make rasterizer normal class member
* It doesn't need to be heap allocated anymore
* gl_rasterizer: Remove default_texture
* It's unused
* gl_rasterizer: General cleanup
* gl_rasterizer: Lower case lambdas
* Match style with review comments from vulkan backend
* rasterizer_cache: Prevent memory leak
* Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends
* rasterizer_cache: Make temp copy of old surface
* The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly
* citra_qt: Manually create dialog tabs
* Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration
* citra_qt: Eliminate global system usage
* core: Remove global system usage in memory and HIO
* citra_qt: Use qOverload
* tests: Run clang format
* gl_texture_runtime: Fix surface scaling
* Move mii to own namespace and add checksummed mii data
* Fix compile issues
* Make mii classes trivial and add cast operator
* Fix Android side
* Add new line at the end of files.
* Make miidata a struct and crc16 a u32_be as per switch code.
* Apply suggestions
* Change back crc to u16 and set padding to 0.
When we targeted API <32, the notification permission would automatically be requested on startup. This restores that behavior temporarily while we work on new UX.
* android: Migrate to Kotlin DSL
Includes updates to all android dependencies/ndk (minus billing) and adds support for Kotlin, Android 13, and view binding.
* android: Remove unused tests
* android: Remove unused dependencies
* build: Rework CI and move all bundling into new build target.
* ci: Use "mingw" in msys2 release names for compatibility.
* ci: Use "osx" in macOS release names for compatibility.
* ci: Disable macOS upload.
Will be moved to a separate PR for canary merge.
* android: Update UI strings to reflect desktop counterpart
Quick edit to the UI strings to bring the text up to parity with Citra desktop, plus some small QoL changes.
* Update strings.xml