Compare commits

...

6 Commits

Author SHA1 Message Date
lizzie
a0d6904837 [android] try fix playtime datarace (using nullptr) by just zealously checking for nullptr
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-12-08 02:38:32 +01:00
xbzk
5b019a81a7 [docs] debug knobs user guide (#3159)
* initial debug knobs guide
* integration with add boolean guide

Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: Allison Cunha <allisonbzk@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3159
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
2025-12-07 20:33:14 +01:00
lizzie
83332316aa [gamemode] Make available on other platforms (#353)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/353
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-07 07:13:43 +01:00
lizzie
3141019fcd [qt, util] Change default units from units of 1024 (MiB, KiB) to 1000 (MB, KB) (#2882)
Better for readability of these units? Perhaps
Signed-off-by: lizzie <lizzie@eden-emu.dev>

Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2882
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-07 00:29:37 +01:00
Kleidis
4cc9aa691d [android] Remove all frame skip / frame interpolation code (#3152)
Both options do nothing, however one was exposed to the user making them think it actually helps.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3152
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: Kleidis <kleidis1@protonmail.com>
Co-committed-by: Kleidis <kleidis1@protonmail.com>
2025-12-07 00:28:58 +01:00
JPikachu
d96ab0df6a [docs] Add Boolean toggle guide (#3081)
Hope this helps someone, it was fun to write. ❤️

Signed-off-by: JPikachu <jpikachu@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3081
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: JPikachu <jpikachu@eden-emu.dev>
Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
2025-12-06 23:33:33 +01:00
66 changed files with 420 additions and 1082 deletions

View File

@@ -487,10 +487,6 @@ else()
# wow
find_package(Boost 1.57.0 CONFIG REQUIRED OPTIONAL_COMPONENTS headers context system fiber filesystem)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ANDROID)
find_package(gamemode 1.7 MODULE)
endif()
if (ENABLE_OPENSSL)
find_package(OpenSSL 1.1.1 REQUIRED)
endif()
@@ -566,6 +562,7 @@ find_package(VulkanUtilityLibraries)
find_package(SimpleIni)
find_package(SPIRV-Tools)
find_package(sirit)
find_package(gamemode)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
find_package(xbyak)

View File

@@ -0,0 +1,154 @@
# User Handbook - Adding Boolean Settings Toggles
> [!WARNING]
> This guide is intended for developers ONLY. If you are not a developer, this likely irrelevant to yourself.
>
> If you want to add temporary toggles, please refer to **[Adding Debug Knobs](AddingDebugKnobs.md)**
This guide will walk you through adding a new boolean toggle setting to Eden's configuration across both Qt's (PC) and Kotlin's (Android) UIs.
## Index
1. [Step 1 - src/common/settings](#step-1-src-common-settings)
2. [Qt's (PC) Steps](#qt-pc-steps)
* [Step 2 - src/qt_common/config/shared_translation.cpp](#step-2-src-qt_common-config-shared_translation-cpp)
3. [ Kotlin's (Android) Steps](#android-steps)
* [Step 3 - BooleanSetting.kt](#step-3-src-android-app-src-main-java-org-yuzu-yuzu_emu-features-settings-model-booleansetting-kt)
* [Step 4 - SettingsItem.kt](#step-4-src-android-app-src-main-java-org-yuzu-yuzu_emu-features-settings-model-view-settingsitem-kt)
* [Step 5 - SettingsFragmentPresenter.kt](#step-5-src-android-app-src-main-java-org-yuzu-yuzu_emu-features-settings-ui-settingsfragmentpresenter-kt)
* [Step 6 - strings.xml](#step-6-src-android-app-src-main-res-values-strings-xml)
4. [Step 7 - Use Your Toggle](#step-7-use-your-toggle)
5. [Best Practices](#best-practices)
---
## Step 1 - src/common/settings.
Firstly add your desired toggle inside `setting.h`,
Example:
```
SwitchableSetting<bool> your_setting_name{linkage, false, "your_setting_name", Category::RendererExtensions};
```
NOTE - If you wish for your toggle to be on by default then change `false` to `true` after `linkage,`.
### Remember to add your toggle to the appropriate category, for example:
Common Categories:
* Category::Renderer
* Category::RendererAdvanced
* Category::RendererExtensions
* Category::System
* Category::Core
---
## Qt (PC) Steps
### Step 2 - src/qt_common/config/shared_translation.cpp
Now you can add the toggle to the QT (PC) UI inside `shared_translation.cpp`,
Find where you wish for it to appear and place it there.
Example:
```
INSERT(Settings,
your_setting_name,
tr("Your Setting Display Name"),
tr("Detailed description of what this setting does.\n"
"You can use multiple lines.\n"
"Explain any caveats or requirements."));
```
### Make sure to:
* Keep display naming consistant
* Put detailed info in the description
* Use `\n` for line breaks in descriptions
---
## Android Steps
### Step 3 - src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt
Now add it inside `BooleanSetting.kt` where it should be in the settings.
Example:
```
RENDERER_YOUR_SETTING_NAME("your_setting_name"),
```
Remember to make sure the naming of the prefix matches the desired category.
### Step 4 - src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt
Now you may add the toggle to the Kotlin (Android) UI inside `SettingsItem.kt`.
Example:
```
put(
SwitchSetting(
BooleanSetting.RENDERER_YOUR_SETTING_NAME,
titleId = R.string.your_setting_name,
descriptionId = R.string.your_setting_name_description
)
)
```
### Step 5 - src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt
Now add your setting to the correct location inside `SettingsFragmentPresenter.kt` within the right category.
Example:
```
add(BooleanSetting.RENDERER_YOUR_SETTING_NAME.key)
```
Remember, placing matters! Settings appear in the order of where you add them.
### Step 6 - src/android/app/src/main/res/values/strings.xml
Now add your setting and description to `strings.xml` in the appropriate place.
Example:
```
<string name="your_setting_name">Your Setting Display Name</string>
<string name="your_setting_name_description">Detailed description of what this setting does. Explain any caveats, requirements, or warnings here.</string>
```
---
## Step 7 - Use Your Toggle!
Now the UI part is done find a place in the code for the toggle,
And use it to your heart's desire!
Example:
```
const bool your_value = Settings::values.your_setting_name.GetValue();
if (your_value) {
// Do something when enabled
}
```
If you wish to do something only when the toggle is disabled,
Use `if (!your_value) {` instead of `if (your_value) {`.
---
## Best Practices
* Naming - Use clear, descriptive names. Something for both the devs and the users.
* Defaults - Choose safe default values (usually false for new features).
* Documentation - Write clear descriptions explaining when and why to use the setting.
* Categories - Put settings in the appropriate category.
* Order - Place related settings near each other.
* Testing - Always test on both PC and Android before committing when possible.
### Thank you for reading, I hope this guide helped you making your toggle!

View File

@@ -0,0 +1,119 @@
# User Handbook - Adding Debug Knobs
Debug Knobs is a 16-bit integer setting (`debug_knobs`) in the Eden Emulator that serves as a bitmask for gating various testing and debugging features. This allows developers and advanced users to enable or disable specific debug behaviors without requiring deploying of complete but temporary toggles.
The setting ranges from 0 to 65535 (0x0000 to 0xFFFF), where each bit represents a different debug feature flag.
## Index
1. [Advantages](#advantages)
2. [Usage](#usage)
* [Accessing Debug Knobs (dev side)](#accessing-debug-knobs-dev-side)
* [Setting Debug Knobs (user side)](#setting-debug-knobs-user-side)
* [Bit Manipulation Examples](#bit-manipulation-examples)
3. [Examples](#examples)
* [Example 1: Conditional Debug Logging](#example-1-conditional-debug-logging)
* [Example 2: Performance Tuning](#example-2-performance-tuning)
* [Example 3: Feature Gating](#example-3-feature-gating)
4. [Best Practices](#best-practices)
---
## Advantages
The main advantage is to avoid deploying new disposable toggles (those made only for testing stage, and are disposed once new feature gets good to merge). This empowers devs to be free of all frontend burocracy and hassle of new toggles.
Common advantages recap:
* **Fine-Grained Control**: Enable or disable up to 16 individual debug features independently using bit manipulation on a single build
* **Runtime Configuration**: Change debug behavior at runtime the same way as new toggles would do
* **Safe incremental development**: New debug features can be added while impact can be isolated from previous deployments
## Usage
### Accessing Debug Knobs (dev side)
Use the `Settings::getDebugKnobAt(u8 i)` function to check if a specific bit is set:
```cpp
#include "common/settings.h"
// Check if bit 0 is set
bool feature_enabled = Settings::getDebugKnobAt(0);
// Check if bit 15 is set
bool another_feature = Settings::getDebugKnobAt(15);
```
The function returns `true` if the specified bit (0-15) is set in the `debug_knobs` value, `false` otherwise.
### Setting Debug Knobs (user side)
Developers must inform which knobs are tied to each functionality to be tested.
The debug knobs value can be set through:
1. **Desktop UI**: In the Debug configuration tab, there's a spinbox for "Debug knobs" (0-65535)
2. **Android UI**: Available as an integer setting in the Debug section
3. **Configuration Files**: Set the `debug_knobs` value in the emulator's configuration
### Bit Manipulation Examples
To enable specific features, calculate the decimal value by setting the appropriate bits:
* **Enable only bit 0**: Value = 1 (2^0)
* **Enable only bit 1**: Value = 2 (2^1)
* **Enable bits 0 and 1**: Value = 3 (2^0 + 2^1)
* **Enable bit 15**: Value = 32768 (2^15)
## Examples
### Example 1: Conditional Debug Logging
```cpp
void SomeFunction() {
if (Settings::getDebugKnobAt(0)) {
LOG_DEBUG(Common, "Debug feature 0 is enabled");
// Additional debug code here
}
if (Settings::getDebugKnobAt(1)) {
LOG_DEBUG(Common, "Debug feature 1 is enabled");
// Different debug behavior
}
}
```
### Example 2: Performance Tuning
```cpp
bool UseOptimizedPath() {
// Skip optimization if debug bit 2 is set for testing
return !Settings::getDebugKnobAt(2);
}
```
### Example 3: Feature Gating
```cpp
void ExperimentalFeature() {
static constexpr u8 EXPERIMENTAL_FEATURE_BIT = 3;
if (!Settings::getDebugKnobAt(EXPERIMENTAL_FEATURE_BIT)) {
// Fallback to stable implementation
StableImplementation();
return;
}
// Experimental implementation
ExperimentalImplementation();
}
```
## Best Practices
* This setting is intended for development and testing purposes only
* Knobs must be unwired before PR creation
* The setting is per-game configurable, allowing different debug setups for different titles

View File

@@ -14,3 +14,4 @@ This handbook is primarily aimed at the end-user - baking useful knowledge for e
- **[Orphaned Profiles](Orphaned.md)**
- **[Command Line](CommandLine.md)**
- **[Native Application Development](Native.md)**
- **[Adding Boolean Settings Toggles](AddingBooleanToggles.md)**

View File

@@ -267,9 +267,11 @@ if (ANDROID AND ARCHITECTURE_arm64)
AddJsonPackage(libadrenotools)
endif()
if (UNIX AND NOT APPLE AND NOT TARGET gamemode::headers)
AddJsonPackage(gamemode)
if (gamemode_ADDED)
add_library(gamemode INTERFACE)
target_include_directories(gamemode INTERFACE gamemode)
target_include_directories(gamemode INTERFACE ${gamemode_SOURCE_DIR}/lib)
add_library(gamemode::headers ALIAS gamemode)
endif()

View File

@@ -218,5 +218,12 @@
"artifact": "MoltenVK-macOS.tar",
"hash": "5695b36ca5775819a71791557fcb40a4a5ee4495be6b8442e0b666d0c436bec02aae68cc6210183f7a5c986bdbec0e117aecfad5396e496e9c2fd5c89133a347",
"bundled": true
},
"gamemode": {
"repo": "FeralInteractive/gamemode",
"sha": "ce6fe122f3",
"hash": "e87ec14ed3e826d578ebf095c41580069dda603792ba91efa84f45f4571a28f4d91889675055fd6f042d7dc25b0b9443daf70963ae463e38b11bcba95f4c65a9",
"version": "1.7",
"find_args": "MODULE"
}
}

View File

@@ -1,376 +0,0 @@
/*
Copyright (c) 2017-2019, Feral Interactive
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Feral Interactive nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CLIENT_GAMEMODE_H
#define CLIENT_GAMEMODE_H
/*
* GameMode supports the following client functions
* Requests are refcounted in the daemon
*
* int gamemode_request_start() - Request gamemode starts
* 0 if the request was sent successfully
* -1 if the request failed
*
* int gamemode_request_end() - Request gamemode ends
* 0 if the request was sent successfully
* -1 if the request failed
*
* GAMEMODE_AUTO can be defined to make the above two functions apply during static init and
* destruction, as appropriate. In this configuration, errors will be printed to stderr
*
* int gamemode_query_status() - Query the current status of gamemode
* 0 if gamemode is inactive
* 1 if gamemode is active
* 2 if gamemode is active and this client is registered
* -1 if the query failed
*
* int gamemode_request_start_for(pid_t pid) - Request gamemode starts for another process
* 0 if the request was sent successfully
* -1 if the request failed
* -2 if the request was rejected
*
* int gamemode_request_end_for(pid_t pid) - Request gamemode ends for another process
* 0 if the request was sent successfully
* -1 if the request failed
* -2 if the request was rejected
*
* int gamemode_query_status_for(pid_t pid) - Query status of gamemode for another process
* 0 if gamemode is inactive
* 1 if gamemode is active
* 2 if gamemode is active and this client is registered
* -1 if the query failed
*
* const char* gamemode_error_string() - Get an error string
* returns a string describing any of the above errors
*
* Note: All the above requests can be blocking - dbus requests can and will block while the daemon
* handles the request. It is not recommended to make these calls in performance critical code
*/
#include <stdbool.h>
#include <stdio.h>
#include <dlfcn.h>
#include <string.h>
#include <assert.h>
#include <sys/types.h>
static char internal_gamemode_client_error_string[512] = { 0 };
/**
* Load libgamemode dynamically to dislodge us from most dependencies.
* This allows clients to link and/or use this regardless of runtime.
* See SDL2 for an example of the reasoning behind this in terms of
* dynamic versioning as well.
*/
static volatile int internal_libgamemode_loaded = 1;
/* Typedefs for the functions to load */
typedef int (*api_call_return_int)(void);
typedef const char *(*api_call_return_cstring)(void);
typedef int (*api_call_pid_return_int)(pid_t);
/* Storage for functors */
static api_call_return_int REAL_internal_gamemode_request_start = NULL;
static api_call_return_int REAL_internal_gamemode_request_end = NULL;
static api_call_return_int REAL_internal_gamemode_query_status = NULL;
static api_call_return_cstring REAL_internal_gamemode_error_string = NULL;
static api_call_pid_return_int REAL_internal_gamemode_request_start_for = NULL;
static api_call_pid_return_int REAL_internal_gamemode_request_end_for = NULL;
static api_call_pid_return_int REAL_internal_gamemode_query_status_for = NULL;
/**
* Internal helper to perform the symbol binding safely.
*
* Returns 0 on success and -1 on failure
*/
__attribute__((always_inline)) static inline int internal_bind_libgamemode_symbol(
void *handle, const char *name, void **out_func, size_t func_size, bool required)
{
void *symbol_lookup = NULL;
char *dl_error = NULL;
/* Safely look up the symbol */
symbol_lookup = dlsym(handle, name);
dl_error = dlerror();
if (required && (dl_error || !symbol_lookup)) {
snprintf(internal_gamemode_client_error_string,
sizeof(internal_gamemode_client_error_string),
"dlsym failed - %s",
dl_error);
return -1;
}
/* Have the symbol correctly, copy it to make it usable */
memcpy(out_func, &symbol_lookup, func_size);
return 0;
}
/**
* Loads libgamemode and needed functions
*
* Returns 0 on success and -1 on failure
*/
__attribute__((always_inline)) static inline int internal_load_libgamemode(void)
{
/* We start at 1, 0 is a success and -1 is a fail */
if (internal_libgamemode_loaded != 1) {
return internal_libgamemode_loaded;
}
/* Anonymous struct type to define our bindings */
struct binding {
const char *name;
void **functor;
size_t func_size;
bool required;
} bindings[] = {
{ "real_gamemode_request_start",
(void **)&REAL_internal_gamemode_request_start,
sizeof(REAL_internal_gamemode_request_start),
true },
{ "real_gamemode_request_end",
(void **)&REAL_internal_gamemode_request_end,
sizeof(REAL_internal_gamemode_request_end),
true },
{ "real_gamemode_query_status",
(void **)&REAL_internal_gamemode_query_status,
sizeof(REAL_internal_gamemode_query_status),
false },
{ "real_gamemode_error_string",
(void **)&REAL_internal_gamemode_error_string,
sizeof(REAL_internal_gamemode_error_string),
true },
{ "real_gamemode_request_start_for",
(void **)&REAL_internal_gamemode_request_start_for,
sizeof(REAL_internal_gamemode_request_start_for),
false },
{ "real_gamemode_request_end_for",
(void **)&REAL_internal_gamemode_request_end_for,
sizeof(REAL_internal_gamemode_request_end_for),
false },
{ "real_gamemode_query_status_for",
(void **)&REAL_internal_gamemode_query_status_for,
sizeof(REAL_internal_gamemode_query_status_for),
false },
};
void *libgamemode = NULL;
/* Try and load libgamemode */
libgamemode = dlopen("libgamemode.so.0", RTLD_NOW);
if (!libgamemode) {
/* Attempt to load unversioned library for compatibility with older
* versions (as of writing, there are no ABI changes between the two -
* this may need to change if ever ABI-breaking changes are made) */
libgamemode = dlopen("libgamemode.so", RTLD_NOW);
if (!libgamemode) {
snprintf(internal_gamemode_client_error_string,
sizeof(internal_gamemode_client_error_string),
"dlopen failed - %s",
dlerror());
internal_libgamemode_loaded = -1;
return -1;
}
}
/* Attempt to bind all symbols */
for (size_t i = 0; i < sizeof(bindings) / sizeof(bindings[0]); i++) {
struct binding *binder = &bindings[i];
if (internal_bind_libgamemode_symbol(libgamemode,
binder->name,
binder->functor,
binder->func_size,
binder->required)) {
internal_libgamemode_loaded = -1;
return -1;
};
}
/* Success */
internal_libgamemode_loaded = 0;
return 0;
}
/**
* Redirect to the real libgamemode
*/
__attribute__((always_inline)) static inline const char *gamemode_error_string(void)
{
/* If we fail to load the system gamemode, or we have an error string already, return our error
* string instead of diverting to the system version */
if (internal_load_libgamemode() < 0 || internal_gamemode_client_error_string[0] != '\0') {
return internal_gamemode_client_error_string;
}
/* Assert for static analyser that the function is not NULL */
assert(REAL_internal_gamemode_error_string != NULL);
return REAL_internal_gamemode_error_string();
}
/**
* Redirect to the real libgamemode
* Allow automatically requesting game mode
* Also prints errors as they happen.
*/
#ifdef GAMEMODE_AUTO
__attribute__((constructor))
#else
__attribute__((always_inline)) static inline
#endif
int gamemode_request_start(void)
{
/* Need to load gamemode */
if (internal_load_libgamemode() < 0) {
#ifdef GAMEMODE_AUTO
fprintf(stderr, "gamemodeauto: %s\n", gamemode_error_string());
#endif
return -1;
}
/* Assert for static analyser that the function is not NULL */
assert(REAL_internal_gamemode_request_start != NULL);
if (REAL_internal_gamemode_request_start() < 0) {
#ifdef GAMEMODE_AUTO
fprintf(stderr, "gamemodeauto: %s\n", gamemode_error_string());
#endif
return -1;
}
return 0;
}
/* Redirect to the real libgamemode */
#ifdef GAMEMODE_AUTO
__attribute__((destructor))
#else
__attribute__((always_inline)) static inline
#endif
int gamemode_request_end(void)
{
/* Need to load gamemode */
if (internal_load_libgamemode() < 0) {
#ifdef GAMEMODE_AUTO
fprintf(stderr, "gamemodeauto: %s\n", gamemode_error_string());
#endif
return -1;
}
/* Assert for static analyser that the function is not NULL */
assert(REAL_internal_gamemode_request_end != NULL);
if (REAL_internal_gamemode_request_end() < 0) {
#ifdef GAMEMODE_AUTO
fprintf(stderr, "gamemodeauto: %s\n", gamemode_error_string());
#endif
return -1;
}
return 0;
}
/* Redirect to the real libgamemode */
__attribute__((always_inline)) static inline int gamemode_query_status(void)
{
/* Need to load gamemode */
if (internal_load_libgamemode() < 0) {
return -1;
}
if (REAL_internal_gamemode_query_status == NULL) {
snprintf(internal_gamemode_client_error_string,
sizeof(internal_gamemode_client_error_string),
"gamemode_query_status missing (older host?)");
return -1;
}
return REAL_internal_gamemode_query_status();
}
/* Redirect to the real libgamemode */
__attribute__((always_inline)) static inline int gamemode_request_start_for(pid_t pid)
{
/* Need to load gamemode */
if (internal_load_libgamemode() < 0) {
return -1;
}
if (REAL_internal_gamemode_request_start_for == NULL) {
snprintf(internal_gamemode_client_error_string,
sizeof(internal_gamemode_client_error_string),
"gamemode_request_start_for missing (older host?)");
return -1;
}
return REAL_internal_gamemode_request_start_for(pid);
}
/* Redirect to the real libgamemode */
__attribute__((always_inline)) static inline int gamemode_request_end_for(pid_t pid)
{
/* Need to load gamemode */
if (internal_load_libgamemode() < 0) {
return -1;
}
if (REAL_internal_gamemode_request_end_for == NULL) {
snprintf(internal_gamemode_client_error_string,
sizeof(internal_gamemode_client_error_string),
"gamemode_request_end_for missing (older host?)");
return -1;
}
return REAL_internal_gamemode_request_end_for(pid);
}
/* Redirect to the real libgamemode */
__attribute__((always_inline)) static inline int gamemode_query_status_for(pid_t pid)
{
/* Need to load gamemode */
if (internal_load_libgamemode() < 0) {
return -1;
}
if (REAL_internal_gamemode_query_status_for == NULL) {
snprintf(internal_gamemode_client_error_string,
sizeof(internal_gamemode_client_error_string),
"gamemode_query_status_for missing (older host?)");
return -1;
}
return REAL_internal_gamemode_query_status_for(pid);
}
#endif // CLIENT_GAMEMODE_H

View File

@@ -24,7 +24,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

View File

@@ -52,10 +52,6 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
SHOW_FW_VERSION("show_firmware_version"),
SOC_OVERLAY_BACKGROUND("soc_overlay_background"),
FRAME_INTERPOLATION("frame_interpolation"),
// FRAME_SKIPPING("frame_skipping"),
ENABLE_INPUT_OVERLAY_AUTO_HIDE("enable_input_overlay_auto_hide"),
PERF_OVERLAY_BACKGROUND("perf_overlay_background"),

View File

@@ -236,21 +236,6 @@ abstract class SettingsItem(
override fun reset() = BooleanSetting.USE_DOCKED_MODE.reset()
}
put(
SwitchSetting(
BooleanSetting.FRAME_INTERPOLATION,
titleId = R.string.frame_interpolation,
descriptionId = R.string.frame_interpolation_description
)
)
// put(
// SwitchSetting(
// BooleanSetting.FRAME_SKIPPING,
// titleId = R.string.frame_skipping,
// descriptionId = R.string.frame_skipping_description
// )
// )
put(
SwitchSetting(

View File

@@ -463,7 +463,6 @@ class SettingsFragmentPresenter(
add(BooleanSetting.RENDERER_EARLY_RELEASE_FENCES.key)
add(IntSetting.DMA_ACCURACY.key)
add(BooleanSetting.BUFFER_REORDER_DISABLE.key)
add(BooleanSetting.FRAME_INTERPOLATION.key)
add(BooleanSetting.RENDERER_FAST_GPU.key)
add(IntSetting.FAST_GPU_TIME.key)
add(IntSetting.RENDERER_SHADER_BACKEND.key)

View File

@@ -1127,14 +1127,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
val actualFps = perfStats[FPS]
if (BooleanSetting.SHOW_FPS.getBoolean(needsGlobal)) {
val enableFrameInterpolation =
BooleanSetting.FRAME_INTERPOLATION.getBoolean()
// val enableFrameSkipping = BooleanSetting.FRAME_SKIPPING.getBoolean()
var fpsText = String.format("FPS: %.1f", actualFps)
if (enableFrameInterpolation) {
fpsText = String.format("eFPS: %.1f", actualFps)
}
sb.append(fpsText)
}

View File

@@ -1166,11 +1166,8 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmptyUserDirectory(JNIEnv*
void Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerInit(JNIEnv* env, jobject obj) {
// for some reason the full user directory isnt initialized in Android, so we need to create it
const auto play_time_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::PlayTimeDir);
if (!Common::FS::IsDir(play_time_dir)) {
if (!Common::FS::CreateDir(play_time_dir)) {
LOG_WARNING(Frontend, "Failed to create play time directory");
}
}
if (!Common::FS::IsDir(play_time_dir) && !Common::FS::CreateDir(play_time_dir))
LOG_WARNING(Frontend, "Failed to create play time directory");
play_time_manager = std::make_unique<PlayTime::PlayTimeManager>();
}
@@ -1183,13 +1180,16 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerStart(JNIEnv* env, job
}
void Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerStop(JNIEnv* env, jobject obj) {
play_time_manager->Stop();
if (play_time_manager)
play_time_manager->Stop();
}
jlong Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerGetPlayTime(JNIEnv* env, jobject obj,
jstring jprogramId) {
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
return play_time_manager->GetPlayTime(program_id);
jlong Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerGetPlayTime(JNIEnv* env, jobject obj, jstring jprogramId) {
if (play_time_manager) {
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
return play_time_manager->GetPlayTime(program_id);
}
return 0UL;
}
jlong Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerGetCurrentTitleId(JNIEnv* env,
@@ -1199,17 +1199,17 @@ jlong Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerGetCurrentTitleId(JNI
void Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerResetProgramPlayTime(JNIEnv* env, jobject obj,
jstring jprogramId) {
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
if (play_time_manager) {
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
play_time_manager->ResetProgramPlayTime(program_id);
}
}
void Java_org_yuzu_yuzu_1emu_NativeLibrary_playTimeManagerSetPlayTime(JNIEnv* env, jobject obj,
jstring jprogramId, jlong playTimeSeconds) {
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
if (play_time_manager) {
play_time_manager->SetPlayTime(program_id, static_cast<u64>(playTimeSeconds));
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
play_time_manager->SetPlayTime(program_id, u64(playTimeSeconds));
}
}

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">كثافة تمرير تظليل العينة. تؤدي القيم الأعلى إلى تحسين الجودة بشكل أكبر، ولكنها تقلل أيضًا من الأداء إلى حد كبير.</string>
<string name="veil_renderer">العارض</string>
<string name="frame_interpolation">تحسين سرعة الإطارات</string>
<string name="frame_interpolation_description">يضمن تسليمًا سلسًا ومتناسقًا للإطارات من خلال مزامنة التوقيت بينها، مما يقلل من التقطيع وعدم انتظام الحركة. مثالي للألعاب التي تعاني من عدم استقرار في توقيت الإطارات أو تقطع دقيق أثناء اللعب.</string>
<string name="renderer_early_release_fences">إطلاق الأسوار مبكرًا</string>
<string name="renderer_early_release_fences_description">يساعد في إصلاح مشكلة 0 إطار في الثانية في ألعاب مثل DKCR:HD وSubnautica Below Zero وOri 2، ولكن قد يتسبب في تعطيل التحميل أو الأداء في ألعاب Unreal Engine.</string>
<string name="sync_memory_operations">مزامنة عمليات الذاكرة</string>
@@ -472,8 +470,6 @@
<string name="display">الشاشة</string>
<string name="processing">تأثيرات بعد المعالجة</string>
<string name="frame_skipping">قيد التطوير: تخطي الإطارات</string>
<string name="frame_skipping_description">تبديل تخطي الإطارات لتحسين الأداء عن طريق تقليل عدد الإطارات المعروضة. هذه الميزة قيد التطوير وسيتم تمكينها في الإصدارات المستقبلية.</string>
<string name="renderer_accuracy">مستوى الدقة</string>
<string name="renderer_resolution">الدقة (الإرساء/محمول)</string>
<string name="renderer_vsync">VSync وضع</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">چڕی تێپەڕاندنی سێبەرکردنی نموونە. بەهای زیاتر کوالێتی باشتر دەکات بەڵام کارایی زیاتر کەم دەکاتەوە.</string>
<string name="veil_renderer">رێندرەر</string>
<string name="frame_interpolation">تحسين توقيت الإطارات</string>
<string name="frame_interpolation_description">يضمن تسليمًا سلسًا ومتناسقًا للإطارات من خلال مزامنة التوقيت بينها، مما يقلل من التقطيع وعدم انتظام الحركة. مثالي للألعاب التي تعاني من عدم استقرار في توقيت الإطارات أو تقطع دقيق أثناء اللعب.</string>
<string name="renderer_early_release_fences">زێدەکردنی پەرستارەکان زووتر</string>
<string name="renderer_early_release_fences_description">یارمەتی دەدات لە چارەسەری 0 FPS لە یارییەکانی وەک DKCR:HD، Subnautica Below Zero و Ori 2، بەڵام ڕەنگە بارکردن یان کارایی لە یارییەکانی Unreal Engine تێکبدات.</string>
<string name="sync_memory_operations">هاوبەشیی کردارەکانی بیرگە</string>
@@ -382,8 +380,6 @@
<string name="display">پیشاندان</string>
<string name="processing">پاشپڕۆسەکردن</string>
<string name="frame_skipping">قيد التطوير: تخطي الإطارات</string>
<string name="frame_skipping_description">تێپەڕاندنی فرەیمەکان بکە بۆ باشترکردنی کارایی بە کەمکردنەوەی ژمارەی فرەیمە ڕێندرکراوەکان. ئەم تایبەتمەندییە هێشتا کاردەکرێت و لە وەشانە داهاتووەکاندا چالاکدەکرێت.</string>
<string name="renderer_accuracy">ئاستی وردبینی</string>
<string name="renderer_resolution">ڕوونی (دۆخی دەستی/دۆخی دۆک)</string>
<string name="renderer_vsync">دۆخی VSync</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">Intenzita průchodu stínování vzorku. Vyšší hodnoty zlepšují kvalitu, ale také výrazněji snižují výkon.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Vylepšené časování snímků</string>
<string name="frame_interpolation_description">Zajišťuje plynulé a konzistentní zobrazování snímků synchronizací jejich časování, čímž snižuje trhání a nerovnoměrné animace. Ideální pro hry, které trpí nestabilitou časování snímků nebo mikrotrháním během hraní.</string>
<string name="renderer_early_release_fences">Uvolnit ploty brzy</string>
<string name="renderer_early_release_fences_description">Pomáhá opravit 0 FPS v hrách jako DKCR:HD, Subnautica Below Zero a Ori 2, ale může narušit načítání nebo výkon v hrách na Unreal Engine.</string>
<string name="sync_memory_operations">Synchronizace paměťových operací</string>
@@ -370,8 +368,6 @@
<string name="display">Zobrazení</string>
<string name="processing">Postprocesing</string>
<string name="frame_skipping">WIP: Přeskočení snímků</string>
<string name="frame_skipping_description">Přepínání přeskočení snímků pro zlepšení výkonu snížením počtu vykreslených snímků. Tato funkce je stále ve vývoji a bude povolena v budoucích verzích.</string>
<string name="renderer_accuracy">Úroveň přesnosti</string>
<string name="renderer_resolution">Rozlišení (Handheld/Docked)</string>
<string name="renderer_vsync">VSync režim</string>

View File

@@ -84,8 +84,6 @@
<string name="sample_shading_fraction_description">Die Intensität des Sample-Shading-Durchgangs. Höhere Werte verbessern die Qualität stärker, beeinträchtigen aber auch die Leistung stärker.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Erweiterte Frame-Synchronisation</string>
<string name="frame_interpolation_description">Sorgt für eine gleichmäßige und konsistente Frame-Wiedergabe durch Synchronisierung der Frame-Zeiten, was Ruckeln und ungleichmäßige Animationen reduziert. Ideal für Spiele, die unter instabilen Frame-Zeiten oder Mikrorucklern leiden.</string>
<string name="renderer_early_release_fences">Zäune früher freigeben</string>
<string name="renderer_early_release_fences_description">Behebt 0 FPS in Spielen wie DKCR:HD, Subnautica Below Zero und Ori 2, kann aber Ladezeiten oder Performance in Unreal Engine-Spielen beeinträchtigen.</string>
<string name="sync_memory_operations">Speicheroperationen synchronisieren</string>
@@ -423,12 +421,6 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die
<!-- Graphics settings strings -->
<string name="backend">Backend</string>
<string name="display">Anzeige</string>
<string name="processing">Nachbearbeitung</string>
<string name="frame_skipping">WIP: Frame Skipping</string>
<string name="frame_skipping_description">Aktivieren Sie Frame Skipping, um die Leistung durch Reduzierung der gerenderten Frames zu verbessern. Diese Funktion wird noch entwickelt und in zukünftigen Versionen verfügbar sein.</string>
<string name="renderer_accuracy">Genauigkeitsstufe</string>
<string name="renderer_resolution">Auflösung (Handheld/Gedockt)</string>
<string name="renderer_vsync">VSync-Modus</string>
<string name="renderer_screen_layout">Ausrichtung</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">La intensidad del paso de sombreado de la muestra. Los valores más altos mejoran más la calidad, pero también reducen el rendimiento en mayor medida.</string>
<string name="veil_renderer">Renderizador</string>
<string name="frame_interpolation">Ritmo de fotogramas mejorado</string>
<string name="frame_interpolation_description">Garantiza una entrega de fotogramas fluida y consistente al sincronizar el tiempo entre fotogramas, reduciendo la tartamudez y la animación desigual. Ideal para juegos que experimentan inestabilidad en el tiempo de fotogramas o microtartamudeos durante el juego.</string>
<string name="renderer_early_release_fences">Liberar las vallas antes</string>
<string name="renderer_early_release_fences_description">Ayuda a arreglar 0 FPS en juegos como DKCR:HD, Subnautica Below Zero y Ori 2, pero puede romper la carga o el rendimiento en juegos de Unreal Engine.</string>
<string name="sync_memory_operations">Sincronizar operaciones de memoria</string>
@@ -446,8 +444,6 @@
<string name="display">Pantalla</string>
<string name="processing">Postprocesado</string>
<string name="frame_skipping">WIP: Salto de fotogramas</string>
<string name="frame_skipping_description">Activa o desactiva el salto de fotogramas para mejorar el rendimiento reduciendo el número de fotogramas renderizados. Esta función está en desarrollo y se habilitará en futuras versiones.</string>
<string name="renderer_accuracy">Nivel de precisión</string>
<string name="renderer_resolution">Resolución (Portátil/Sobremesa)</string>
<string name="renderer_vsync">Modo VSync</string>

View File

@@ -65,10 +65,6 @@
<string name="veil_misc">پردازنده و حافظه</string>
<string name="eden_veil">پرده عدن</string>
<string name="eden_veil_description">تنظیمات آزمایشی برای بهبود عملکرد و قابلیت. این تنظیمات ممکن است باعث نمایش صفحه سیاه یا سایر مشکلات بازی شود.</string>
<string name="frame_skipping">در حال توسعه: رد کردن فریم‌ها</string>
<string name="frame_skipping_description">با فعال کردن رد کردن فریم‌ها، عملکرد را با کاهش تعداد فریم‌های رندر شده بهبود دهید. این قابلیت در حال توسعه است و در نسخه‌های آینده فعال خواهد شد.</string>
<string name="frame_interpolation">زمان‌بندی پیشرفته فریم‌ها</string>
<string name="frame_interpolation_description">ارسال یکنواخت و پایدار فریم‌ها را با همگام‌سازی زمان بین آن‌ها تضمین می‌کند، که منجر به کاهش لرزش و انیمیشن‌های ناهموار می‌شود. برای بازی‌هایی که ناپایداری در زمان‌بندی فریم‌ها یا میکرو لرزش در حین بازی دارند ایده‌آل است</string>
<string name="renderer_early_release_fences">رهاسازی حصارها زودتر</string>
<string name="renderer_early_release_fences_description">به رفع مشکل 0 فریم بر ثانیه در بازی‌هایی مانند DKCR:HD، Subnautica Below Zero و Ori 2 کمک می‌کند، اما ممکن است بارگذاری یا عملکرد بازی‌های Unreal Engine را مختل کند.</string>
<string name="sync_memory_operations">همگام‌سازی عملیات حافظه</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">L\'intensité de la passe d\'ombrage d\'échantillon. Des valeurs plus élevées améliorent davantage la qualité mais réduisent aussi plus fortement les performances.</string>
<string name="veil_renderer">Rendu</string>
<string name="frame_interpolation">Synchronisation avancée des frames</string>
<string name="frame_interpolation_description">Assure une diffusion fluide et régulière des frames en synchronisant leur timing, réduisant ainsi les saccades et les animations irrégulières. Idéal pour les jeux souffrant d`instabilité de timing des frames ou de micro-saccades pendant le jeu.</string>
<string name="renderer_early_release_fences">Libérer les barrières plus tôt</string>
<string name="renderer_early_release_fences_description">Résout les problèmes de 0 FPS dans des jeux comme DKCR:HD, Subnautica Below Zero et Ori 2, mais peut perturber le chargement ou les performances des jeux Unreal Engine.</string>
<string name="sync_memory_operations">Synchroniser les opérations mémoire</string>
@@ -447,8 +445,6 @@
<string name="display">Affichage</string>
<string name="processing">Post-traitement</string>
<string name="frame_skipping">WIP: Saut de frames</string>
<string name="frame_skipping_description">Activez ou désactivez le saut d\'images pour améliorer les performances en réduisant le nombre d\'images affichées. Cette fonctionnalité est en cours de développement et sera activée dans les futures versions.</string>
<string name="renderer_accuracy">Niveau de précision</string>
<string name="renderer_resolution">Résolution (Mode Portable/Mode TV)</string>
<string name="renderer_vsync">Mode VSync</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">עוצמת מעבר ההצללה לדוגמה. ערכים גבוהים יותר משפרים את האיכות יותר אך גם מפחיתים את הביצועים במידה רבה יותר.</string>
<string name="veil_renderer">רנדרר</string>
<string name="frame_interpolation">סנכרון פריימים מתקדם</string>
<string name="frame_interpolation_description">מבטיח אספקה חלקה ועקבית של פריימים על ידי סנכרון התזמון ביניהם, מפחית קפיצות ואנימציה לא אחידה. אידיאלי למשחקים עם בעיות בתזמון פריימים או מיקרו-קפיצות במהלך המשחק.</string>
<string name="renderer_early_release_fences">שחרר גדרות מוקדם</string>
<string name="renderer_early_release_fences_description">עוזר לתקן 0 FPS במשחקים כמו DKCR:HD, Subnautica Below Zero ו-Ori 2, אך עלול לפגוע בטעינה או בביצועים במשחקי Unreal Engine.</string>
<string name="sync_memory_operations">סנכרון פעולות זיכרון</string>
@@ -406,8 +404,6 @@
<string name="display">תצוגה</string>
<string name="processing">עיבוד לאחר</string>
<string name="frame_skipping">בעבודה: דילוג פריימים</string>
<string name="frame_skipping_description">החלף דילוג על פריימים כדי לשפר ביצועים על ידי הפחתת מספר הפריימים המוצגים. תכונה זו עדיין בפיתוח ותופעל בגרסאות עתידיות.</string>
<string name="renderer_accuracy">רמת דיוק</string>
<string name="renderer_resolution">רזולוציה (מעוגן/נייד)</string>
<string name="renderer_vsync">מצב VSync</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">A mintavételezés árnyékolási lépés intenzitása. A magasabb értékek jobb minőséget eredményeznek, de nagyobb mértékben csökkentik a teljesítményt.</string>
<string name="veil_renderer">Megjelenítő</string>
<string name="frame_interpolation">Továbbfejlesztett Képkocka-időzítés</string>
<string name="frame_interpolation_description">Biztosítja a képkockák sima és egyenletes kézbesítését azok időzítésének szinkronizálásával, csökkentve a megakadásokat és egyenetlen animációkat. Ideális azokhoz a játékokhoz, amelyek képkocka-időzítési instabilitást vagy mikro-reccsenést tapasztalnak játék közben.</string>
<string name="renderer_early_release_fences">Korai kerítés-felszabadítás</string>
<string name="renderer_early_release_fences_description">Segít javítani a 0 FPS-t olyan játékokban, mint a DKCR:HD, Subnautica Below Zero és az Ori 2, de ronthatja az Unreal Engine játékok betöltését vagy teljesítményét.</string>
<string name="sync_memory_operations">Memória-műveletek szinkronizálása</string>
@@ -401,8 +399,6 @@
<string name="display">Kijelző</string>
<string name="processing">Utófeldolgozás</string>
<string name="frame_skipping">Folyamatban: Képkihagyás</string>
<string name="frame_skipping_description">Kapcsolja be a képkihagyást a teljesítmény javításához a renderelt képkockák számának csökkentésével. Ez a funkció még fejlesztés alatt áll, és a jövőbeli kiadásokban lesz elérhető.</string>
<string name="renderer_accuracy">Pontosság szintje</string>
<string name="renderer_resolution">Felbontás (Kézi/Dockolt)</string>
<string name="renderer_vsync">VSync mód</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">Intensitas proses pencahayaan sampel. Nilai lebih tinggi meningkatkan kualitas lebih baik tetapi juga mengurangi performa lebih besar.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Penyelarasan Frame Tingkat Lanjut</string>
<string name="frame_interpolation_description">Memastikan pengiriman frame yang halus dan konsisten dengan menyinkronkan waktu antar frame, mengurangi stuttering dan animasi tidak rata. Ideal untuk game yang mengalami ketidakstabilan waktu frame atau micro-stutter selama gameplay.</string>
<string name="renderer_early_release_fences">Lepas Pagar Lebih Awal</string>
<string name="renderer_early_release_fences_description">Membantu memperbaiki 0 FPS di game seperti DKCR:HD, Subnautica Below Zero dan Ori 2, tapi mungkin mengganggu loading atau performa di game Unreal Engine.</string>
<string name="sync_memory_operations">Sinkronisasi Operasi Memori</string>
@@ -437,8 +435,6 @@
<string name="display">Tampilan</string>
<string name="processing">Pascaproses</string>
<string name="frame_skipping">WIP: Loncatan Frame</string>
<string name="frame_skipping_description">Aktifkan atau nonaktifkan frame skipping untuk meningkatkan performa dengan mengurangi jumlah frame yang dirender. Fitur ini masih dalam pengembangan dan akan diaktifkan di rilis mendatang.</string>
<string name="renderer_accuracy">Tingkatan Akurasi</string>
<string name="renderer_resolution">Resolusi (Handheld/Docked)</string>
<string name="renderer_vsync">Mode Sinkronisasi Vertikal</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">L\'intensità della passata di ombreggiatura campione. Valori più alti migliorano la qualità ma riducono maggiormente le prestazioni.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Sincronizzazione avanzata fotogrammi</string>
<string name="frame_interpolation_description">Garantisce una consegna fluida e costante dei fotogrammi sincronizzandone i tempi, riducendo scatti e animazioni irregolari. Ideale per giochi che presentano instabilità nei tempi dei fotogrammi o micro-scatti durante il gameplay.</string>
<string name="renderer_early_release_fences">Rilascia le barriere prima</string>
<string name="renderer_early_release_fences_description">Risolve problemi di 0 FPS in giochi come DKCR:HD, Subnautica Below Zero e Ori 2, ma potrebbe compromettere caricamento o prestazioni in giochi Unreal Engine.</string>
<string name="sync_memory_operations">Sincronizza operazioni di memoria</string>
@@ -447,8 +445,6 @@
<string name="display">Schermo</string>
<string name="processing">Post-elaborazione</string>
<string name="frame_skipping">WIP: Salto fotogrammi</string>
<string name="frame_skipping_description">Attiva o disattiva il salto dei fotogrammi per migliorare le prestazioni riducendo il numero di fotogrammi renderizzati. Questa funzionalità è ancora in sviluppo e verrà abilitata nelle versioni future.</string>
<string name="renderer_accuracy">Livello di accuratezza</string>
<string name="renderer_resolution">Risoluzione (Portatile/Docked)</string>
<string name="renderer_vsync">Modalità VSync</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">サンプルシェーディング処理の強度。高い値ほど品質は向上しますが、パフォーマンスも大きく低下します。</string>
<string name="veil_renderer">レンダラー</string>
<string name="frame_interpolation">高度なフレーム同期</string>
<string name="frame_interpolation_description">フレーム間のタイミングを同期させることで、スムーズで一貫したフレーム配信を確保し、カクつきや不均一なアニメーションを軽減します。フレームタイミングの不安定さやマイクロスタッターが発生するゲームに最適です。</string>
<string name="renderer_early_release_fences">フェンスを早期に解放</string>
<string name="renderer_early_release_fences_description">DKCR:HD、Subnautica Below Zero、Ori 2などのゲームで0 FPSを修正しますが、Unreal Engineゲームの読み込みやパフォーマンスに影響する可能性があります。</string>
<string name="sync_memory_operations">メモリ操作の同期</string>
@@ -401,8 +399,6 @@
<string name="display">ディスプレイ</string>
<string name="processing">後処理</string>
<string name="frame_skipping">WIP: フレームスキップ</string>
<string name="frame_skipping_description">フレームスキップを切り替えて、レンダリングされるフレーム数を減らしパフォーマンスを向上させます。この機能は開発中であり、今後のリリースで有効になります。</string>
<string name="renderer_accuracy">精度</string>
<string name="renderer_resolution">解像度(携帯モード/TVモード</string>
<string name="renderer_vsync">垂直同期モード</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">샘플 쉐이딩 패스의 강도. 값이 높을수록 품질이 더 향상되지만 성능도 더 크게 저하됩니다.</string>
<string name="veil_renderer">렌더러</string>
<string name="frame_interpolation">향상된 프레임 페이싱</string>
<string name="frame_interpolation_description">프레임 간 타이밍을 동기화하여 부드럽고 일관된 프레임 전달을 보장하며, 끊김과 불균일한 애니메이션을 줄입니다. 프레임 타이밍 불안정이나 게임 플레이 중 미세 끊김이 발생하는 게임에 이상적입니다.</string>
<string name="renderer_early_release_fences">펜스 조기 해제</string>
<string name="renderer_early_release_fences_description">DKCR:HD, Subnautica Below Zero, Ori 2 등의 게임에서 0 FPS 현상을 해결하지만, Unreal Engine 게임의 로딩이나 성능에 문제를 일으킬 수 있습니다.</string>
<string name="sync_memory_operations">메모리 작업 동기화</string>
@@ -401,8 +399,6 @@
<string name="display">디스플레이</string>
<string name="processing">후처리</string>
<string name="frame_skipping">작업 중: 프레임 스킵</string>
<string name="frame_skipping_description">렌더링되는 프레임 수를 줄여 성능을 향상시키기 위해 프레임 스킵을 전환합니다. 이 기능은 현재 개발 중이며 향후 출시 버전에서 활성화될 예정입니다.</string>
<string name="renderer_accuracy">정확도 수준</string>
<string name="renderer_resolution">해상도 (휴대 모드/독 모드)</string>
<string name="renderer_vsync">수직동기화 모드</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">Intensiteten til prøveskyggepasseringen. Høyere verdier forbedrer kvaliteten mer, men reduserer også ytelsen i større grad.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Avansert bildevindu-synkronisering</string>
<string name="frame_interpolation_description">Sikrer jevn og konsekvent bildelevering ved å synkronisere tiden mellom bilder, noe som reduserer hakking og ujevn animasjon. Ideelt for spill som opplever ustabil bildetid eller mikro-hakk under spilling.</string>
<string name="renderer_early_release_fences">Frigjør gjerder tidlig</string>
<string name="renderer_early_release_fences_description">Løser 0 FPS i spill som DKCR:HD, Subnautica Below Zero og Ori 2, men kan forårsake problemer med lasting eller ytelse i Unreal Engine-spill.</string>
<string name="sync_memory_operations">Synkroniser minneoperasjoner</string>
@@ -382,8 +380,6 @@
<string name="display">Skjerm</string>
<string name="processing">Etterbehandling</string>
<string name="frame_skipping">WIP: Hoppe over bilder</string>
<string name="frame_skipping_description">Slå av/på frame skipping for å forbedre ytelsen ved å redusere antall renderte bilder. Denne funksjonen er fortsatt under utvikling og vil bli aktivert i fremtidige versjoner.</string>
<string name="renderer_accuracy">Nøyaktighetsnivå</string>
<string name="renderer_resolution">Oppløsning (håndholdt/dokket)</string>
<string name="renderer_vsync">VSync-modus</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">Intensywność przebiegu cieniowania próbki. Wyższe wartości poprawiają jakość, ale także w większym stopniu zmniejszają wydajność.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Zaawansowana synchronizacja klatek</string>
<string name="frame_interpolation_description">Zapewnia płynne i spójne wyświetlanie klatek poprzez synchronizację ich czasu, redukując zacinanie i nierówną animację. Idealne dla gier z niestabilnym czasem klatek lub mikro-zacinaniem podczas rozgrywki.</string>
<string name="renderer_early_release_fences">Wcześniejsze zwalnianie zabezpieczeń</string>
<string name="renderer_early_release_fences_description">Pomaga naprawić 0 FPS w grach takich jak DKCR:HD, Subnautica Below Zero i Ori 2, ale może zaburzyć ładowanie lub wydajność w grach Unreal Engine.</string>
<string name="sync_memory_operations">Synchronizuj operacje pamięci</string>
@@ -468,8 +466,6 @@
<string name="display">Wyświetlacz</string>
<string name="processing">Postprocessing</string>
<string name="frame_skipping">WIP: Pomijanie klatek</string>
<string name="frame_skipping_description">Włącz lub wyłącz pomijanie klatek, aby poprawić wydajność poprzez zmniejszenie liczby renderowanych klatek. Ta funkcja jest wciąż w fazie rozwoju i zostanie włączona w przyszłych wersjach.</string>
<string name="renderer_accuracy">Poziom precyzji emulacji</string>
<string name="renderer_resolution">Rozdzielczość (Handheld/Zadokowany)</string>
<string name="renderer_vsync">Synchronizacja pionowa VSync</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">Fração de Sombreamento de Amostra: Define a intensidade do sample shading. Quanto maior, melhor a qualidade, mas maior o impacto no desempenho.</string>
<string name="veil_renderer">Renderizador</string>
<string name="frame_interpolation">Enhanced Frame Pacing</string>
<string name="frame_interpolation_description">Sincronização Melhorada de Quadros: Sincroniza o tempo entre os quadros para uma entrega mais uniforme, reduzindo travamentos e animações irregulares. Útil em jogos que sofrem com microtravamentos ou instabilidade na taxa de frames.</string>
<string name="renderer_early_release_fences">Release Fences Early</string>
<string name="renderer_early_release_fences_description">Liberar Cercas Antecipadamente: Ajuda a corrigir 0 FPS em jogos como DKCR:HD, Subnautica Below Zero e Ori 2, mas pode prejudicar o carregamento ou o desempenho em jogos feitos com Unreal Engine.</string>
<string name="sync_memory_operations">Sincronizar Operações de Memória</string>
@@ -446,8 +444,6 @@
<string name="display">Tela</string>
<string name="processing">Pós-Processamento</string>
<string name="frame_skipping">WIP: Pular quadros</string>
<string name="frame_skipping_description">Ative ou desative o pulo de quadros para melhorar o desempenho reduzindo o número de quadros renderizados. Este recurso ainda está em desenvolvimento e será habilitado em versões futuras.</string>
<string name="renderer_accuracy">Nível de precisão</string>
<string name="renderer_resolution">Resolução (Portátil/Modo TV)</string>
<string name="renderer_vsync">Modo de VSync</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">A intensidade da passagem de sombreamento de amostra. Valores mais elevados melhoram a qualidade, mas também reduzem o desempenho numa maior medida.</string>
<string name="veil_renderer">Renderizador</string>
<string name="frame_interpolation">Sincronização avançada de frames</string>
<string name="frame_interpolation_description">Garante uma entrega suave e consistente de frames sincronizando o seu tempo, reduzindo engasgadelas e animações irregulares. Ideal para jogos que experienciam instabilidade no tempo de frames ou micro-engasgadelas durante o jogo.</string>
<string name="renderer_early_release_fences">Libertar barreiras antecipadamente</string>
<string name="renderer_early_release_fences_description">Ajuda a corrigir 0 FPS em jogos como DKCR:HD, Subnautica Below Zero e Ori 2, mas pode afetar carregamento ou desempenho em jogos Unreal Engine.</string>
<string name="sync_memory_operations">Sincronizar Operações de Memória</string>
@@ -405,8 +403,6 @@
<string name="display">Ecrã</string>
<string name="processing">Pós-processamento</string>
<string name="frame_skipping">WIP: Saltar frames</string>
<string name="frame_skipping_description">Ative ou desative o salto de frames para melhorar o desempenho reduzindo o número de frames renderizados. Esta funcionalidade ainda está em desenvolvimento e será ativada em versões futuras.</string>
<string name="renderer_accuracy">Nível de precisão</string>
<string name="renderer_resolution">Resolução (Portátil/Ancorado)</string>
<string name="renderer_vsync">Modo VSync</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">Интенсивность прохода сэмплового затенения. Более высокие значения улучшают качество, но и сильнее снижают производительность.</string>
<string name="veil_renderer">Рендеринг</string>
<string name="frame_interpolation">Улучшенная синхронизация кадров</string>
<string name="frame_interpolation_description">Обеспечивает плавную и стабильную подачу кадров за счет синхронизации их времени, уменьшая подтормаживания и неравномерную анимацию. Идеально для игр с нестабильным временем кадров или микро-подтормаживаниями во время игры.</string>
<string name="renderer_early_release_fences">Ранний релиз ограждений</string>
<string name="renderer_early_release_fences_description">Помогает исправить 0 FPS в играх типа DKCR:HD, Subnautica Below Zero и Ori 2, но может нарушить загрузку или производительность в играх на Unreal Engine.</string>
<string name="sync_memory_operations">Синхронизация операций с памятью</string>
@@ -466,8 +464,6 @@
<string name="display">Дисплей</string>
<string name="processing">Постобработка</string>
<string name="frame_skipping">В разработке: Пропуск кадров</string>
<string name="frame_skipping_description">Включите или отключите пропуск кадров для повышения производительности за счет уменьшения количества отображаемых кадров. Эта функция находится в разработке и будет включена в будущих версиях.</string>
<string name="renderer_accuracy">Уровень точности</string>
<string name="renderer_resolution">Разрешение (портативное/в док-станции)</string>
<string name="renderer_vsync">Режим верт. синхронизации</string>

View File

@@ -75,8 +75,6 @@
<string name="sample_shading_fraction_description">Интензитет проласка сенчења узорка. Веће вредности побољшавају квалитет више, али такође више смањују перформансе.</string>
<string name="veil_renderer">Рендерер</string>
<string name="frame_interpolation">Побољшани оквирни пејсинг</string>
<string name="frame_interpolation_description">Осигурава глатку и доследан испоруку оквира синхронизацијом времена између оквира, смањење муцања и неуједначене анимације. Идеално за игре које доживљавају временски оквир нестабилност или микро-штитнике током играња.</string>
<string name="renderer_early_release_fences">Ranije oslobađanje ograda</string>
<string name="renderer_early_release_fences_description">Pomaže u popravci 0 FPS u igrama kao što su DKCR:HD, Subnautica Below Zero i Ori 2, ali može oštetiti učitavanje ili performanse u Unreal Engine igrama.</string>
<string name="sync_memory_operations">Синхронизација меморијских операција</string>
@@ -405,8 +403,6 @@
<string name="display">Приказ</string>
<string name="processing">Постпроцесирање</string>
<string name="frame_skipping">ВИП: Фрамескип</string>
<string name="frame_skipping_description">Пребацивање оквира прескакање да бисте побољшали перформансе смањењем броја пружених оквира. Ова функција се и даље ради и биће омогућена у будућим издањима.</string>
<string name="renderer_accuracy">Ниво тачности</string>
<string name="renderer_resolution">Резолуција (ручно / прикључено)</string>
<string name="renderer_vsync">Всинц мод</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">Інтенсивність проходу затінення зразка. Вищі значення покращують якість, але й сильніше знижують продуктивність.</string>
<string name="veil_renderer">Візуалізатор</string>
<string name="frame_interpolation">Покращена синхронізація кадрів</string>
<string name="frame_interpolation_description">Забезпечує плавну та стабільну подачу кадрів шляхом синхронізації їх часу, зменшуючи підвисання та нерівномірну анімацію. Ідеально для ігор з нестабільним часом кадрів або мікро-підвисаннями під час гри.</string>
<string name="renderer_early_release_fences">Release fences early</string>
<string name="renderer_early_release_fences_description">Це налаштування може бути необхідним для виправлення помилок 0FPS у деяких іграх (зокрема DKCR:HD, Subnautica та Ori 2). Водночас інші ігри, особливо створені на рушії Unreal Engine, можуть працювати некоректно або взагалі не запускатися.</string>
<string name="sync_memory_operations">Синхронізація операцій з пам\'яттю</string>
@@ -468,8 +466,6 @@
<string name="display">Дисплей</string>
<string name="processing">Постобробка</string>
<string name="frame_skipping">В розробці: Пропуск кадрів</string>
<string name="frame_skipping_description">Увімкніть або вимкніть пропуск кадрів для покращення продуктивності за рахунок зменшення кількості візуалізованих кадрів. Ця функція ще розробляється та буде доступна у майбутніх версіях.</string>
<string name="renderer_accuracy">Рівень точності</string>
<string name="renderer_resolution">Роздільна здатність (Портативний/Док)</string>
<string name="renderer_vsync">Режим верт. синхронізації</string>

View File

@@ -76,8 +76,6 @@
<string name="sample_shading_fraction_description">Cường độ của bước tô bóng mẫu. Giá trị cao hơn cải thiện chất lượng tốt hơn nhưng cũng giảm hiệu suất nhiều hơn.</string>
<string name="veil_renderer">Trình kết xuất</string>
<string name="frame_interpolation">Đồng bộ khung hình nâng cao</string>
<string name="frame_interpolation_description">Đảm bảo cung cấp khung hình mượt mà và ổn định bằng cách đồng bộ hóa thời gian giữa các khung hình, giảm giật lag và hoạt ảnh không đồng đều. Lý tưởng cho các trò chơi gặp vấn đề về thời gian khung hình không ổn định hoặc giật lag nhẹ trong khi chơi.</string>
<string name="renderer_early_release_fences">Giải phóng rào chắn sớm</string>
<string name="renderer_early_release_fences_description">Giúp sửa lỗi 0 FPS trong các trò chơi như DKCR:HD, Subnautica Below Zero và Ori 2, nhưng có thể ảnh hưởng đến tải hoặc hiệu suất trong trò chơi Unreal Engine.</string>
<string name="sync_memory_operations">Đồng bộ hoá thao tác bộ nhớ</string>
@@ -380,8 +378,6 @@
<string name="display">Hiển thị</string>
<string name="processing">Hậu xử lý</string>
<string name="frame_skipping">WIP: Bỏ qua khung hình</string>
<string name="frame_skipping_description">Bật hoặc tắt bỏ qua khung hình để cải thiện hiệu suất bằng cách giảm số lượng khung hình được kết xuất. Tính năng này đang được phát triển và sẽ được kích hoạt trong các bản phát hành tương lai.</string>
<string name="renderer_accuracy">Mức độ chính xác</string>
<string name="renderer_resolution">Độ phân giải (Handheld/Docked)</string>
<string name="renderer_vsync">Chế độ VSync</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">采样着色处理的强度。值越高,质量改善越多,但性能降低也越明显。</string>
<string name="veil_renderer">渲染器</string>
<string name="frame_interpolation">增强帧同步</string>
<string name="frame_interpolation_description">通过同步帧间时间确保流畅一致的帧交付,减少卡顿和不均匀动画。适合存在帧时间不稳定或游戏过程中出现微卡顿的游戏。</string>
<string name="renderer_early_release_fences">提前释放围栏</string>
<string name="renderer_early_release_fences_description">可修复《大金刚国度:热带寒流》《深海迷航:零度之下》和《奥日2》等游戏中的0 FPS问题但可能影响Unreal Engine游戏的加载或性能。</string>
<string name="sync_memory_operations">同步内存操作</string>
@@ -443,8 +441,6 @@
<string name="display">显示</string>
<string name="processing">后处理</string>
<string name="frame_skipping">开发中:跳帧</string>
<string name="frame_skipping_description">启用或禁用跳帧以减少渲染帧数,提高性能。此功能仍在开发中,将在未来版本中启用。</string>
<string name="renderer_accuracy">精度等级</string>
<string name="renderer_resolution">分辨率 (掌机模式/主机模式)</string>
<string name="renderer_vsync">垂直同步模式</string>

View File

@@ -98,8 +98,6 @@
<string name="sample_shading_fraction_description">採樣著色處理的強度。數值越高,品質改善越多,但效能降低也越明顯。</string>
<string name="veil_renderer">渲染器</string>
<string name="frame_interpolation">增強幀同步</string>
<string name="frame_interpolation_description">通過同步幀間時間確保幀傳輸流暢一致,減少卡頓和不均勻動畫。適合存在幀時間不穩定或遊戲過程中出現些微卡頓的遊戲。</string>
<string name="renderer_early_release_fences">提前釋放圍欄</string>
<string name="renderer_early_release_fences_description">可修復《咚奇剛歸來HD》、《深海迷航冰點之下》和《聖靈之光2》等遊戲中的0 FPS問題但可能影響Unreal Engine遊戲的載入或效能。</string>
<string name="sync_memory_operations">同步記憶體操作</string>
@@ -443,8 +441,6 @@
<string name="display">顯示</string>
<string name="processing">後處理</string>
<string name="frame_skipping">開發中:跳幀</string>
<string name="frame_skipping_description">啟用或停用跳幀以減少渲染幀數,提高效能。此功能仍在開發中,將在未來版本中啟用。</string>
<string name="renderer_accuracy">準確度層級</string>
<string name="renderer_resolution">解析度 (手提/底座)</string>
<string name="renderer_vsync">垂直同步</string>

View File

@@ -105,8 +105,6 @@
<string name="sample_shading_fraction_description">The intensity of the sample shading pass. Higher values improve quality more but also reduce performance to a greater extent.</string>
<string name="veil_renderer">Renderer</string>
<string name="frame_interpolation">Enhanced Frame Pacing</string>
<string name="frame_interpolation_description">Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay.</string>
<string name="renderer_early_release_fences">Release Fences Early</string>
<string name="renderer_early_release_fences_description">Helps fix 0 FPS in games like DKCR:HD, Subnautica Below Zero and Ori 2, but may break loading or performance in Unreal Engine games.</string>
<string name="sync_memory_operations">Sync Memory Operations</string>
@@ -489,8 +487,6 @@
<string name="display">Display</string>
<string name="processing">Post-Processing</string>
<string name="frame_skipping">WIP: Frameskip</string>
<string name="frame_skipping_description">Toggle frame skipping to improve performance by reducing the number of rendered frames. This feature is still being worked on and will be enabled in future releases.</string>
<string name="renderer_accuracy">Accuracy level</string>
<string name="renderer_resolution">Resolution (Handheld/Docked)</string>
<string name="renderer_vsync">VSync mode</string>

View File

@@ -181,12 +181,6 @@ if(ANDROID)
android/applets/software_keyboard.h)
endif()
if(LINUX AND NOT APPLE)
target_sources(common PRIVATE linux/gamemode.cpp linux/gamemode.h)
target_link_libraries(common PRIVATE gamemode::headers)
endif()
if(ARCHITECTURE_x86_64)
target_sources(
common

View File

@@ -1,40 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <gamemode_client.h>
#include "common/linux/gamemode.h"
#include "common/logging/log.h"
#include "common/settings.h"
namespace Common::Linux {
void StartGamemode() {
if (Settings::values.enable_gamemode) {
if (gamemode_request_start() < 0) {
LOG_WARNING(Frontend, "Failed to start gamemode: {}", gamemode_error_string());
} else {
LOG_INFO(Frontend, "Started gamemode");
}
}
}
void StopGamemode() {
if (Settings::values.enable_gamemode) {
if (gamemode_request_end() < 0) {
LOG_WARNING(Frontend, "Failed to stop gamemode: {}", gamemode_error_string());
} else {
LOG_INFO(Frontend, "Stopped gamemode");
}
}
}
void SetGamemodeState(bool state) {
if (state) {
StartGamemode();
} else {
StopGamemode();
}
}
} // namespace Common::Linux

View File

@@ -1,24 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
namespace Common::Linux {
/**
* Start the (Feral Interactive) Linux gamemode if it is installed and it is activated
*/
void StartGamemode();
/**
* Stop the (Feral Interactive) Linux gamemode if it is installed and it is activated
*/
void StopGamemode();
/**
* Start or stop the (Feral Interactive) Linux gamemode if it is installed and it is activated
* @param state The new state the gamemode should have
*/
void SetGamemodeState(bool state);
} // namespace Common::Linux

View File

@@ -271,8 +271,6 @@ const char* TranslateCategory(Category category) {
return "Services";
case Category::Paths:
return "Paths";
case Category::Linux:
return "Linux";
case Category::MaxEnum:
break;
}

View File

@@ -333,12 +333,7 @@ struct Values {
"shader_backend", Category::Renderer, Specialization::RuntimeList};
SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer,
Specialization::RuntimeList};
#ifdef __ANDROID__
SwitchableSetting<bool> frame_interpolation{linkage, true, "frame_interpolation", Category::Renderer,
Specialization::RuntimeList};
SwitchableSetting<bool> frame_skipping{linkage, false, "frame_skipping", Category::Renderer,
Specialization::RuntimeList};
#endif
SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache",
Category::Renderer};
SwitchableSetting<SpirvOptimizeMode, true> optimize_spirv_output{linkage,
@@ -621,13 +616,6 @@ struct Values {
true,
true};
// Linux
SwitchableSetting<bool> enable_gamemode{linkage, true, "enable_gamemode", Category::Linux};
#ifdef __unix__
SwitchableSetting<bool> gui_force_x11{linkage, false, "gui_force_x11", Category::Linux};
Setting<bool> gui_hide_backend_warning{linkage, false, "gui_hide_backend_warning", Category::Linux};
#endif
// Controls
InputSetting<std::array<PlayerInput, 10>> players;

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -44,7 +47,6 @@ enum class Category : u32 {
Multiplayer,
Services,
Paths,
Linux,
LibraryApplet,
MaxEnum,
};

View File

@@ -308,16 +308,6 @@ void Config::ReadDebuggingValues() {
EndGroup();
}
#ifdef __unix__
void Config::ReadLinuxValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Linux));
ReadCategory(Settings::Category::Linux);
EndGroup();
}
#endif
void Config::ReadServiceValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Services));
@@ -434,9 +424,6 @@ void Config::ReadValues() {
ReadControlValues();
ReadCoreValues();
ReadCpuValues();
#ifdef __unix__
ReadLinuxValues();
#endif
ReadRendererValues();
ReadAudioValues();
ReadSystemValues();
@@ -537,9 +524,6 @@ void Config::SaveValues() {
SaveControlValues();
SaveCoreValues();
SaveCpuValues();
#ifdef __unix__
SaveLinuxValues();
#endif
SaveRendererValues();
SaveAudioValues();
SaveSystemValues();
@@ -616,16 +600,6 @@ void Config::SaveDebuggingValues() {
EndGroup();
}
#ifdef __unix__
void Config::SaveLinuxValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Linux));
WriteCategory(Settings::Category::Linux);
EndGroup();
}
#endif
void Config::SaveNetworkValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Services));

View File

@@ -84,9 +84,6 @@ protected:
void ReadCoreValues();
void ReadDataStorageValues();
void ReadDebuggingValues();
#ifdef __unix__
void ReadLinuxValues();
#endif
void ReadServiceValues();
void ReadDisabledAddOnValues();
void ReadMiscellaneousValues();
@@ -119,9 +116,6 @@ protected:
void SaveCoreValues();
void SaveDataStorageValues();
void SaveDebuggingValues();
#ifdef __unix__
void SaveLinuxValues();
#endif
void SaveNetworkValues();
void SaveDisabledAddOnValues();
void SaveMiscellaneousValues();

View File

@@ -49,16 +49,13 @@ u64 ClearDir(DataDir dir, const std::string &user_id)
return result;
}
const std::string ReadableBytesSize(u64 size)
{
static constexpr std::array units{"B", "KiB", "MiB", "GiB", "TiB", "PiB"};
if (size == 0) {
std::string ReadableBytesSize(u64 size) noexcept {
std::array<std::string_view, 6> const units{"B", "KB", "MB", "GB", "TB", "PB"};
u64 const base = 1000;
if (size == 0)
return "0 B";
}
const int digit_groups = (std::min) (static_cast<int>(std::log10(size) / std::log10(1024)),
static_cast<int>(units.size()));
return fmt::format("{:.1f} {}", size / std::pow(1024, digit_groups), units[digit_groups]);
auto const digit_groups = std::min<u64>(u64(std::log10(size) / std::log10(base)), u64(units.size()));
return fmt::format("{:.1f} {}", size / std::pow(base, digit_groups), units[digit_groups]);
}
u64 DataDirSize(DataDir dir)

View File

@@ -16,8 +16,7 @@ const std::filesystem::path GetDataDir(DataDir dir, const std::string &user_id =
const std::string GetDataDirString(DataDir dir, const std::string &user_id = "");
u64 ClearDir(DataDir dir, const std::string &user_id = "");
const std::string ReadableBytesSize(u64 size);
std::string ReadableBytesSize(u64 size) noexcept;
u64 DataDirSize(DataDir dir);

View File

@@ -5,6 +5,9 @@ add_library(qt_common STATIC
qt_common.h
qt_common.cpp
gamemode.cpp
gamemode.h
config/uisettings.cpp
config/uisettings.h
config/qt_config.cpp
@@ -82,6 +85,7 @@ find_package(frozen)
target_link_libraries(qt_common PRIVATE core Qt6::Core Qt6::Concurrent SimpleIni::SimpleIni QuaZip::QuaZip)
target_link_libraries(qt_common PUBLIC frozen::frozen-headers)
target_link_libraries(qt_common PRIVATE gamemode::headers)
if (NOT APPLE AND ENABLE_OPENGL)
target_compile_definitions(qt_common PUBLIC HAS_OPENGL)

View File

@@ -433,10 +433,10 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
tr("Whether or not to check for updates upon startup."));
// Linux
INSERT(Settings, enable_gamemode, tr("Enable Gamemode"), QString());
INSERT(UISettings, enable_gamemode, tr("Enable Gamemode"), QString());
#ifdef __unix__
INSERT(Settings, gui_force_x11, tr("Force X11 as Graphics Backend"), QString());
INSERT(Settings, gui_hide_backend_warning, QString(), QString());
INSERT(UISettings, gui_force_x11, tr("Force X11 as Graphics Backend"), QString());
INSERT(UISettings, gui_hide_backend_warning, QString(), QString());
#endif
// Ui Debugging

View File

@@ -142,6 +142,19 @@ struct Values {
Setting<bool> check_for_updates{linkage, true, "check_for_updates", Category::UiGeneral};
// Linux/MinGW may support (requires libdl support)
SwitchableSetting<bool> enable_gamemode{linkage,
#ifndef _MSC_VER
true,
#else
false,
#endif
"enable_gamemode", Category::UiGeneral};
#ifdef __unix__
SwitchableSetting<bool> gui_force_x11{linkage, false, "gui_force_x11", Category::UiGeneral};
Setting<bool> gui_hide_backend_warning{linkage, false, "gui_hide_backend_warning", Category::UiGeneral};
#endif
// Discord RPC
Setting<bool> enable_discord_presence{linkage, false, "enable_discord_presence", Category::Ui};

View File

@@ -0,0 +1,52 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// While technically available on al *NIX platforms, Linux is only available
// as the primary target of libgamemode.so - so warnings are suppressed
#ifdef __unix__
#include <gamemode_client.h>
#endif
#include "qt_common/gamemode.h"
#include "common/logging/log.h"
#include "qt_common/config/uisettings.h"
namespace Common::FeralGamemode {
/// @brief Start the gamemode client
void Start() noexcept {
if (UISettings::values.enable_gamemode) {
#ifdef __unix__
if (gamemode_request_start() < 0) {
#ifdef __linux__
LOG_WARNING(Frontend, "{}", gamemode_error_string());
#else
LOG_INFO(Frontend, "{}", gamemode_error_string());
#endif
} else {
LOG_INFO(Frontend, "Done");
}
#endif
}
}
/// @brief Stop the gmemode client
void Stop() noexcept {
if (UISettings::values.enable_gamemode) {
#ifdef __unix__
if (gamemode_request_end() < 0) {
#ifdef __linux__
LOG_WARNING(Frontend, "{}", gamemode_error_string());
#else
LOG_INFO(Frontend, "{}", gamemode_error_string());
#endif
} else {
LOG_INFO(Frontend, "Done");
}
#endif
}
}
} // namespace Common::Linux

14
src/qt_common/gamemode.h Normal file
View File

@@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
namespace Common::FeralGamemode {
void Start() noexcept;
void Stop() noexcept;
} // namespace Common::FeralGamemode

View File

@@ -180,145 +180,7 @@ RendererVulkan::~RendererVulkan() {
void(device.GetLogical().WaitIdle());
}
#ifdef __ANDROID__
class BooleanSetting {
public:
// static BooleanSetting FRAME_SKIPPING;
static BooleanSetting FRAME_INTERPOLATION;
explicit BooleanSetting(bool initial_value = false) : value(initial_value) {}
[[nodiscard]] bool getBoolean() const {
return value;
}
void setBoolean(bool new_value) {
value = new_value;
}
private:
bool value;
};
// Initialize static members
// BooleanSetting BooleanSetting::FRAME_SKIPPING(false);
BooleanSetting BooleanSetting::FRAME_INTERPOLATION(false);
// extern "C" JNIEXPORT jboolean JNICALL
// Java_org_yuzu_yuzu_1emu_features_settings_model_BooleanSetting_isFrameSkippingEnabled(JNIEnv* env, jobject /* this */) {
// return static_cast<jboolean>(BooleanSetting::FRAME_SKIPPING.getBoolean());
// }
extern "C" JNIEXPORT jboolean JNICALL
Java_org_yuzu_yuzu_1emu_features_settings_model_BooleanSetting_isFrameInterpolationEnabled(JNIEnv* env, jobject /* this */) {
return static_cast<jboolean>(BooleanSetting::FRAME_INTERPOLATION.getBoolean());
}
void RendererVulkan::InterpolateFrames(Frame* prev_frame, Frame* interpolated_frame) {
if (!prev_frame || !interpolated_frame || !prev_frame->image || !interpolated_frame->image) {
return;
}
const auto& framebuffer_layout = render_window.GetFramebufferLayout();
// Fixed aggressive downscale (50%)
VkExtent2D dst_extent{
.width = framebuffer_layout.width / 2,
.height = framebuffer_layout.height / 2
};
// Check if we need to recreate the destination frame
bool needs_recreation = false; // Only recreate when necessary
if (!interpolated_frame->image_view) {
needs_recreation = true; // Need to create initially
} else {
// Check if dimensions have changed
if (interpolated_frame->framebuffer) {
needs_recreation = (framebuffer_layout.width / 2 != dst_extent.width) ||
(framebuffer_layout.height / 2 != dst_extent.height);
} else {
needs_recreation = true;
}
}
if (needs_recreation) {
interpolated_frame->image = CreateWrappedImage(memory_allocator, dst_extent, swapchain.GetImageViewFormat());
interpolated_frame->image_view = CreateWrappedImageView(device, interpolated_frame->image, swapchain.GetImageViewFormat());
interpolated_frame->framebuffer = blit_swapchain.CreateFramebuffer(
Layout::FramebufferLayout{dst_extent.width, dst_extent.height},
*interpolated_frame->image_view,
swapchain.GetImageViewFormat());
}
scheduler.RequestOutsideRenderPassOperationContext();
scheduler.Record([&](vk::CommandBuffer cmdbuf) {
// Transition images to transfer layouts
TransitionImageLayout(cmdbuf, *prev_frame->image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
TransitionImageLayout(cmdbuf, *interpolated_frame->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
// Perform the downscale blit
VkImageBlit blit_region{};
blit_region.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
blit_region.srcOffsets[0] = {0, 0, 0};
blit_region.srcOffsets[1] = {
static_cast<int32_t>(framebuffer_layout.width),
static_cast<int32_t>(framebuffer_layout.height),
1
};
blit_region.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
blit_region.dstOffsets[0] = {0, 0, 0};
blit_region.dstOffsets[1] = {
static_cast<int32_t>(dst_extent.width),
static_cast<int32_t>(dst_extent.height),
1
};
// Using the wrapper's BlitImage with proper parameters
cmdbuf.BlitImage(
*prev_frame->image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
*interpolated_frame->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
blit_region, VK_FILTER_NEAREST
);
// Transition back to general layout
TransitionImageLayout(cmdbuf, *prev_frame->image, VK_IMAGE_LAYOUT_GENERAL);
TransitionImageLayout(cmdbuf, *interpolated_frame->image, VK_IMAGE_LAYOUT_GENERAL);
});
}
#endif
void RendererVulkan::Composite(std::span<const Tegra::FramebufferConfig> framebuffers) {
#ifdef __ANDROID__
static int frame_counter = 0;
static int target_fps = 60; // Target FPS (30 or 60)
int frame_skip_threshold = 1;
bool frame_skipping = false; //BooleanSetting::FRAME_SKIPPING.getBoolean();
bool frame_interpolation = BooleanSetting::FRAME_INTERPOLATION.getBoolean();
#endif
if (framebuffers.empty()) {
return;
}
#ifdef __ANDROID__
if (frame_skipping) {
frame_skip_threshold = (target_fps == 30) ? 2 : 2;
}
frame_counter++;
if (frame_counter % frame_skip_threshold != 0) {
if (frame_interpolation && previous_frame) {
Frame* interpolated_frame = present_manager.GetRenderFrame();
InterpolateFrames(previous_frame, interpolated_frame);
blit_swapchain.DrawToFrame(rasterizer, interpolated_frame, framebuffers,
render_window.GetFramebufferLayout(), swapchain.GetImageCount(),
swapchain.GetImageViewFormat());
scheduler.Flush(*interpolated_frame->render_ready);
present_manager.Present(interpolated_frame);
}
return;
}
#endif
SCOPE_EXIT {
render_window.OnFrameDisplayed();
};

View File

@@ -104,9 +104,6 @@ add_executable(yuzu
configuration/configure_input_profile_dialog.cpp
configuration/configure_input_profile_dialog.h
configuration/configure_input_profile_dialog.ui
configuration/configure_linux_tab.cpp
configuration/configure_linux_tab.h
configuration/configure_linux_tab.ui
configuration/configure_mouse_panning.cpp
configuration/configure_mouse_panning.h
configuration/configure_mouse_panning.ui

View File

@@ -40,8 +40,6 @@ void ConfigureGeneral::SetConfiguration() {}
void ConfigureGeneral::Setup(const ConfigurationShared::Builder& builder) {
QLayout& general_layout = *ui->general_widget->layout();
QLayout& linux_layout = *ui->linux_widget->layout();
std::map<u32, QWidget*> general_hold{};
std::map<u32, QWidget*> linux_hold{};
@@ -54,13 +52,6 @@ void ConfigureGeneral::Setup(const ConfigurationShared::Builder& builder) {
};
push(UISettings::values.linkage.by_category[Settings::Category::UiGeneral]);
push(Settings::values.linkage.by_category[Settings::Category::Linux]);
// Only show Linux group on Unix
#ifndef __unix__
ui->LinuxGroupBox->setVisible(false);
#endif
for (const auto setting : settings) {
auto* widget = builder.BuildWidget(setting, apply_funcs);
@@ -76,9 +67,6 @@ void ConfigureGeneral::Setup(const ConfigurationShared::Builder& builder) {
case Settings::Category::UiGeneral:
general_hold.emplace(setting->Id(), widget);
break;
case Settings::Category::Linux:
linux_hold.emplace(setting->Id(), widget);
break;
default:
widget->deleteLater();
}
@@ -87,9 +75,6 @@ void ConfigureGeneral::Setup(const ConfigurationShared::Builder& builder) {
for (const auto& [id, widget] : general_hold) {
general_layout.addWidget(widget);
}
for (const auto& [id, widget] : linux_hold) {
linux_layout.addWidget(widget);
}
}
// Called to set the callback when resetting settings to defaults

View File

@@ -46,33 +46,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="LinuxGroupBox">
<property name="title">
<string>Linux</string>
</property>
<layout class="QVBoxLayout" name="LinuxVerticalLayout_1">
<item>
<widget class="QWidget" name="linux_widget" native="true">
<layout class="QVBoxLayout" name="LinuxVerticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">

View File

@@ -1,75 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/settings.h"
#include "core/core.h"
#include "ui_configure_linux_tab.h"
#include "yuzu/configuration/configuration_shared.h"
#include "yuzu/configuration/configure_linux_tab.h"
#include "yuzu/configuration/shared_widget.h"
ConfigureLinuxTab::ConfigureLinuxTab(const Core::System& system_,
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
const ConfigurationShared::Builder& builder, QWidget* parent)
: Tab(group_, parent), ui(std::make_unique<Ui::ConfigureLinuxTab>()), system{system_} {
ui->setupUi(this);
Setup(builder);
SetConfiguration();
}
ConfigureLinuxTab::~ConfigureLinuxTab() = default;
void ConfigureLinuxTab::SetConfiguration() {}
void ConfigureLinuxTab::Setup(const ConfigurationShared::Builder& builder) {
QLayout& linux_layout = *ui->linux_widget->layout();
std::map<u32, QWidget*> linux_hold{};
std::vector<Settings::BasicSetting*> settings;
const auto push = [&](Settings::Category category) {
for (const auto setting : Settings::values.linkage.by_category[category]) {
settings.push_back(setting);
}
};
push(Settings::Category::Linux);
for (auto* setting : settings) {
auto* widget = builder.BuildWidget(setting, apply_funcs);
if (widget == nullptr) {
continue;
}
if (!widget->Valid()) {
widget->deleteLater();
continue;
}
linux_hold.insert({setting->Id(), widget});
}
for (const auto& [id, widget] : linux_hold) {
linux_layout.addWidget(widget);
}
}
void ConfigureLinuxTab::ApplyConfiguration() {
const bool is_powered_on = system.IsPoweredOn();
for (const auto& apply_func : apply_funcs) {
apply_func(is_powered_on);
}
}
void ConfigureLinuxTab::changeEvent(QEvent* event) {
if (event->type() == QEvent::LanguageChange) {
RetranslateUI();
}
QWidget::changeEvent(event);
}
void ConfigureLinuxTab::RetranslateUI() {
ui->retranslateUi(this);
}

View File

@@ -1,44 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QWidget>
namespace Core {
class System;
}
namespace Ui {
class ConfigureLinuxTab;
}
namespace ConfigurationShared {
class Builder;
}
class ConfigureLinuxTab : public ConfigurationShared::Tab {
Q_OBJECT
public:
explicit ConfigureLinuxTab(const Core::System& system_,
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
const ConfigurationShared::Builder& builder,
QWidget* parent = nullptr);
~ConfigureLinuxTab() override;
void ApplyConfiguration() override;
void SetConfiguration() override;
private:
void changeEvent(QEvent* event) override;
void RetranslateUI();
void Setup(const ConfigurationShared::Builder& builder);
std::unique_ptr<Ui::ConfigureLinuxTab> ui;
const Core::System& system;
std::vector<std::function<void(bool)>> apply_funcs{};
};

View File

@@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfigureLinuxTab</class>
<widget class="QWidget" name="ConfigureLinuxTab">
<property name="accessibleName">
<string>Linux</string>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QGroupBox" name="LinuxGroupBox">
<property name="title">
<string>Linux</string>
</property>
<layout class="QVBoxLayout" name="LinuxVerticalLayout_1">
<item>
<widget class="QWidget" name="linux_widget" native="true">
<layout class="QVBoxLayout" name="LinuxVerticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -37,7 +37,6 @@
#include "yuzu/configuration/configure_graphics_advanced.h"
#include "yuzu/configuration/configure_graphics_extensions.h"
#include "yuzu/configuration/configure_input_per_game.h"
#include "yuzu/configuration/configure_linux_tab.h"
#include "yuzu/configuration/configure_per_game.h"
#include "yuzu/configuration/configure_per_game_addons.h"
#include "yuzu/configuration/configure_system.h"
@@ -68,7 +67,6 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
[](Settings::AspectRatio, Settings::ResolutionSetup) {}, tab_group, *builder, this);
input_tab = std::make_unique<ConfigureInputPerGame>(system_, game_config.get(), this);
linux_tab = std::make_unique<ConfigureLinuxTab>(system_, tab_group, *builder, this);
system_tab = std::make_unique<ConfigureSystem>(system_, tab_group, *builder, this);
network_tab = std::make_unique<ConfigureNetwork>(system_, this);
@@ -84,13 +82,6 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
ui->tabWidget->addTab(input_tab.get(), tr("Input Profiles"));
ui->tabWidget->addTab(network_tab.get(), tr("Network"));
// Only show Linux tab on Unix
linux_tab->setVisible(false);
#ifdef __unix__
linux_tab->setVisible(true);
ui->tabWidget->addTab(linux_tab.get(), tr("Linux"));
#endif
setFocusPolicy(Qt::ClickFocus);
setWindowTitle(tr("Properties"));

View File

@@ -36,7 +36,6 @@ class ConfigureGraphics;
class ConfigureGraphicsAdvanced;
class ConfigureGraphicsExtensions;
class ConfigureInputPerGame;
class ConfigureLinuxTab;
class ConfigureSystem;
class ConfigureNetwork;
@@ -92,7 +91,6 @@ private:
std::unique_ptr<ConfigureGraphicsExtensions> graphics_extensions_tab;
std::unique_ptr<ConfigureGraphics> graphics_tab;
std::unique_ptr<ConfigureInputPerGame> input_tab;
std::unique_ptr<ConfigureLinuxTab> linux_tab;
std::unique_ptr<ConfigureSystem> system_tab;
std::unique_ptr<ConfigureNetwork> network_tab;
};

View File

@@ -122,7 +122,9 @@ int main(int argc, char* argv[]) {
// the user folder in the Qt Frontend, we need to cd into that working directory
const auto bin_path = Common::FS::GetBundleDirectory() / "..";
chdir(Common::FS::PathToUTF8String(bin_path).c_str());
#elif defined(__unix__) && !defined(__ANDROID__)
#endif
#ifdef __unix__
// Set the DISPLAY variable in order to open web browsers
// TODO (lat9nq): Find a better solution for AppImages to start external applications
if (QString::fromLocal8Bit(qgetenv("DISPLAY")).isEmpty()) {

View File

@@ -164,9 +164,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#endif
#ifdef __linux__
#include "common/linux/gamemode.h"
#endif
#include "qt_common/gamemode.h"
#ifdef _WIN32
#include "core/core_timing.h"
@@ -423,9 +421,7 @@ MainWindow::MainWindow(bool has_broken_vulkan)
SetupSigInterrupts();
#endif
#ifdef __linux__
SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue());
#endif
SetGamemodeEnabled(UISettings::values.enable_gamemode.GetValue());
UISettings::RestoreWindowState(config);
@@ -2198,10 +2194,7 @@ void MainWindow::OnEmulationStopped() {
emulation_running = false;
discord_rpc->Update();
#ifdef __linux__
Common::Linux::StopGamemode();
#endif
Common::FeralGamemode::Stop();
// The emulation is stopped, so closing the window or not does not matter anymore
disconnect(render_window, &GRenderWindow::Closed, this, &MainWindow::OnStopGame);
@@ -3072,10 +3065,7 @@ void MainWindow::OnStartGame() {
play_time_manager->Start();
discord_rpc->Update();
#ifdef __linux__
Common::Linux::StartGamemode();
#endif
Common::FeralGamemode::Start();
}
void MainWindow::OnRestartGame() {
@@ -3096,10 +3086,7 @@ void MainWindow::OnPauseGame() {
play_time_manager->Stop();
UpdateMenuState();
AllowOSSleep();
#ifdef __linux__
Common::Linux::StopGamemode();
#endif
Common::FeralGamemode::Stop();
}
void MainWindow::OnPauseContinueGame() {
@@ -3384,11 +3371,9 @@ void MainWindow::OnConfigure() {
const auto old_theme = UISettings::values.theme;
const bool old_discord_presence = UISettings::values.enable_discord_presence.GetValue();
const auto old_language_index = Settings::values.language_index.GetValue();
#ifdef __linux__
const bool old_gamemode = Settings::values.enable_gamemode.GetValue();
#endif
const bool old_gamemode = UISettings::values.enable_gamemode.GetValue();
#ifdef __unix__
const bool old_force_x11 = Settings::values.gui_force_x11.GetValue();
const bool old_force_x11 = UISettings::values.gui_force_x11.GetValue();
#endif
Settings::SetConfiguringGlobal(true);
@@ -3449,14 +3434,12 @@ void MainWindow::OnConfigure() {
if (UISettings::values.enable_discord_presence.GetValue() != old_discord_presence) {
SetDiscordEnabled(UISettings::values.enable_discord_presence.GetValue());
}
#ifdef __linux__
if (Settings::values.enable_gamemode.GetValue() != old_gamemode) {
SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue());
if (UISettings::values.enable_gamemode.GetValue() != old_gamemode) {
SetGamemodeEnabled(UISettings::values.enable_gamemode.GetValue());
}
#endif
#ifdef __unix__
if (Settings::values.gui_force_x11.GetValue() != old_force_x11) {
GraphicsBackend::SetForceX11(Settings::values.gui_force_x11.GetValue());
if (UISettings::values.gui_force_x11.GetValue() != old_force_x11) {
GraphicsBackend::SetForceX11(UISettings::values.gui_force_x11.GetValue());
}
#endif
@@ -4403,7 +4386,7 @@ void MainWindow::OnCheckGraphicsBackend() {
if (!isWayland)
return;
const bool currently_hidden = Settings::values.gui_hide_backend_warning.GetValue();
const bool currently_hidden = UISettings::values.gui_hide_backend_warning.GetValue();
if (currently_hidden)
return;
@@ -4426,11 +4409,11 @@ void MainWindow::OnCheckGraphicsBackend() {
const bool hide = cb->isChecked();
if (hide != currently_hidden) {
Settings::values.gui_hide_backend_warning.SetValue(hide);
UISettings::values.gui_hide_backend_warning.SetValue(hide);
}
if (msgbox.clickedButton() == okButton) {
Settings::values.gui_force_x11.SetValue(true);
UISettings::values.gui_force_x11.SetValue(true);
GraphicsBackend::SetForceX11(true);
QMessageBox::information(this,
tr("Restart Required"),
@@ -4760,13 +4743,14 @@ void MainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
discord_rpc->Update();
}
#ifdef __linux__
void MainWindow::SetGamemodeEnabled(bool state) {
if (emulation_running) {
Common::Linux::SetGamemodeState(state);
if (state)
Common::FeralGamemode::Start();
else
Common::FeralGamemode::Stop();
}
}
#endif
void MainWindow::changeEvent(QEvent* event) {
#ifdef __unix__

View File

@@ -314,8 +314,8 @@ private:
void SetupSigInterrupts();
static void HandleSigInterrupt(int);
void OnSigInterruptNotifierActivated();
void SetGamemodeEnabled(bool state);
#endif
void SetGamemodeEnabled(bool state);
Service::AM::FrontendAppletParameters ApplicationAppletParameters();
Service::AM::FrontendAppletParameters LibraryAppletParameters(u64 program_id,

View File

@@ -4,7 +4,6 @@
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <array>
#include <cmath>
#include <QPainter>
@@ -12,6 +11,7 @@
#include "common/logging/log.h"
#include "core/frontend/applets/profile_select.h"
#include "core/hle/service/acc/profile_manager.h"
#include "frontend_common/data_manager.h"
#include "qt_common/qt_common.h"
#include "yuzu/util/util.h"
@@ -29,16 +29,7 @@ QFont GetMonospaceFont() {
}
QString ReadableByteSize(qulonglong size) {
static constexpr std::array units{"B", "KiB", "MiB", "GiB", "TiB", "PiB"};
if (size == 0) {
return QStringLiteral("0");
}
const int digit_groups = (std::min)(static_cast<int>(std::log10(size) / std::log10(1024)),
static_cast<int>(units.size()));
return QStringLiteral("%L1 %2")
.arg(size / std::pow(1024, digit_groups), 0, 'f', 1)
.arg(QString::fromUtf8(units[digit_groups]));
return QString::fromStdString(FrontendCommon::DataManager::ReadableBytesSize(size));
}
QPixmap CreateCirclePixmapFromColor(const QColor& color) {

View File

@@ -60,10 +60,6 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
#ifdef __linux__
#include "common/linux/gamemode.h"
#endif
static void PrintHelp(const char* argv0) {
std::cout << "Usage: " << argv0
<< " [options] <filename>\n"
@@ -427,11 +423,6 @@ int main(int argc, char** argv) {
// Just exit right away.
exit(0);
});
#ifdef __linux__
Common::Linux::StartGamemode();
#endif
void(system.Run());
if (system.DebuggerEnabled()) {
system.InitializeDebugger();
@@ -442,11 +433,6 @@ int main(int argc, char** argv) {
system.DetachDebugger();
void(system.Pause());
system.ShutdownMainProcess();
#ifdef __linux__
Common::Linux::StopGamemode();
#endif
detached_tasks.WaitForAllTasks();
return 0;
}