瀏覽代碼

configure_system: Fix compiler warning

Frederic Laing 7 年之前
父節點
當前提交
d34d0bfc87
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      src/core/settings.h
  2. 1 1
      src/yuzu/configuration/configure_system.cpp

+ 2 - 2
src/core/settings.h

@@ -114,8 +114,8 @@ struct Values {
     // System
     bool use_docked_mode;
     bool enable_nfc;
-    int current_user;
-    int language_index;
+    s32 current_user;
+    s32 language_index;
 
     // Controls
     std::array<std::string, NativeButton::NumButtons> buttons;

+ 1 - 1
src/yuzu/configuration/configure_system.cpp

@@ -240,7 +240,7 @@ void ConfigureSystem::RefreshConsoleID() {
 
 void ConfigureSystem::SelectUser(const QModelIndex& index) {
     Settings::values.current_user =
-        std::clamp<std::size_t>(index.row(), 0, profile_manager->GetUserCount() - 1);
+        std::clamp<s32>(index.row(), 0, static_cast<s32>(profile_manager->GetUserCount() - 1));
 
     UpdateCurrentUser();