diff options
| -rw-r--r-- | .codespellrc | 2 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt | 2 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt | 8 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt | 4 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt | 11 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt | 26 | ||||
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt | 4 | ||||
| -rw-r--r-- | src/android/app/src/main/jni/native.cpp | 20 | ||||
| -rw-r--r-- | src/core/loader/nro.cpp | 13 | ||||
| -rw-r--r-- | src/core/loader/nro.h | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.h | 1 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 8 |
13 files changed, 80 insertions, 27 deletions
diff --git a/.codespellrc b/.codespellrc index 786a991eb..29bcf3502 100644 --- a/.codespellrc +++ b/.codespellrc | |||
| @@ -3,4 +3,4 @@ | |||
| 3 | 3 | ||
| 4 | [codespell] | 4 | [codespell] |
| 5 | skip = ./.git,./build,./dist,./Doxyfile,./externals,./LICENSES | 5 | skip = ./.git,./build,./dist,./Doxyfile,./externals,./LICENSES |
| 6 | ignore-words-list = aci,allright,ba,deques,froms,hda,inout,lod,masia,nam,nax,nd,pullrequests,pullrequest,te,transfered,unstall,uscaled,zink | 6 | ignore-words-list = aci,allright,ba,deques,froms,hda,inout,lod,masia,nam,nax,nd,optin,pullrequests,pullrequest,te,transfered,unstall,uscaled,zink |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index c11b6bc16..22af9e435 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt | |||
| @@ -223,6 +223,8 @@ object NativeLibrary { | |||
| 223 | 223 | ||
| 224 | external fun getCompany(filename: String): String | 224 | external fun getCompany(filename: String): String |
| 225 | 225 | ||
| 226 | external fun isHomebrew(filename: String): Boolean | ||
| 227 | |||
| 226 | external fun setAppDirectory(directory: String) | 228 | external fun setAppDirectory(directory: String) |
| 227 | 229 | ||
| 228 | external fun initializeGpuDriver( | 230 | external fun initializeGpuDriver( |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt index ebc0f164a..adbe3696b 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt | |||
| @@ -127,13 +127,7 @@ class SearchFragment : Fragment() { | |||
| 127 | } | 127 | } |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | R.id.chip_homebrew -> { | 130 | R.id.chip_homebrew -> baseList.filter { it.isHomebrew } |
| 131 | baseList.filter { | ||
| 132 | Log.error("Guh - ${it.path}") | ||
| 133 | FileUtil.hasExtension(it.path, "nro") | ||
| 134 | || FileUtil.hasExtension(it.path, "nso") | ||
| 135 | } | ||
| 136 | } | ||
| 137 | 131 | ||
| 138 | R.id.chip_retail -> baseList.filter { | 132 | R.id.chip_retail -> baseList.filter { |
| 139 | FileUtil.hasExtension(it.path, "xci") | 133 | FileUtil.hasExtension(it.path, "xci") |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt index 2a17653b2..3d6782c49 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt | |||
| @@ -16,7 +16,8 @@ class Game( | |||
| 16 | val regions: String, | 16 | val regions: String, |
| 17 | val path: String, | 17 | val path: String, |
| 18 | val gameId: String, | 18 | val gameId: String, |
| 19 | val company: String | 19 | val company: String, |
| 20 | val isHomebrew: Boolean | ||
| 20 | ) : Parcelable { | 21 | ) : Parcelable { |
| 21 | val keyAddedToLibraryTime get() = "${gameId}_AddedToLibraryTime" | 22 | val keyAddedToLibraryTime get() = "${gameId}_AddedToLibraryTime" |
| 22 | val keyLastPlayedTime get() = "${gameId}_LastPlayed" | 23 | val keyLastPlayedTime get() = "${gameId}_LastPlayed" |
| @@ -31,6 +32,7 @@ class Game( | |||
| 31 | && path == other.path | 32 | && path == other.path |
| 32 | && gameId == other.gameId | 33 | && gameId == other.gameId |
| 33 | && company == other.company | 34 | && company == other.company |
| 35 | && isHomebrew == other.isHomebrew | ||
| 34 | } | 36 | } |
| 35 | 37 | ||
| 36 | companion object { | 38 | companion object { |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt index 7059856f1..d9b301210 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt | |||
| @@ -13,6 +13,8 @@ import androidx.preference.PreferenceManager | |||
| 13 | import kotlinx.coroutines.Dispatchers | 13 | import kotlinx.coroutines.Dispatchers |
| 14 | import kotlinx.coroutines.launch | 14 | import kotlinx.coroutines.launch |
| 15 | import kotlinx.coroutines.withContext | 15 | import kotlinx.coroutines.withContext |
| 16 | import kotlinx.serialization.ExperimentalSerializationApi | ||
| 17 | import kotlinx.serialization.MissingFieldException | ||
| 16 | import kotlinx.serialization.decodeFromString | 18 | import kotlinx.serialization.decodeFromString |
| 17 | import kotlinx.serialization.json.Json | 19 | import kotlinx.serialization.json.Json |
| 18 | import org.yuzu.yuzu_emu.NativeLibrary | 20 | import org.yuzu.yuzu_emu.NativeLibrary |
| @@ -20,6 +22,7 @@ import org.yuzu.yuzu_emu.YuzuApplication | |||
| 20 | import org.yuzu.yuzu_emu.utils.GameHelper | 22 | import org.yuzu.yuzu_emu.utils.GameHelper |
| 21 | import java.util.Locale | 23 | import java.util.Locale |
| 22 | 24 | ||
| 25 | @OptIn(ExperimentalSerializationApi::class) | ||
| 23 | class GamesViewModel : ViewModel() { | 26 | class GamesViewModel : ViewModel() { |
| 24 | private val _games = MutableLiveData<List<Game>>(emptyList()) | 27 | private val _games = MutableLiveData<List<Game>>(emptyList()) |
| 25 | val games: LiveData<List<Game>> get() = _games | 28 | val games: LiveData<List<Game>> get() = _games |
| @@ -49,7 +52,13 @@ class GamesViewModel : ViewModel() { | |||
| 49 | if (storedGames!!.isNotEmpty()) { | 52 | if (storedGames!!.isNotEmpty()) { |
| 50 | val deserializedGames = mutableSetOf<Game>() | 53 | val deserializedGames = mutableSetOf<Game>() |
| 51 | storedGames.forEach { | 54 | storedGames.forEach { |
| 52 | val game: Game = Json.decodeFromString(it) | 55 | val game: Game |
| 56 | try { | ||
| 57 | game = Json.decodeFromString(it) | ||
| 58 | } catch (e: MissingFieldException) { | ||
| 59 | return@forEach | ||
| 60 | } | ||
| 61 | |||
| 53 | val gameExists = | 62 | val gameExists = |
| 54 | DocumentFile.fromSingleUri(YuzuApplication.appContext, Uri.parse(game.path)) | 63 | DocumentFile.fromSingleUri(YuzuApplication.appContext, Uri.parse(game.path)) |
| 55 | ?.exists() | 64 | ?.exists() |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt index c9f5797ac..aa424c768 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt | |||
| @@ -765,18 +765,20 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : SurfaceView(context | |||
| 765 | // If we have API access, calculate the safe area to draw the overlay | 765 | // If we have API access, calculate the safe area to draw the overlay |
| 766 | var cutoutLeft = 0 | 766 | var cutoutLeft = 0 |
| 767 | var cutoutBottom = 0 | 767 | var cutoutBottom = 0 |
| 768 | val insets = context.windowManager.currentWindowMetrics.windowInsets.displayCutout | 768 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
| 769 | if (insets != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | 769 | val insets = context.windowManager.currentWindowMetrics.windowInsets.displayCutout |
| 770 | if (insets.boundingRectTop.bottom != 0 && insets.boundingRectTop.bottom > maxY / 2) | 770 | if (insets != null) { |
| 771 | insets.boundingRectTop.bottom.toFloat() else maxY | 771 | if (insets.boundingRectTop.bottom != 0 && insets.boundingRectTop.bottom > maxY / 2) |
| 772 | if (insets.boundingRectRight.left != 0 && insets.boundingRectRight.left > maxX / 2) | 772 | insets.boundingRectTop.bottom.toFloat() else maxY |
| 773 | insets.boundingRectRight.left.toFloat() else maxX | 773 | if (insets.boundingRectRight.left != 0 && insets.boundingRectRight.left > maxX / 2) |
| 774 | 774 | insets.boundingRectRight.left.toFloat() else maxX | |
| 775 | minX = insets.boundingRectLeft.right - insets.boundingRectLeft.left | 775 | |
| 776 | minY = insets.boundingRectBottom.top - insets.boundingRectBottom.bottom | 776 | minX = insets.boundingRectLeft.right - insets.boundingRectLeft.left |
| 777 | 777 | minY = insets.boundingRectBottom.top - insets.boundingRectBottom.bottom | |
| 778 | cutoutLeft = insets.boundingRectRight.right - insets.boundingRectRight.left | 778 | |
| 779 | cutoutBottom = insets.boundingRectTop.top - insets.boundingRectTop.bottom | 779 | cutoutLeft = insets.boundingRectRight.right - insets.boundingRectRight.left |
| 780 | cutoutBottom = insets.boundingRectTop.top - insets.boundingRectTop.bottom | ||
| 781 | } | ||
| 780 | } | 782 | } |
| 781 | 783 | ||
| 782 | // This makes sure that if we have an inset on one side of the screen, we mirror it on | 784 | // This makes sure that if we have an inset on one side of the screen, we mirror it on |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt index ba6b5783e..42b207618 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt | |||
| @@ -6,7 +6,6 @@ package org.yuzu.yuzu_emu.utils | |||
| 6 | import android.content.SharedPreferences | 6 | import android.content.SharedPreferences |
| 7 | import android.net.Uri | 7 | import android.net.Uri |
| 8 | import androidx.preference.PreferenceManager | 8 | import androidx.preference.PreferenceManager |
| 9 | import kotlinx.serialization.decodeFromString | ||
| 10 | import kotlinx.serialization.encodeToString | 9 | import kotlinx.serialization.encodeToString |
| 11 | import kotlinx.serialization.json.Json | 10 | import kotlinx.serialization.json.Json |
| 12 | import org.yuzu.yuzu_emu.NativeLibrary | 11 | import org.yuzu.yuzu_emu.NativeLibrary |
| @@ -83,7 +82,8 @@ object GameHelper { | |||
| 83 | NativeLibrary.getRegions(filePath), | 82 | NativeLibrary.getRegions(filePath), |
| 84 | filePath, | 83 | filePath, |
| 85 | gameId, | 84 | gameId, |
| 86 | NativeLibrary.getCompany(filePath) | 85 | NativeLibrary.getCompany(filePath), |
| 86 | NativeLibrary.isHomebrew(filePath) | ||
| 87 | ) | 87 | ) |
| 88 | 88 | ||
| 89 | val addedTime = preferences.getLong(newGame.keyAddedToLibraryTime, 0L) | 89 | val addedTime = preferences.getLong(newGame.keyAddedToLibraryTime, 0L) |
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index b87e04b3d..03cb0b74b 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #include <android/api-level.h> | 14 | #include <android/api-level.h> |
| 15 | #include <android/native_window_jni.h> | 15 | #include <android/native_window_jni.h> |
| 16 | #include <core/loader/nro.h> | ||
| 16 | 17 | ||
| 17 | #include "common/detached_tasks.h" | 18 | #include "common/detached_tasks.h" |
| 18 | #include "common/dynamic_library.h" | 19 | #include "common/dynamic_library.h" |
| @@ -281,6 +282,10 @@ public: | |||
| 281 | return GetRomMetadata(path).icon; | 282 | return GetRomMetadata(path).icon; |
| 282 | } | 283 | } |
| 283 | 284 | ||
| 285 | bool GetIsHomebrew(const std::string& path) { | ||
| 286 | return GetRomMetadata(path).isHomebrew; | ||
| 287 | } | ||
| 288 | |||
| 284 | void ResetRomMetadata() { | 289 | void ResetRomMetadata() { |
| 285 | m_rom_metadata_cache.clear(); | 290 | m_rom_metadata_cache.clear(); |
| 286 | } | 291 | } |
| @@ -348,6 +353,7 @@ private: | |||
| 348 | struct RomMetadata { | 353 | struct RomMetadata { |
| 349 | std::string title; | 354 | std::string title; |
| 350 | std::vector<u8> icon; | 355 | std::vector<u8> icon; |
| 356 | bool isHomebrew; | ||
| 351 | }; | 357 | }; |
| 352 | 358 | ||
| 353 | RomMetadata GetRomMetadata(const std::string& path) { | 359 | RomMetadata GetRomMetadata(const std::string& path) { |
| @@ -360,11 +366,17 @@ private: | |||
| 360 | 366 | ||
| 361 | RomMetadata CacheRomMetadata(const std::string& path) { | 367 | RomMetadata CacheRomMetadata(const std::string& path) { |
| 362 | const auto file = Core::GetGameFileFromPath(m_vfs, path); | 368 | const auto file = Core::GetGameFileFromPath(m_vfs, path); |
| 363 | const auto loader = Loader::GetLoader(EmulationSession::GetInstance().System(), file, 0, 0); | 369 | auto loader = Loader::GetLoader(EmulationSession::GetInstance().System(), file, 0, 0); |
| 364 | 370 | ||
| 365 | RomMetadata entry; | 371 | RomMetadata entry; |
| 366 | loader->ReadTitle(entry.title); | 372 | loader->ReadTitle(entry.title); |
| 367 | loader->ReadIcon(entry.icon); | 373 | loader->ReadIcon(entry.icon); |
| 374 | if (loader->GetFileType() == Loader::FileType::NRO) { | ||
| 375 | auto loader_nro = dynamic_cast<Loader::AppLoader_NRO*>(loader.get()); | ||
| 376 | entry.isHomebrew = loader_nro->IsHomebrew(); | ||
| 377 | } else { | ||
| 378 | entry.isHomebrew = false; | ||
| 379 | } | ||
| 368 | 380 | ||
| 369 | m_rom_metadata_cache[path] = entry; | 381 | m_rom_metadata_cache[path] = entry; |
| 370 | 382 | ||
| @@ -662,6 +674,12 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCompany([[maybe_unused]] JNIEnv | |||
| 662 | return env->NewStringUTF(""); | 674 | return env->NewStringUTF(""); |
| 663 | } | 675 | } |
| 664 | 676 | ||
| 677 | jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isHomebrew([[maybe_unused]] JNIEnv* env, | ||
| 678 | [[maybe_unused]] jclass clazz, | ||
| 679 | [[maybe_unused]] jstring j_filename) { | ||
| 680 | return EmulationSession::GetInstance().GetIsHomebrew(GetJString(env, j_filename)); | ||
| 681 | } | ||
| 682 | |||
| 665 | void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmulation | 683 | void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmulation |
| 666 | [[maybe_unused]] (JNIEnv* env, [[maybe_unused]] jclass clazz) { | 684 | [[maybe_unused]] (JNIEnv* env, [[maybe_unused]] jclass clazz) { |
| 667 | // Create the default config.ini. | 685 | // Create the default config.ini. |
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 73d04d7ee..7be6cf5f3 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp | |||
| @@ -33,7 +33,8 @@ static_assert(sizeof(NroSegmentHeader) == 0x8, "NroSegmentHeader has incorrect s | |||
| 33 | struct NroHeader { | 33 | struct NroHeader { |
| 34 | INSERT_PADDING_BYTES(0x4); | 34 | INSERT_PADDING_BYTES(0x4); |
| 35 | u32_le module_header_offset; | 35 | u32_le module_header_offset; |
| 36 | INSERT_PADDING_BYTES(0x8); | 36 | u32 magic_ext1; |
| 37 | u32 magic_ext2; | ||
| 37 | u32_le magic; | 38 | u32_le magic; |
| 38 | INSERT_PADDING_BYTES(0x4); | 39 | INSERT_PADDING_BYTES(0x4); |
| 39 | u32_le file_size; | 40 | u32_le file_size; |
| @@ -124,6 +125,16 @@ FileType AppLoader_NRO::IdentifyType(const FileSys::VirtualFile& nro_file) { | |||
| 124 | return FileType::Error; | 125 | return FileType::Error; |
| 125 | } | 126 | } |
| 126 | 127 | ||
| 128 | bool AppLoader_NRO::IsHomebrew() { | ||
| 129 | // Read NSO header | ||
| 130 | NroHeader nro_header{}; | ||
| 131 | if (sizeof(NroHeader) != file->ReadObject(&nro_header)) { | ||
| 132 | return false; | ||
| 133 | } | ||
| 134 | return nro_header.magic_ext1 == Common::MakeMagic('H', 'O', 'M', 'E') && | ||
| 135 | nro_header.magic_ext2 == Common::MakeMagic('B', 'R', 'E', 'W'); | ||
| 136 | } | ||
| 137 | |||
| 127 | static constexpr u32 PageAlignSize(u32 size) { | 138 | static constexpr u32 PageAlignSize(u32 size) { |
| 128 | return static_cast<u32>((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK); | 139 | return static_cast<u32>((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK); |
| 129 | } | 140 | } |
diff --git a/src/core/loader/nro.h b/src/core/loader/nro.h index ccb77b581..8de6eebc6 100644 --- a/src/core/loader/nro.h +++ b/src/core/loader/nro.h | |||
| @@ -38,6 +38,8 @@ public: | |||
| 38 | */ | 38 | */ |
| 39 | static FileType IdentifyType(const FileSys::VirtualFile& nro_file); | 39 | static FileType IdentifyType(const FileSys::VirtualFile& nro_file); |
| 40 | 40 | ||
| 41 | bool IsHomebrew(); | ||
| 42 | |||
| 41 | FileType GetFileType() const override { | 43 | FileType GetFileType() const override { |
| 42 | return IdentifyType(file); | 44 | return IdentifyType(file); |
| 43 | } | 45 | } |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 7168630d8..bac9dff90 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -101,6 +101,12 @@ const std::map<Settings::RendererBackend, QString> Config::renderer_backend_text | |||
| 101 | {Settings::RendererBackend::Null, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Null"))}, | 101 | {Settings::RendererBackend::Null, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Null"))}, |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | const std::map<Settings::ShaderBackend, QString> Config::shader_backend_texts_map = { | ||
| 105 | {Settings::ShaderBackend::GLSL, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLSL"))}, | ||
| 106 | {Settings::ShaderBackend::GLASM, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLASM"))}, | ||
| 107 | {Settings::ShaderBackend::SPIRV, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "SPIRV"))}, | ||
| 108 | }; | ||
| 109 | |||
| 104 | // This shouldn't have anything except static initializers (no functions). So | 110 | // This shouldn't have anything except static initializers (no functions). So |
| 105 | // QKeySequence(...).toString() is NOT ALLOWED HERE. | 111 | // QKeySequence(...).toString() is NOT ALLOWED HERE. |
| 106 | // This must be in alphabetical order according to action name as it must have the same order as | 112 | // This must be in alphabetical order according to action name as it must have the same order as |
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index ad590ea9e..0fd4baf6b 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h | |||
| @@ -54,6 +54,7 @@ public: | |||
| 54 | static const std::map<bool, QString> use_docked_mode_texts_map; | 54 | static const std::map<bool, QString> use_docked_mode_texts_map; |
| 55 | static const std::map<Settings::GPUAccuracy, QString> gpu_accuracy_texts_map; | 55 | static const std::map<Settings::GPUAccuracy, QString> gpu_accuracy_texts_map; |
| 56 | static const std::map<Settings::RendererBackend, QString> renderer_backend_texts_map; | 56 | static const std::map<Settings::RendererBackend, QString> renderer_backend_texts_map; |
| 57 | static const std::map<Settings::ShaderBackend, QString> shader_backend_texts_map; | ||
| 57 | 58 | ||
| 58 | static constexpr UISettings::Theme default_theme{ | 59 | static constexpr UISettings::Theme default_theme{ |
| 59 | #ifdef _WIN32 | 60 | #ifdef _WIN32 |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 145fea5f1..9d06b21b6 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -4116,7 +4116,13 @@ void GMainWindow::UpdateDockedButton() { | |||
| 4116 | void GMainWindow::UpdateAPIText() { | 4116 | void GMainWindow::UpdateAPIText() { |
| 4117 | const auto api = Settings::values.renderer_backend.GetValue(); | 4117 | const auto api = Settings::values.renderer_backend.GetValue(); |
| 4118 | const auto renderer_status_text = Config::renderer_backend_texts_map.find(api)->second; | 4118 | const auto renderer_status_text = Config::renderer_backend_texts_map.find(api)->second; |
| 4119 | renderer_status_button->setText(renderer_status_text.toUpper()); | 4119 | renderer_status_button->setText( |
| 4120 | api == Settings::RendererBackend::OpenGL | ||
| 4121 | ? tr("%1 %2").arg( | ||
| 4122 | renderer_status_text.toUpper(), | ||
| 4123 | Config::shader_backend_texts_map.find(Settings::values.shader_backend.GetValue()) | ||
| 4124 | ->second) | ||
| 4125 | : renderer_status_text.toUpper()); | ||
| 4120 | } | 4126 | } |
| 4121 | 4127 | ||
| 4122 | void GMainWindow::UpdateFilterText() { | 4128 | void GMainWindow::UpdateFilterText() { |