Compare commits
5 Commits
Canary-1.2
...
da137542b6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da137542b6 | ||
|
|
6d75410bd2 | ||
|
|
196b2eaf66 | ||
|
|
82fe519766 | ||
|
|
02026c3d38 |
@@ -1,3 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Common.Configuration.Hid
|
||||
{
|
||||
public class KeyboardHotkeys
|
||||
@@ -13,5 +15,6 @@ namespace Ryujinx.Common.Configuration.Hid
|
||||
public Key VolumeDown { get; set; }
|
||||
public Key CustomVSyncIntervalIncrement { get; set; }
|
||||
public Key CustomVSyncIntervalDecrement { get; set; }
|
||||
public List<Key> CycleControllers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ using Ryujinx.HLE;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||
using Ryujinx.HLE.HOS.Services.Hid;
|
||||
using Ryujinx.HLE.HOS.SystemState;
|
||||
using Ryujinx.Input;
|
||||
using Ryujinx.Input.HLE;
|
||||
@@ -49,6 +50,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -1306,6 +1308,18 @@ namespace Ryujinx.Ava
|
||||
|
||||
_viewModel.Volume = Device.GetVolume();
|
||||
break;
|
||||
case KeyboardHotkeyState.CycleControllersPlayer1:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer2:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer3:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer4:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer5:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer6:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer7:
|
||||
case KeyboardHotkeyState.CycleControllersPlayer8:
|
||||
var player = currentHotkeyState - KeyboardHotkeyState.CycleControllersPlayer1;
|
||||
var ivm = new UI.ViewModels.Input.InputViewModel();
|
||||
Dispatcher.UIThread.Invoke(() => ivm.CyclePlayerDevice(player));
|
||||
break;
|
||||
case KeyboardHotkeyState.None:
|
||||
(_keyboardInterface as AvaloniaKeyboard).Clear();
|
||||
break;
|
||||
@@ -1388,6 +1402,15 @@ namespace Ryujinx.Ava
|
||||
state = KeyboardHotkeyState.CustomVSyncIntervalDecrement;
|
||||
}
|
||||
|
||||
foreach (var cycle in ConfigurationState.Instance.Hid.Hotkeys.Value.CycleControllers?.Select((value, index) => (value, index)) ?? [])
|
||||
{
|
||||
if (_keyboardInterface.IsPressed((Key)cycle.value))
|
||||
{
|
||||
state = KeyboardHotkeyState.CycleControllersPlayer1 + cycle.index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5347,6 +5347,31 @@
|
||||
"zh_TW": "啟用警告日誌"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabHotkeysCycleControllers",
|
||||
"Translations": {
|
||||
"ar_SA": "",
|
||||
"de_DE": "",
|
||||
"el_GR": "",
|
||||
"en_US": "Cycle Controllers",
|
||||
"es_ES": "",
|
||||
"fr_FR": "",
|
||||
"he_IL": "",
|
||||
"it_IT": "",
|
||||
"ja_JP": "",
|
||||
"ko_KR": "",
|
||||
"no_NO": "",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "",
|
||||
"ru_RU": "",
|
||||
"sv_SE": "",
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabLoggingEnableErrorLogs",
|
||||
"Translations": {
|
||||
@@ -11475,126 +11500,126 @@
|
||||
{
|
||||
"ID": "DialogConfirmationTitle",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - تأكيد",
|
||||
"de_DE": "Ryujinx - Bestätigung",
|
||||
"el_GR": "Ryujinx - Επιβεβαίωση",
|
||||
"en_US": "Ryujinx - Confirmation",
|
||||
"es_ES": "Ryujinx - Confirmación",
|
||||
"ar_SA": "{0} - تأكيد",
|
||||
"de_DE": "{0} - Bestätigung",
|
||||
"el_GR": "{0} - Επιβεβαίωση",
|
||||
"en_US": "{0} - Confirmation",
|
||||
"es_ES": "{0} - Confirmación",
|
||||
"fr_FR": "",
|
||||
"he_IL": "ריוג'ינקס - אישור",
|
||||
"it_IT": "Ryujinx - Conferma",
|
||||
"ja_JP": "Ryujinx - 確認",
|
||||
"ko_KR": "Ryujinx - 확인",
|
||||
"no_NO": "Ryujinx - Bekreftelse",
|
||||
"pl_PL": "Ryujinx - Potwierdzenie",
|
||||
"pt_BR": "Ryujinx - Confirmação",
|
||||
"ru_RU": "Ryujinx - Подтверждение",
|
||||
"sv_SE": "Ryujinx - Bekräftelse",
|
||||
"th_TH": "Ryujinx - ยืนยัน",
|
||||
"tr_TR": "Ryujinx - Onay",
|
||||
"uk_UA": "Ryujinx - Підтвердження",
|
||||
"zh_CN": "Ryujinx - 确认",
|
||||
"zh_TW": "Ryujinx - 確認"
|
||||
"he_IL": "{0} - אישור",
|
||||
"it_IT": "{0} - Conferma",
|
||||
"ja_JP": "{0} - 確認",
|
||||
"ko_KR": "{0} - 확인",
|
||||
"no_NO": "{0} - Bekreftelse",
|
||||
"pl_PL": "{0} - Potwierdzenie",
|
||||
"pt_BR": "{0} - Confirmação",
|
||||
"ru_RU": "{0} - Подтверждение",
|
||||
"sv_SE": "{0} - Bekräftelse",
|
||||
"th_TH": "{0} - ยืนยัน",
|
||||
"tr_TR": "{0} - Onay",
|
||||
"uk_UA": "{0} - Підтвердження",
|
||||
"zh_CN": "{0} - 确认",
|
||||
"zh_TW": "{0} - 確認"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "DialogUpdaterTitle",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - المحدث",
|
||||
"ar_SA": "{0} - المحدث",
|
||||
"de_DE": "",
|
||||
"el_GR": "Ryujinx - Ενημερωτής",
|
||||
"en_US": "Ryujinx - Updater",
|
||||
"es_ES": "Ryujinx - Actualizador",
|
||||
"fr_FR": "Ryujinx - Mise à Jour",
|
||||
"he_IL": "ריוג'ינקס - מעדכן",
|
||||
"it_IT": "Ryujinx - Aggiornamento",
|
||||
"ja_JP": "Ryujinx - アップデータ",
|
||||
"ko_KR": "Ryujinx - 업데이터",
|
||||
"no_NO": "Ryujinx – Oppdaterer",
|
||||
"pl_PL": "Ryujinx - Asystent aktualizacji",
|
||||
"pt_BR": "Ryujinx - Atualizador",
|
||||
"ru_RU": "Ryujinx - Обновление",
|
||||
"sv_SE": "Ryujinx - Uppdatering",
|
||||
"th_TH": "Ryujinx - อัพเดต",
|
||||
"tr_TR": "Ryujinx - Güncelleyici",
|
||||
"uk_UA": "Ryujinx - Програма оновлення",
|
||||
"zh_CN": "Ryujinx - 更新",
|
||||
"zh_TW": "Ryujinx - 更新程式"
|
||||
"el_GR": "{0} - Ενημερωτής",
|
||||
"en_US": "{0} - Updater",
|
||||
"es_ES": "{0} - Actualizador",
|
||||
"fr_FR": "{0} - Mise à Jour",
|
||||
"he_IL": "{0} - מעדכן",
|
||||
"it_IT": "{0} - Aggiornamento",
|
||||
"ja_JP": "{0} - アップデータ",
|
||||
"ko_KR": "{0} - 업데이터",
|
||||
"no_NO": "{0} – Oppdaterer",
|
||||
"pl_PL": "{0} - Asystent aktualizacji",
|
||||
"pt_BR": "{0} - Atualizador",
|
||||
"ru_RU": "{0} - Обновление",
|
||||
"sv_SE": "{0} - Uppdatering",
|
||||
"th_TH": "{0} - อัพเดต",
|
||||
"tr_TR": "{0} - Güncelleyici",
|
||||
"uk_UA": "{0} - Програма оновлення",
|
||||
"zh_CN": "{0} - 更新",
|
||||
"zh_TW": "{0} - 更新程式"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "DialogErrorTitle",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - خطأ",
|
||||
"de_DE": "Ryujinx - Fehler",
|
||||
"el_GR": "Ryujinx - Σφάλμα",
|
||||
"en_US": "Ryujinx - Error",
|
||||
"ar_SA": "{0} - خطأ",
|
||||
"de_DE": "{0} - Fehler",
|
||||
"el_GR": "{0} - Σφάλμα",
|
||||
"en_US": "{0} - Error",
|
||||
"es_ES": "",
|
||||
"fr_FR": "Ryujinx - Erreur",
|
||||
"he_IL": "ריוג'ינקס - שגיאה",
|
||||
"it_IT": "Ryujinx - Errore",
|
||||
"ja_JP": "Ryujinx - エラー",
|
||||
"ko_KR": "Ryujinx - 오류",
|
||||
"no_NO": "Ryujinx - Feil",
|
||||
"pl_PL": "Ryujinx - Błąd",
|
||||
"pt_BR": "Ryujinx - Erro",
|
||||
"ru_RU": "Ryujinx - Ошибка",
|
||||
"sv_SE": "Ryujinx - Fel",
|
||||
"th_TH": "Ryujinx - ผิดพลาด",
|
||||
"tr_TR": "Ryujinx - Hata",
|
||||
"uk_UA": "Ryujinx - Помилка",
|
||||
"zh_CN": "Ryujinx - 错误",
|
||||
"zh_TW": "Ryujinx - 錯誤"
|
||||
"fr_FR": "{0} - Erreur",
|
||||
"he_IL": "{0} - שגיאה",
|
||||
"it_IT": "{0} - Errore",
|
||||
"ja_JP": "{0} - エラー",
|
||||
"ko_KR": "{0} - 오류",
|
||||
"no_NO": "{0} - Feil",
|
||||
"pl_PL": "{0} - Błąd",
|
||||
"pt_BR": "{0} - Erro",
|
||||
"ru_RU": "{0} - Ошибка",
|
||||
"sv_SE": "{0} - Fel",
|
||||
"th_TH": "{0} - ผิดพลาด",
|
||||
"tr_TR": "{0} - Hata",
|
||||
"uk_UA": "{0} - Помилка",
|
||||
"zh_CN": "{0} - 错误",
|
||||
"zh_TW": "{0} - 錯誤"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "DialogWarningTitle",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - تحذير",
|
||||
"de_DE": "Ryujinx - Warnung",
|
||||
"el_GR": "Ryujinx - Προειδοποίηση",
|
||||
"en_US": "Ryujinx - Warning",
|
||||
"es_ES": "Ryujinx - Advertencia",
|
||||
"fr_FR": "Ryujinx - Avertissement",
|
||||
"he_IL": "ריוג'ינקס - אזהרה",
|
||||
"it_IT": "Ryujinx - Avviso",
|
||||
"ja_JP": "Ryujinx - 警告",
|
||||
"ko_KR": "Ryujinx - 경고",
|
||||
"no_NO": "Ryujinx - Advarsel",
|
||||
"pl_PL": "Ryujinx - Ostrzeżenie",
|
||||
"pt_BR": "Ryujinx - Alerta",
|
||||
"ru_RU": "Ryujinx - Предупреждение",
|
||||
"sv_SE": "Ryujinx - Varning",
|
||||
"th_TH": "Ryujinx - คำเตือน",
|
||||
"tr_TR": "Ryujinx - Uyarı",
|
||||
"uk_UA": "Ryujinx - Попередження",
|
||||
"zh_CN": "Ryujinx - 警告",
|
||||
"zh_TW": "Ryujinx - 警告"
|
||||
"ar_SA": "{0} - تحذير",
|
||||
"de_DE": "{0} - Warnung",
|
||||
"el_GR": "{0} - Προειδοποίηση",
|
||||
"en_US": "{0} - Warning",
|
||||
"es_ES": "{0} - Advertencia",
|
||||
"fr_FR": "{0} - Avertissement",
|
||||
"he_IL": "{0} - אזהרה",
|
||||
"it_IT": "{0} - Avviso",
|
||||
"ja_JP": "{0} - 警告",
|
||||
"ko_KR": "{0} - 경고",
|
||||
"no_NO": "{0} - Advarsel",
|
||||
"pl_PL": "{0} - Ostrzeżenie",
|
||||
"pt_BR": "{0} - Alerta",
|
||||
"ru_RU": "{0} - Предупреждение",
|
||||
"sv_SE": "{0} - Varning",
|
||||
"th_TH": "{0} - คำเตือน",
|
||||
"tr_TR": "{0} - Uyarı",
|
||||
"uk_UA": "{0} - Попередження",
|
||||
"zh_CN": "{0} - 警告",
|
||||
"zh_TW": "{0} - 警告"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "DialogExitTitle",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - الخروج",
|
||||
"de_DE": "Ryujinx - Beenden",
|
||||
"el_GR": "Ryujinx - Έξοδος",
|
||||
"en_US": "Ryujinx - Exit",
|
||||
"es_ES": "Ryujinx - Salir",
|
||||
"fr_FR": "Ryujinx - Quitter",
|
||||
"he_IL": "ריוג'ינקס - יציאה",
|
||||
"it_IT": "Ryujinx - Esci",
|
||||
"ja_JP": "Ryujinx - 終了",
|
||||
"ko_KR": "Ryujinx - 종료",
|
||||
"no_NO": "Ryujinx - Avslutt",
|
||||
"pl_PL": "Ryujinx - Wyjdź",
|
||||
"pt_BR": "Ryujinx - Sair",
|
||||
"ru_RU": "Ryujinx - Выход",
|
||||
"sv_SE": "Ryujinx - Avslut",
|
||||
"th_TH": "Ryujinx - ออก",
|
||||
"tr_TR": "Ryujinx - Çıkış",
|
||||
"uk_UA": "Ryujinx - Вихід",
|
||||
"zh_CN": "Ryujinx - 退出",
|
||||
"zh_TW": "Ryujinx - 結束"
|
||||
"ar_SA": "{0} - الخروج",
|
||||
"de_DE": "{0} - Beenden",
|
||||
"el_GR": "{0} - Έξοδος",
|
||||
"en_US": "{0} - Exit",
|
||||
"es_ES": "{0} - Salir",
|
||||
"fr_FR": "{0} - Quitter",
|
||||
"he_IL": "{0} - יציאה",
|
||||
"it_IT": "{0} - Esci",
|
||||
"ja_JP": "{0} - 終了",
|
||||
"ko_KR": "{0} - 종료",
|
||||
"no_NO": "{0} - Avslutt",
|
||||
"pl_PL": "{0} - Wyjdź",
|
||||
"pt_BR": "{0} - Sair",
|
||||
"ru_RU": "{0} - Выход",
|
||||
"sv_SE": "{0} - Avslut",
|
||||
"th_TH": "{0} - ออก",
|
||||
"tr_TR": "{0} - Çıkış",
|
||||
"uk_UA": "{0} - Вихід",
|
||||
"zh_CN": "{0} - 退出",
|
||||
"zh_TW": "{0} - 結束"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -17025,26 +17050,26 @@
|
||||
{
|
||||
"ID": "DialogStopEmulationTitle",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - إيقاف المحاكاة",
|
||||
"de_DE": "Ryujinx - Beende Emulation",
|
||||
"el_GR": "Ryujinx - Διακοπή εξομοίωσης",
|
||||
"en_US": "Ryujinx - Stop Emulation",
|
||||
"es_ES": "Ryujinx - Detener emulación",
|
||||
"fr_FR": "Ryujinx - Arrêt de l'émulation",
|
||||
"he_IL": "ריוג'ינקס - עצור אמולציה",
|
||||
"it_IT": "Ryujinx - Ferma emulazione",
|
||||
"ja_JP": "Ryujinx - エミュレーションを中止",
|
||||
"ko_KR": "Ryujinx - 에뮬레이션 중지",
|
||||
"no_NO": "Ryujinx - Stopp emulasjon",
|
||||
"pl_PL": "Ryujinx - Zatrzymaj Emulację",
|
||||
"pt_BR": "Ryujinx - Parar emulação",
|
||||
"ru_RU": "Ryujinx - Остановка эмуляции",
|
||||
"sv_SE": "Ryujinx - Stoppa emulering",
|
||||
"th_TH": "Ryujinx - หยุดการจำลอง",
|
||||
"tr_TR": "Ryujinx - Emülasyonu Durdur",
|
||||
"uk_UA": "Ryujinx - Зупинити емуляцію",
|
||||
"zh_CN": "Ryujinx - 停止模拟",
|
||||
"zh_TW": "Ryujinx - 停止模擬"
|
||||
"ar_SA": "{0} - إيقاف المحاكاة",
|
||||
"de_DE": "{0} - Beende Emulation",
|
||||
"el_GR": "{0} - Διακοπή εξομοίωσης",
|
||||
"en_US": "{0} - Stop Emulation",
|
||||
"es_ES": "{0} - Detener emulación",
|
||||
"fr_FR": "{0} - Arrêt de l'émulation",
|
||||
"he_IL": "{0} - עצור אמולציה",
|
||||
"it_IT": "{0} - Ferma emulazione",
|
||||
"ja_JP": "{0} - エミュレーションを中止",
|
||||
"ko_KR": "{0} - 에뮬레이션 중지",
|
||||
"no_NO": "{0} - Stopp emulasjon",
|
||||
"pl_PL": "{0} - Zatrzymaj Emulację",
|
||||
"pt_BR": "{0} - Parar emulação",
|
||||
"ru_RU": "{0} - Остановка эмуляции",
|
||||
"sv_SE": "{0} - Stoppa emulering",
|
||||
"th_TH": "{0} - หยุดการจำลอง",
|
||||
"tr_TR": "{0} - Emülasyonu Durdur",
|
||||
"uk_UA": "{0} - Зупинити емуляцію",
|
||||
"zh_CN": "{0} - 停止模拟",
|
||||
"zh_TW": "{0} - 停止模擬"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -17950,51 +17975,51 @@
|
||||
{
|
||||
"ID": "RyujinxInfo",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - معلومات",
|
||||
"ar_SA": "{0} - معلومات",
|
||||
"de_DE": "",
|
||||
"el_GR": "Ryujinx - Πληροφορίες",
|
||||
"en_US": "Ryujinx - Info",
|
||||
"el_GR": "{0} - Πληροφορίες",
|
||||
"en_US": "{0} - Info",
|
||||
"es_ES": "",
|
||||
"fr_FR": "",
|
||||
"he_IL": "ריוג'ינקס - מידע",
|
||||
"it_IT": "Ryujinx - Informazioni",
|
||||
"ja_JP": "Ryujinx - 情報",
|
||||
"ko_KR": "Ryujinx - 정보",
|
||||
"no_NO": "Ryujinx - Informasjon",
|
||||
"he_IL": "{0} - מידע",
|
||||
"it_IT": "{0} - Informazioni",
|
||||
"ja_JP": "{0} - 情報",
|
||||
"ko_KR": "{0} - 정보",
|
||||
"no_NO": "{0} - Informasjon",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "Ryujinx - Informação",
|
||||
"ru_RU": "Ryujinx - Информация",
|
||||
"pt_BR": "{0} - Informação",
|
||||
"ru_RU": "{0} - Информация",
|
||||
"sv_SE": "",
|
||||
"th_TH": "Ryujinx – ข้อมูล",
|
||||
"tr_TR": "Ryujinx - Bilgi",
|
||||
"uk_UA": "Ryujin x - Інформація",
|
||||
"zh_CN": "Ryujinx - 信息",
|
||||
"zh_TW": "Ryujinx - 資訊"
|
||||
"th_TH": "{0} – ข้อมูล",
|
||||
"tr_TR": "{0} - Bilgi",
|
||||
"uk_UA": "{0} - Інформація",
|
||||
"zh_CN": "{0} - 信息",
|
||||
"zh_TW": "{0} - 資訊"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "RyujinxConfirm",
|
||||
"Translations": {
|
||||
"ar_SA": "ريوجينكس - تأكيد",
|
||||
"de_DE": "Ryujinx - Bestätigung",
|
||||
"el_GR": "Ryujinx - Επιβεβαίωση",
|
||||
"en_US": "Ryujinx - Confirmation",
|
||||
"es_ES": "Ryujinx - Confirmación",
|
||||
"ar_SA": "{0} - تأكيد",
|
||||
"de_DE": "{0} - Bestätigung",
|
||||
"el_GR": "{0} - Επιβεβαίωση",
|
||||
"en_US": "{0} - Confirmation",
|
||||
"es_ES": "{0} - Confirmación",
|
||||
"fr_FR": "",
|
||||
"he_IL": "ריוג'ינקס - אישור",
|
||||
"it_IT": "Ryujinx - Conferma",
|
||||
"ja_JP": "Ryujinx - 確認",
|
||||
"ko_KR": "Ryujinx - 확인",
|
||||
"no_NO": "Ryujinx - Bekreftelse",
|
||||
"pl_PL": "Ryujinx - Potwierdzenie",
|
||||
"pt_BR": "Ryujinx - Confirmação",
|
||||
"ru_RU": "Ryujinx - Подтверждение",
|
||||
"sv_SE": "Ryujinx - Bekräfta",
|
||||
"th_TH": "Ryujinx - ยืนยัน",
|
||||
"tr_TR": "Ryujinx - Doğrulama",
|
||||
"uk_UA": "Ryujinx - Підтвердження",
|
||||
"zh_CN": "Ryujinx - 确认",
|
||||
"zh_TW": "Ryujinx - 確認"
|
||||
"he_IL": "{0} - אישור",
|
||||
"it_IT": "{0} - Conferma",
|
||||
"ja_JP": "{0} - 確認",
|
||||
"ko_KR": "{0} - 확인",
|
||||
"no_NO": "{0} - Bekreftelse",
|
||||
"pl_PL": "{0} - Potwierdzenie",
|
||||
"pt_BR": "{0} - Confirmação",
|
||||
"ru_RU": "{0} - Подтверждение",
|
||||
"sv_SE": "{0} - Bekräfta",
|
||||
"th_TH": "{0} - ยืนยัน",
|
||||
"tr_TR": "{0} - Doğrulama",
|
||||
"uk_UA": "{0} - Підтвердження",
|
||||
"zh_CN": "{0} - 确认",
|
||||
"zh_TW": "{0} - 確認"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -18800,26 +18825,26 @@
|
||||
{
|
||||
"ID": "RyujinxUpdater",
|
||||
"Translations": {
|
||||
"ar_SA": "محدث ريوجينكس",
|
||||
"de_DE": "Ryujinx - Updater",
|
||||
"el_GR": "Ryujinx Ενημερωτής",
|
||||
"en_US": "Ryujinx Updater",
|
||||
"es_ES": "Actualizador de Ryujinx",
|
||||
"fr_FR": "Mise à jour de Ryujinx",
|
||||
"he_IL": "מעדכן ריוג'ינקס",
|
||||
"it_IT": "Aggiornamento di Ryujinx",
|
||||
"ja_JP": "Ryujinx アップデータ",
|
||||
"ko_KR": "Ryujinx 업데이터",
|
||||
"no_NO": "Ryujinx Oppgradering",
|
||||
"pl_PL": "Aktualizator Ryujinx",
|
||||
"pt_BR": "Atualizador do Ryujinx",
|
||||
"ru_RU": "Ryujinx - Обновление",
|
||||
"sv_SE": "Uppdaterare för Ryujinx",
|
||||
"th_TH": "ตัวอัปเดต Ryujinx",
|
||||
"tr_TR": "Ryujinx Güncelleyicisi",
|
||||
"uk_UA": "Програма оновлення Ryujinx",
|
||||
"zh_CN": "Ryujinx 更新",
|
||||
"zh_TW": "Ryujinx 更新程式"
|
||||
"ar_SA": "محدث {0}",
|
||||
"de_DE": "",
|
||||
"el_GR": "{0} Ενημερωτής",
|
||||
"en_US": "{0} Updater",
|
||||
"es_ES": "Actualizador de {0}",
|
||||
"fr_FR": "Mise à jour de {0}",
|
||||
"he_IL": "מעדכן {0}",
|
||||
"it_IT": "Aggiornamento di {0}",
|
||||
"ja_JP": "{0} アップデータ",
|
||||
"ko_KR": "{0} 업데이터",
|
||||
"no_NO": "{0} Oppgradering",
|
||||
"pl_PL": "Aktualizator {0}",
|
||||
"pt_BR": "Atualizador do {0}",
|
||||
"ru_RU": "{0} Обновление",
|
||||
"sv_SE": "Uppdaterare för {0}",
|
||||
"th_TH": "ตัวอัปเดต {0}",
|
||||
"tr_TR": "{0} Güncelleyicisi",
|
||||
"uk_UA": "Програма оновлення {0}",
|
||||
"zh_CN": "{0} 更新",
|
||||
"zh_TW": "{0} 更新程式"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace Ryujinx.Ava.Common
|
||||
|
||||
if (publicDataNca is null)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, "Extraction failure. The NCA was not present in the selected file");
|
||||
Logger.Error?.Print(LogClass.Application, "Extraction failure. The PublicData NCA was not present in the selected file");
|
||||
|
||||
Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
@@ -349,10 +349,6 @@ namespace Ryujinx.Ava.Common
|
||||
return;
|
||||
}
|
||||
|
||||
IntegrityCheckLevel checkLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks
|
||||
? IntegrityCheckLevel.ErrorOnInvalid
|
||||
: IntegrityCheckLevel.None;
|
||||
|
||||
int index = Nca.GetSectionIndexFromType(NcaSectionType.Data, publicDataNca.Header.ContentType);
|
||||
|
||||
try
|
||||
|
||||
@@ -14,5 +14,13 @@ namespace Ryujinx.Ava.Common
|
||||
VolumeDown,
|
||||
CustomVSyncIntervalIncrement,
|
||||
CustomVSyncIntervalDecrement,
|
||||
CycleControllersPlayer1,
|
||||
CycleControllersPlayer2,
|
||||
CycleControllersPlayer3,
|
||||
CycleControllersPlayer4,
|
||||
CycleControllersPlayer5,
|
||||
CycleControllersPlayer6,
|
||||
CycleControllersPlayer7,
|
||||
CycleControllersPlayer8
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,16 @@ namespace Ryujinx.Ava.Common.Locale
|
||||
|
||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||
}
|
||||
|
||||
SetDynamicValues(LocaleKeys.DialogConfirmationTitle, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.DialogUpdaterTitle, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.DialogErrorTitle, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.DialogWarningTitle, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.DialogExitTitle, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.DialogStopEmulationTitle, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.RyujinxInfo, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.RyujinxConfirm, RyujinxApp.FullAppName);
|
||||
SetDynamicValues(LocaleKeys.RyujinxUpdater, RyujinxApp.FullAppName);
|
||||
}
|
||||
|
||||
public string this[LocaleKeys key]
|
||||
@@ -88,11 +98,16 @@ namespace Ryujinx.Ava.Common.Locale
|
||||
public static string FormatDynamicValue(LocaleKeys key, params object[] values)
|
||||
=> Instance.UpdateAndGetDynamicValue(key, values);
|
||||
|
||||
public string UpdateAndGetDynamicValue(LocaleKeys key, params object[] values)
|
||||
public void SetDynamicValues(LocaleKeys key, params object[] values)
|
||||
{
|
||||
_dynamicValues[key] = values;
|
||||
|
||||
OnPropertyChanged("Translation");
|
||||
}
|
||||
|
||||
public string UpdateAndGetDynamicValue(LocaleKeys key, params object[] values)
|
||||
{
|
||||
SetDynamicValues(key, values);
|
||||
|
||||
return this[key];
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ namespace Ryujinx.Ava
|
||||
{
|
||||
public class RyujinxApp : Application
|
||||
{
|
||||
internal static string FormatTitle(LocaleKeys? windowTitleKey = null)
|
||||
internal static string FormatTitle(LocaleKeys? windowTitleKey = null, bool includeVersion = true)
|
||||
=> windowTitleKey is null
|
||||
? $"{FullAppName} {Program.Version}"
|
||||
: $"{FullAppName} {Program.Version} - {LocaleManager.Instance[windowTitleKey.Value]}";
|
||||
? $"{FullAppName}{(includeVersion ? $" {Program.Version}" : string.Empty)}"
|
||||
: $"{FullAppName}{(includeVersion ? $" {Program.Version}" : string.Empty)} - {LocaleManager.Instance[windowTitleKey.Value]}";
|
||||
|
||||
public static readonly string FullAppName = ReleaseInformation.IsCanaryBuild ? "Ryujinx Canary" : "Ryujinx";
|
||||
public static readonly string FullAppName = string.Intern(ReleaseInformation.IsCanaryBuild ? "Ryujinx Canary" : "Ryujinx");
|
||||
|
||||
public static MainWindow MainWindow => Current!
|
||||
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using DynamicData;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Models.Input
|
||||
{
|
||||
@@ -28,8 +33,15 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
|
||||
[ObservableProperty] private Key _customVSyncIntervalDecrement;
|
||||
|
||||
public ObservableCollection<CycleController> CycleControllers { get; set; } = new ObservableCollection<CycleController>();
|
||||
public ICommand AddCycleController { get; set; }
|
||||
public ICommand RemoveCycleController { get; set; }
|
||||
public bool CanRemoveCycleController => CycleControllers.Count > 0 && CycleControllers.Count < 8;
|
||||
|
||||
public HotkeyConfig(KeyboardHotkeys config)
|
||||
{
|
||||
AddCycleController = MiniCommand.Create(() => CycleControllers.Add(new CycleController(CycleControllers.Count + 1, Key.Unbound)));
|
||||
RemoveCycleController = MiniCommand.Create(() => CycleControllers.Remove(CycleControllers.Last()));
|
||||
if (config == null)
|
||||
return;
|
||||
|
||||
@@ -44,6 +56,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
VolumeDown = config.VolumeDown;
|
||||
CustomVSyncIntervalIncrement = config.CustomVSyncIntervalIncrement;
|
||||
CustomVSyncIntervalDecrement = config.CustomVSyncIntervalDecrement;
|
||||
CycleControllers.AddRange((config.CycleControllers ?? []).Select((x, i) => new CycleController(i + 1, x)));
|
||||
}
|
||||
|
||||
public KeyboardHotkeys GetConfig() =>
|
||||
@@ -60,6 +73,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
VolumeDown = VolumeDown,
|
||||
CustomVSyncIntervalIncrement = CustomVSyncIntervalIncrement,
|
||||
CustomVSyncIntervalDecrement = CustomVSyncIntervalDecrement,
|
||||
CycleControllers = CycleControllers.Select(x => x.Hotkey).ToList()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
48
src/Ryujinx/UI/ViewModels/CycleController.cs
Normal file
48
src/Ryujinx/UI/ViewModels/CycleController.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
public class CycleController : BaseModel
|
||||
{
|
||||
private string _player;
|
||||
private Key _hotkey;
|
||||
|
||||
public string Player
|
||||
{
|
||||
get => _player;
|
||||
set
|
||||
{
|
||||
_player = value;
|
||||
OnPropertyChanged(nameof(Player));
|
||||
}
|
||||
}
|
||||
|
||||
public Key Hotkey
|
||||
{
|
||||
get => _hotkey;
|
||||
set
|
||||
{
|
||||
_hotkey = value;
|
||||
OnPropertyChanged(nameof(Hotkey));
|
||||
}
|
||||
}
|
||||
|
||||
public CycleController(int v, Key x)
|
||||
{
|
||||
Player = v switch
|
||||
{
|
||||
1 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer1],
|
||||
2 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer2],
|
||||
3 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer3],
|
||||
4 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer4],
|
||||
5 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer5],
|
||||
6 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer6],
|
||||
7 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer7],
|
||||
8 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer8],
|
||||
_ => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer] + " " + v
|
||||
};
|
||||
Hotkey = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -897,5 +897,13 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
|
||||
AvaloniaKeyboardDriver.Dispose();
|
||||
}
|
||||
|
||||
public void CyclePlayerDevice(int player)
|
||||
{
|
||||
LoadDevices();
|
||||
PlayerId = (PlayerIndex)player;
|
||||
Device = (Device + 1) % Devices.Count;
|
||||
Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsHotkeysView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -15,17 +15,18 @@
|
||||
<viewModels:SettingsViewModel />
|
||||
</Design.DataContext>
|
||||
<UserControl.Styles>
|
||||
<Style Selector="StackPanel > StackPanel">
|
||||
<Style Selector="StackPanel StackPanel">
|
||||
<Setter Property="Margin" Value="10, 0, 0, 0" />
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
<Style Selector="StackPanel > StackPanel > TextBlock">
|
||||
<Style Selector="StackPanel StackPanel > TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Width" Value="230" />
|
||||
</Style>
|
||||
<Style Selector="ToggleButton">
|
||||
<Style Selector="ToggleButton, Button">
|
||||
<Setter Property="Width" Value="90" />
|
||||
<Setter Property="Height" Value="27" />
|
||||
<Setter Property="Padding" Value="0,5,0,5" /> <!-- Added vertical padding -->
|
||||
</Style>
|
||||
<Style Selector="ToggleButton > TextBlock">
|
||||
<Setter Property="TextAlignment" Value="Center" />
|
||||
@@ -39,79 +40,123 @@
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Border Classes="settings">
|
||||
<StackPanel
|
||||
Name="SettingButtons"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Vertical"
|
||||
Spacing="10">
|
||||
Spacing="10"
|
||||
Name="SettingButtons">
|
||||
<TextBlock
|
||||
Classes="h1"
|
||||
Text="{ext:Locale SettingsTabHotkeysHotkeys}" />
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleVSyncModeHotkey}" />
|
||||
<ToggleButton Name="ToggleVSyncMode">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ToggleVSyncMode, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
<StackPanel
|
||||
Margin="10,0,0,0"
|
||||
Spacing="10"
|
||||
Orientation="Vertical">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleVSyncModeHotkey}" />
|
||||
<ToggleButton Name="ToggleVSyncMode">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ToggleVSyncMode, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysScreenshotHotkey}" />
|
||||
<ToggleButton Name="Screenshot">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysShowUiHotkey}" />
|
||||
<ToggleButton Name="ShowUI">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysPauseHotkey}" />
|
||||
<ToggleButton Name="Pause">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleMuteHotkey}" />
|
||||
<ToggleButton Name="ToggleMute">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleUpHotkey}" />
|
||||
<ToggleButton Name="ResScaleUp">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleDownHotkey}" />
|
||||
<ToggleButton Name="ResScaleDown">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeUpHotkey}" />
|
||||
<ToggleButton Name="VolumeUp">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeDownHotkey}" />
|
||||
<ToggleButton Name="VolumeDown">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysIncrementCustomVSyncIntervalHotkey}" />
|
||||
<ToggleButton Name="CustomVSyncIntervalIncrement">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalIncrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysDecrementCustomVSyncIntervalHotkey}" />
|
||||
<ToggleButton Name="CustomVSyncIntervalDecrement">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalDecrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysScreenshotHotkey}" />
|
||||
<ToggleButton Name="Screenshot">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysShowUiHotkey}" />
|
||||
<ToggleButton Name="ShowUI">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysPauseHotkey}" />
|
||||
<ToggleButton Name="Pause">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleMuteHotkey}" />
|
||||
<ToggleButton Name="ToggleMute">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleUpHotkey}" />
|
||||
<ToggleButton Name="ResScaleUp">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleDownHotkey}" />
|
||||
<ToggleButton Name="ResScaleDown">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeUpHotkey}" />
|
||||
<ToggleButton Name="VolumeUp">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeDownHotkey}" />
|
||||
<ToggleButton Name="VolumeDown">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysIncrementCustomVSyncIntervalHotkey}" />
|
||||
<ToggleButton Name="CustomVSyncIntervalIncrement">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalIncrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysDecrementCustomVSyncIntervalHotkey}" />
|
||||
<ToggleButton Name="CustomVSyncIntervalDecrement">
|
||||
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalDecrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
<Separator Height="1" />
|
||||
<StackPanel Margin="0">
|
||||
<TextBlock
|
||||
Classes="h1"
|
||||
Text="{ext:Locale SettingsTabHotkeysCycleControllers}" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<Button
|
||||
Content="{ext:Locale SettingsTabGeneralAdd}"
|
||||
Margin="10,0,0,0"
|
||||
Command="{Binding KeyboardHotkey.AddCycleController}" />
|
||||
<Button
|
||||
Content="{ext:Locale SettingsTabGeneralRemove}"
|
||||
IsEnabled="{Binding KeyboardHotkey.CanRemoveCycleController}"
|
||||
Command="{Binding KeyboardHotkey.RemoveCycleController}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<ItemsControl ItemsSource="{Binding KeyboardHotkey.CycleControllers}"
|
||||
Name="CycleControllers">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel
|
||||
Margin="10,0,0,0"
|
||||
Orientation="Vertical"
|
||||
Spacing="10" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Player}" />
|
||||
<ToggleButton>
|
||||
<TextBlock
|
||||
Text="{Binding Hotkey, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -3,11 +3,14 @@ using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.VisualTree;
|
||||
using DynamicData;
|
||||
using Ryujinx.Ava.Input;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Input;
|
||||
using Ryujinx.Input.Assigner;
|
||||
using System.Linq;
|
||||
using Button = Ryujinx.Input.Button;
|
||||
using Key = Ryujinx.Common.Configuration.Hid.Key;
|
||||
|
||||
@@ -21,16 +24,21 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
||||
public SettingsHotkeysView()
|
||||
{
|
||||
InitializeComponent();
|
||||
RegisterEvents();
|
||||
_avaloniaKeyboardDriver = new AvaloniaKeyboardDriver(this);
|
||||
CycleControllers.LayoutUpdated += (_, _1) => RegisterEvents();
|
||||
}
|
||||
|
||||
private void RegisterEvents()
|
||||
{
|
||||
foreach (ILogical visual in SettingButtons.GetLogicalDescendants())
|
||||
{
|
||||
if (visual is ToggleButton button and not CheckBox)
|
||||
{
|
||||
button.IsCheckedChanged -= Button_IsCheckedChanged;
|
||||
button.IsCheckedChanged += Button_IsCheckedChanged;
|
||||
}
|
||||
}
|
||||
|
||||
_avaloniaKeyboardDriver = new AvaloniaKeyboardDriver(this);
|
||||
}
|
||||
|
||||
protected override void OnPointerReleased(PointerReleasedEventArgs e)
|
||||
@@ -116,6 +124,13 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
||||
case "CustomVSyncIntervalDecrement":
|
||||
viewModel.KeyboardHotkey.CustomVSyncIntervalDecrement = buttonValue.AsHidType<Key>();
|
||||
break;
|
||||
default:
|
||||
var index = button.FindAncestorOfType<ItemsControl>().GetLogicalDescendants().OfType<ToggleButton>().IndexOf(button);
|
||||
if (index >= 0 && viewModel.KeyboardHotkey.CycleControllers != null)
|
||||
{
|
||||
viewModel.KeyboardHotkey.CycleControllers[index].Hotkey = buttonValue.AsHidType<Key>();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
LinuxHelper.RecommendedVmMaxMapCount);
|
||||
|
||||
UserResult response = await ContentDialogHelper.ShowTextDialog(
|
||||
$"Ryujinx - {LocaleManager.Instance[LocaleKeys.LinuxVmMaxMapCountDialogTitle]}",
|
||||
RyujinxApp.FormatTitle(LocaleKeys.LinuxVmMaxMapCountDialogTitle, false),
|
||||
LocaleManager.Instance[LocaleKeys.LinuxVmMaxMapCountDialogTextPrimary],
|
||||
LocaleManager.Instance[LocaleKeys.LinuxVmMaxMapCountDialogTextSecondary],
|
||||
LocaleManager.Instance[LocaleKeys.LinuxVmMaxMapCountDialogButtonUntilRestart],
|
||||
|
||||
Reference in New Issue
Block a user