From d2ef196a3bb830f4047958463403f818e6bb2cd0 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 17 Dec 2017 21:11:54 -0500 Subject: [PATCH] Input: Added "keyboard mode" toggle to improve keyboard input --- Core/BaseControlDevice.cpp | 12 ++++++- Core/BaseControlDevice.h | 2 ++ Core/ControlManager.cpp | 15 +++++++++ Core/ControlManager.h | 1 + Core/EmulationSettings.cpp | 2 ++ Core/EmulationSettings.h | 24 ++++++++++++++ Core/FamilyBasicKeyboard.h | 5 +++ Core/MessageManager.cpp | 24 ++++++++++++++ Core/ShortcutKeyHandler.cpp | 31 +++++++++++++++++-- Core/ShortcutKeyHandler.h | 2 ++ Core/SuborKeyboard.h | 5 +++ GUI.NET/Config/PreferenceInfo.cs | 1 + GUI.NET/Dependencies/resources.ca.xml | 2 ++ GUI.NET/Dependencies/resources.en.xml | 2 ++ GUI.NET/Dependencies/resources.es.xml | 2 ++ GUI.NET/Dependencies/resources.fr.xml | 2 ++ GUI.NET/Dependencies/resources.ja.xml | 2 ++ GUI.NET/Dependencies/resources.pt.xml | 2 ++ GUI.NET/Dependencies/resources.ru.xml | 2 ++ GUI.NET/Dependencies/resources.uk.xml | 2 ++ GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs | 1 + GUI.NET/InteropEmu.cs | 1 + 22 files changed, 138 insertions(+), 4 deletions(-) diff --git a/Core/BaseControlDevice.cpp b/Core/BaseControlDevice.cpp index a8fe4eca..8fcd9519 100644 --- a/Core/BaseControlDevice.cpp +++ b/Core/BaseControlDevice.cpp @@ -148,6 +148,11 @@ void BaseControlDevice::EnsureCapacity(int32_t minBitCount) } } +bool BaseControlDevice::IsKeyboard() +{ + return false; +} + bool BaseControlDevice::HasCoordinates() { return false; @@ -207,7 +212,12 @@ void BaseControlDevice::InvertBit(uint8_t bit) void BaseControlDevice::SetPressedState(uint8_t bit, uint32_t keyCode) { - if(EmulationSettings::InputEnabled() && KeyManager::IsKeyPressed(keyCode)) { + if(IsKeyboard() && keyCode < 0x200 && !EmulationSettings::IsKeyboardMode()) { + //Prevent keyboard device input when keyboard mode is off + return; + } + + if(EmulationSettings::InputEnabled() && (!EmulationSettings::IsKeyboardMode() || keyCode >= 0x200 || IsKeyboard()) && KeyManager::IsKeyPressed(keyCode)) { SetBit(bit); } } diff --git a/Core/BaseControlDevice.h b/Core/BaseControlDevice.h index 72f5e962..b169e6b9 100644 --- a/Core/BaseControlDevice.h +++ b/Core/BaseControlDevice.h @@ -56,6 +56,8 @@ public: bool IsPressed(uint8_t bit); MousePosition GetCoordinates(); + + virtual bool IsKeyboard(); void ClearState(); void SetBit(uint8_t bit); diff --git a/Core/ControlManager.cpp b/Core/ControlManager.cpp index 305e35f4..fd10f55d 100644 --- a/Core/ControlManager.cpp +++ b/Core/ControlManager.cpp @@ -172,6 +172,8 @@ void ControlManager::UpdateControlDevices() //Reset update flag EmulationSettings::NeedControllerUpdate(); + bool hadKeyboard = HasKeyboard(); + ControlManager::_controlDevices.clear(); ControlManager::RegisterControlDevice(_systemActionManager); @@ -203,6 +205,13 @@ void ControlManager::UpdateControlDevices() ControlManager::RegisterControlDevice(expDevice); } + bool hasKeyboard = HasKeyboard(); + if(!hasKeyboard) { + EmulationSettings::DisableKeyboardMode(); + } else if(!hadKeyboard && hasKeyboard) { + EmulationSettings::EnableKeyboardMode(); + } + if(_mapperControlDevice) { ControlManager::RegisterControlDevice(_mapperControlDevice); } @@ -213,6 +222,12 @@ void ControlManager::UpdateControlDevices() } } +bool ControlManager::HasKeyboard() +{ + shared_ptr expDevice = GetControlDevice(BaseControlDevice::ExpDevicePort); + return expDevice && expDevice->IsKeyboard(); +} + uint8_t ControlManager::GetOpenBusMask(uint8_t port) { //"In the NES and Famicom, the top three (or five) bits are not driven, and so retain the bits of the previous byte on the bus. diff --git a/Core/ControlManager.h b/Core/ControlManager.h index d3385faa..b40767be 100644 --- a/Core/ControlManager.h +++ b/Core/ControlManager.h @@ -62,6 +62,7 @@ public: static shared_ptr GetControlDevice(uint8_t port); static shared_ptr CreateControllerDevice(ControllerType type, uint8_t port); static shared_ptr CreateExpansionDevice(ExpansionPortDevice type); + static bool HasKeyboard(); virtual void GetMemoryRanges(MemoryRanges &ranges) override { diff --git a/Core/EmulationSettings.cpp b/Core/EmulationSettings.cpp index d12d480e..b195a503 100644 --- a/Core/EmulationSettings.cpp +++ b/Core/EmulationSettings.cpp @@ -56,6 +56,8 @@ bool EmulationSettings::_nsfDisableApuIrqs = true; uint32_t EmulationSettings::_autoSaveDelay = 5; bool EmulationSettings::_autoSaveNotify = false; +bool EmulationSettings::_keyboardModeEnabled = false; + SimpleLock EmulationSettings::_shortcutLock; std::unordered_map EmulationSettings::_emulatorKeys[2]; std::unordered_map> EmulationSettings::_shortcutSupersets[2]; diff --git a/Core/EmulationSettings.h b/Core/EmulationSettings.h index 02cf423b..26476203 100644 --- a/Core/EmulationSettings.h +++ b/Core/EmulationSettings.h @@ -362,6 +362,7 @@ enum class EmulatorShortcut ToggleAudio, ToggleFastForward, ToggleRewind, + ToggleKeyboardMode, RunSingleFrame, @@ -586,6 +587,8 @@ private: static uint32_t _autoSaveDelay; static bool _autoSaveNotify; + static bool _keyboardModeEnabled; + static std::unordered_map _emulatorKeys[2]; static std::unordered_map> _shortcutSupersets[2]; @@ -1338,4 +1341,25 @@ public: { return _dipSwitches; } + + static bool IsKeyboardMode() + { + return _keyboardModeEnabled; + } + + static void EnableKeyboardMode() + { + if(!_keyboardModeEnabled) { + _keyboardModeEnabled = true; + MessageManager::DisplayMessage("Input", "KeyboardModeEnabled"); + } + } + + static void DisableKeyboardMode() + { + if(_keyboardModeEnabled) { + _keyboardModeEnabled = false; + MessageManager::DisplayMessage("Input", "KeyboardModeDisabled"); + } + } }; diff --git a/Core/FamilyBasicKeyboard.h b/Core/FamilyBasicKeyboard.h index fd48476c..752a62d5 100644 --- a/Core/FamilyBasicKeyboard.h +++ b/Core/FamilyBasicKeyboard.h @@ -87,6 +87,11 @@ public: { } + bool IsKeyboard() override + { + return true; + } + uint8_t ReadRAM(uint16_t addr) override { if(addr == 0x4017) { diff --git a/Core/MessageManager.cpp b/Core/MessageManager.cpp index f3659c89..8f0173a3 100644 --- a/Core/MessageManager.cpp +++ b/Core/MessageManager.cpp @@ -12,6 +12,7 @@ std::unordered_map MessageManager::_enResources = { { "Error", u8"Error" }, { "GameInfo", u8"Game Info" }, { "GameLoaded", u8"Game loaded" }, + { "Input", u8"Input" }, { "Patch", u8"Patch" }, { "Movies", u8"Movies" }, { "NetPlay", u8"Net Play" }, @@ -38,6 +39,8 @@ std::unordered_map MessageManager::_enResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Frame" }, { "GameCrash", u8"Game has crashed (%1)" }, + { "KeyboardModeDisabled", u8"Keyboard mode disabled." }, + { "KeyboardModeEnabled", u8"Keyboard mode enabled." }, { "Lag", u8"Lag" }, { "Mapper", u8"Mapper: %1, SubMapper: %2" }, { "MovieEnded", u8"Movie ended." }, @@ -82,6 +85,7 @@ std::unordered_map MessageManager::_frResources = { { "Error", u8"Erreur" }, { "GameInfo", u8"Info sur le ROM" }, { "GameLoaded", u8"Jeu chargé" }, + { "Input", u8"Contrôles" }, { "Patch", u8"Patch" }, { "Movies", u8"Films" }, { "NetPlay", u8"Jeu en ligne" }, @@ -108,6 +112,8 @@ std::unordered_map MessageManager::_frResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Image" }, { "GameCrash", u8"Le jeu a planté (%1)" }, + { "KeyboardModeDisabled", u8"Mode clavier activé." }, + { "KeyboardModeEnabled", u8"Mode clavier désactivé." }, { "Lag", u8"Lag" }, { "Mapper", u8"Mapper : %1, SubMapper : %2" }, { "MovieEnded", u8"Fin du film." }, @@ -152,6 +158,7 @@ std::unordered_map MessageManager::_jaResources = { { "Error", u8"エラー" }, { "GameInfo", u8"ゲーム情報" }, { "GameLoaded", u8"ゲーム開始" }, + { "Input", u8"コントローラ" }, { "Patch", u8"パッチ" }, { "Movies", u8"動画" }, { "NetPlay", u8"ネットプレー" }, @@ -178,6 +185,8 @@ std::unordered_map MessageManager::_jaResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"フレーム" }, { "GameCrash", u8"ゲームは停止しました (%1)" }, + { "KeyboardModeDisabled", u8"キーボードモードを無効にしました。" }, + { "KeyboardModeEnabled", u8"キーボードモードを有効にしました。" }, { "Lag", u8"ラグ" }, { "Mapper", u8"Mapper: %1, SubMapper: %2" }, { "MovieEnded", u8"動画の再生が終了しました。" }, @@ -222,6 +231,7 @@ std::unordered_map MessageManager::_ruResources = { { "Error", u8"Ошибка" }, { "GameInfo", u8"Информация об игре" }, { "GameLoaded", u8"Игра загружена" }, + { "Input", u8"Input" }, { "Patch", u8"Patch" }, { "Movies", u8"Записи" }, { "NetPlay", u8"Игра по сети" }, @@ -248,6 +258,8 @@ std::unordered_map MessageManager::_ruResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Frame" }, { "GameCrash", u8"Игра была аварийно завершена (%1)" }, + { "KeyboardModeDisabled", u8"Keyboard mode disabled." }, + { "KeyboardModeEnabled", u8"Keyboard mode enabled." }, { "Lag", u8"Лаг" }, { "Mapper", u8"Mapper: %1, SubMapper: %2" }, { "MovieEnded", u8"Воспроизведение окончено." }, @@ -292,6 +304,7 @@ std::unordered_map MessageManager::_esResources = { { "Error", u8"Error" }, { "GameInfo", u8"Info del Juego" }, { "GameLoaded", u8"Juego Cargado" }, + { "Input", u8"Input" }, { "Patch", u8"Patch" }, { "Movies", u8"Videos" }, { "NetPlay", u8"Juego Online" }, @@ -318,6 +331,8 @@ std::unordered_map MessageManager::_esResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Frame" }, { "GameCrash", u8"El juego se ha colgado (%1)" }, + { "KeyboardModeDisabled", u8"Keyboard mode disabled." }, + { "KeyboardModeEnabled", u8"Keyboard mode enabled." }, { "Lag", u8"Lag" }, { "Mapper", u8"Mapeado: %1, SubMapeado: %2" }, { "MovieEnded", u8"Video terminado." }, @@ -363,6 +378,7 @@ std::unordered_map MessageManager::_ukResources = { { "Error", u8"Помилка" }, { "GameInfo", u8"Інформація про гру" }, { "GameLoaded", u8"Гра завантажена" }, + { "Input", u8"Input" }, { "Patch", u8"Patch" }, { "Movies", u8"Записи" }, { "NetPlay", u8"Гра по мережi" }, @@ -389,6 +405,8 @@ std::unordered_map MessageManager::_ukResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Frame" }, { "GameCrash", u8"Гра була аварійно завершена (%1)" }, + { "KeyboardModeDisabled", u8"Keyboard mode disabled." }, + { "KeyboardModeEnabled", u8"Keyboard mode enabled." }, { "Lag", u8"Лаг" }, { "Mapper", u8"Mapper: %1, SubMapper: %2" }, { "MovieEnded", u8"Відтворення закінчено." }, @@ -433,6 +451,7 @@ std::unordered_map MessageManager::_ptResources = { { "Error", u8"Erro" }, { "GameInfo", u8"Informações do Jogo" }, { "GameLoaded", u8"Jogo Carregado" }, + { "Input", u8"Input" }, { "Patch", u8"Patch" }, { "Movies", u8"Vídeos" }, { "NetPlay", u8"Jogo Online" }, @@ -459,6 +478,8 @@ std::unordered_map MessageManager::_ptResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Frame" }, { "GameCrash", u8"O jogo crashou (%1)" }, + { "KeyboardModeDisabled", u8"Keyboard mode disabled." }, + { "KeyboardModeEnabled", u8"Keyboard mode enabled." }, { "Lag", u8"Lag" }, { "Mapper", u8"Mapeado: %1, SubMapeado: %2" }, { "MovieEnded", u8"Vídeo terminado." }, @@ -503,6 +524,7 @@ std::unordered_map MessageManager::_caResources = { { "Error", u8"Error" }, { "GameInfo", u8"Informació del joc" }, { "GameLoaded", u8"Joc carregat" }, + { "Input", u8"Input" }, { "Patch", u8"Pedaç" }, { "Movies", u8"Pel·lícules" }, { "NetPlay", u8"Joc en línia" }, @@ -529,6 +551,8 @@ std::unordered_map MessageManager::_caResources = { { "EmulationSpeedPercent", u8"%1%" }, { "Frame", u8"Fotograma" }, { "GameCrash", u8"El joc ha fallat (%1)" }, + { "KeyboardModeDisabled", u8"Keyboard mode disabled." }, + { "KeyboardModeEnabled", u8"Keyboard mode enabled." }, { "Lag", u8"Retard" }, { "Mapper", u8"Mapat: %1, SubMapat: %2" }, { "MovieEnded", u8"Final de pel·lícula." }, diff --git a/Core/ShortcutKeyHandler.cpp b/Core/ShortcutKeyHandler.cpp index 5b649f9e..57b23028 100644 --- a/Core/ShortcutKeyHandler.cpp +++ b/Core/ShortcutKeyHandler.cpp @@ -10,10 +10,14 @@ #include "FdsSystemActionManager.h" #include "VsSystemActionManager.h" #include "MovieManager.h" +#include "ControlManager.h" ShortcutKeyHandler::ShortcutKeyHandler() { _keySetIndex = 0; + _isKeyUp = false; + _keyboardMode = false; + _stopThread = false; _thread = std::thread([=]() { while(!_stopThread) { @@ -52,9 +56,18 @@ bool ShortcutKeyHandler::IsKeyPressed(KeyCombination comb) return false; } - return KeyManager::IsKeyPressed(comb.Key1) && - (comb.Key2 == 0 || KeyManager::IsKeyPressed(comb.Key2)) && - (comb.Key3 == 0 || KeyManager::IsKeyPressed(comb.Key3)); + return IsKeyPressed(comb.Key1) && + (comb.Key2 == 0 || IsKeyPressed(comb.Key2)) && + (comb.Key3 == 0 || IsKeyPressed(comb.Key3)); +} + +bool ShortcutKeyHandler::IsKeyPressed(uint32_t keyCode) +{ + if(keyCode >= 0x200 || !_keyboardMode) { + return KeyManager::IsKeyPressed(keyCode); + } else { + return false; + } } bool ShortcutKeyHandler::DetectKeyPress(EmulatorShortcut shortcut) @@ -85,6 +98,18 @@ void ShortcutKeyHandler::CheckMappedKeys() bool isNetplayClient = GameClient::Connected(); bool isMovieActive = MovieManager::Playing() || MovieManager::Recording(); + _keyboardMode = false; + if(DetectKeyPress(EmulatorShortcut::ToggleKeyboardMode)) { + if(EmulationSettings::IsKeyboardMode()) { + EmulationSettings::DisableKeyboardMode(); + } else { + if(ControlManager::HasKeyboard()) { + EmulationSettings::EnableKeyboardMode(); + } + } + } + _keyboardMode = EmulationSettings::IsKeyboardMode(); + //Let the UI handle these shortcuts for(uint64_t i = (uint64_t)EmulatorShortcut::SwitchDiskSide; i <= (uint64_t)EmulatorShortcut::OpenTraceLogger; i++) { if(DetectKeyPress((EmulatorShortcut)i)) { diff --git a/Core/ShortcutKeyHandler.h b/Core/ShortcutKeyHandler.h index 4aff92ca..f39aebb4 100644 --- a/Core/ShortcutKeyHandler.h +++ b/Core/ShortcutKeyHandler.h @@ -16,6 +16,7 @@ private: vector _pressedKeys; vector _lastPressedKeys; bool _isKeyUp; + bool _keyboardMode; std::unordered_set _keysDown[2]; std::unordered_set _prevKeysDown[2]; @@ -24,6 +25,7 @@ private: bool IsKeyPressed(EmulatorShortcut key); bool IsKeyPressed(KeyCombination comb); + bool IsKeyPressed(uint32_t keyCode); bool DetectKeyPress(EmulatorShortcut key); bool DetectKeyRelease(EmulatorShortcut key); diff --git a/Core/SuborKeyboard.h b/Core/SuborKeyboard.h index 5b1d6eaa..416a2d73 100644 --- a/Core/SuborKeyboard.h +++ b/Core/SuborKeyboard.h @@ -91,6 +91,11 @@ public: { } + bool IsKeyboard() override + { + return true; + } + uint8_t ReadRAM(uint16_t addr) override { if(addr == 0x4017) { diff --git a/GUI.NET/Config/PreferenceInfo.cs b/GUI.NET/Config/PreferenceInfo.cs index 0bd98e97..91d7603e 100644 --- a/GUI.NET/Config/PreferenceInfo.cs +++ b/GUI.NET/Config/PreferenceInfo.cs @@ -101,6 +101,7 @@ namespace Mesen.GUI.Config ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.ToggleFps, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F10") })); ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.ToggleFullscreen, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F11") })); + ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.ToggleKeyboardMode, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Scroll Lock") })); ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.TakeScreenshot, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F12") })); ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadRandomGame, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("Ins") })); diff --git a/GUI.NET/Dependencies/resources.ca.xml b/GUI.NET/Dependencies/resources.ca.xml index 831a9fb7..6b147a72 100644 --- a/GUI.NET/Dependencies/resources.ca.xml +++ b/GUI.NET/Dependencies/resources.ca.xml @@ -738,6 +738,7 @@ FDS - Insereix el següent disc VS - Insereix moneda (1) VS - Insereix moneda (2) + Input Barcode VS - Botó de servei Selecciona la següent partida guardada Selecciona l'anterior partida guardada @@ -762,6 +763,7 @@ Mostra/Amaga la visualització en pantalla (OSD) Mostra/Amaga la capa de fons Mostra/Amaga la capa de sprites + Toggle Keyboard Mode Activa/Desactiva la velocitat màxima Carrega un joc a l'atzar Desa la partida - Posició 1 diff --git a/GUI.NET/Dependencies/resources.en.xml b/GUI.NET/Dependencies/resources.en.xml index 84b50c5b..e968aaf8 100644 --- a/GUI.NET/Dependencies/resources.en.xml +++ b/GUI.NET/Dependencies/resources.en.xml @@ -104,6 +104,7 @@ FDS - Insert Next Disk VS - Insert Coin 1 VS - Insert Coin 2 + Input Barcode VS - Service Button Select Next Save Slot Select Previous Save Slot @@ -128,6 +129,7 @@ Toggle OSD (On-Screen Display) Toggle Background Layer Toggle Sprite Layer + Toggle Keyboard Mode Toggle Maximum Speed Load Random Game diff --git a/GUI.NET/Dependencies/resources.es.xml b/GUI.NET/Dependencies/resources.es.xml index 46d7768e..5132102e 100644 --- a/GUI.NET/Dependencies/resources.es.xml +++ b/GUI.NET/Dependencies/resources.es.xml @@ -757,6 +757,7 @@ FDS - Insertar siguiente disco VS - Insertar moneda (1) VS - Insertar moneda (2) + Input Barcode VS - Botón de servicio Ir a posición de guardado siguiente Ir a posición de guardado anterior @@ -781,6 +782,7 @@ Alternar OSD (Información en pantalla) Alternar capa de fondo Alternar capa de sprite + Toggle Keyboard Mode Alternar velocidad máxima Cargar juego aleatorio Guardar partida - Hueco 1 diff --git a/GUI.NET/Dependencies/resources.fr.xml b/GUI.NET/Dependencies/resources.fr.xml index ee27f1e3..b87f316b 100644 --- a/GUI.NET/Dependencies/resources.fr.xml +++ b/GUI.NET/Dependencies/resources.fr.xml @@ -770,6 +770,7 @@ FDS - Insérer le disque suivant VS - Insérer une pièce (1) VS - Insérer une pièce (2) + Entrer un code-barres VS - Bouton de service Position de sauvegarde suivante Position de sauvegarde précédente @@ -794,6 +795,7 @@ Activer/désactiver les messages à l'écran (OSD) Activer/désactiver l'arrière-plan Activer/désactiver les sprites + Activer/désactiver le mode clavier Activer/désactiver la vitesse maximale Ouvrir un jeu aléatoire Sauvegarde d'état - Position 1 diff --git a/GUI.NET/Dependencies/resources.ja.xml b/GUI.NET/Dependencies/resources.ja.xml index ef47af00..b557dc4d 100644 --- a/GUI.NET/Dependencies/resources.ja.xml +++ b/GUI.NET/Dependencies/resources.ja.xml @@ -753,6 +753,7 @@ FDS - 次のディスクを入れる VS - インサートコイン 1 VS - インサートコイン 2 + バーコードを入力 VS - サービスボタン 次のクイックセーブスロットを選ぶ 前のクイックセーブスロットを選ぶ @@ -777,6 +778,7 @@ オンスクリーン表示を無効・有効にする バックグラウンドレイヤー表示 スプライトレイヤー表示 + キーボードモードを無効・有効にする 最高速度を無効・有効にする ランダムゲームを開く クイックセーブスロット1に保存する diff --git a/GUI.NET/Dependencies/resources.pt.xml b/GUI.NET/Dependencies/resources.pt.xml index 0ed5b9ee..c5df5275 100644 --- a/GUI.NET/Dependencies/resources.pt.xml +++ b/GUI.NET/Dependencies/resources.pt.xml @@ -754,6 +754,7 @@ FDS - Inserir próximo disco VS - Inserir moeda (1) VS - Inserir moeda (2) + Input Barcode VS - Botão de serviço Ir ao próximo estado salvo Ir ao estado salvo anterior @@ -778,6 +779,7 @@ Alternar OSD (Menu na tela) Alternar camada de fundo Alternar camada de sprite + Toggle Keyboard Mode Alternar velocidade máxima Carrear jogo aleatório Salvar estado - Posição 1 diff --git a/GUI.NET/Dependencies/resources.ru.xml b/GUI.NET/Dependencies/resources.ru.xml index 957abc3e..648e330b 100644 --- a/GUI.NET/Dependencies/resources.ru.xml +++ b/GUI.NET/Dependencies/resources.ru.xml @@ -758,6 +758,7 @@ FDS - Вставить следующий диск VS - Вставить монету в слот 1 VS - Вставить монету в слот 2 + Input Barcode VS - Сервисная кнопка Следующий слот для сохранений Предыдущий слот для сохранений @@ -782,6 +783,7 @@ Toggle OSD (On-Screen Display) Toggle Background Layer Toggle Sprite Layer + Toggle Keyboard Mode Toggle Maximum Speed Load Random Game Save State - Slot 1 diff --git a/GUI.NET/Dependencies/resources.uk.xml b/GUI.NET/Dependencies/resources.uk.xml index b243a65f..c2858434 100644 --- a/GUI.NET/Dependencies/resources.uk.xml +++ b/GUI.NET/Dependencies/resources.uk.xml @@ -758,6 +758,7 @@ FDS - Вставити наступний диск VS - Вставити монету в слот 1 VS - Вставити монету в слот 2 + Input Barcode VS - Сервісна кнопка Наступний слот для збережень Попередній слот для збережень @@ -782,6 +783,7 @@ Переключити OSD (Екранне меню) Переключити Background Переключити Sprite Layer + Toggle Keyboard Mode Переключити максимальну швидкість Завантажити випадкову гру Save State - Slot 1 diff --git a/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs b/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs index c9dc391e..4f39e617 100644 --- a/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs +++ b/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs @@ -74,6 +74,7 @@ namespace Mesen.GUI.Forms.Config EmulatorShortcut.ToggleSprites, EmulatorShortcut.ToggleCheats, EmulatorShortcut.ToggleAudio, + EmulatorShortcut.ToggleKeyboardMode, EmulatorShortcut.MaxSpeed, EmulatorShortcut.IncreaseSpeed, diff --git a/GUI.NET/InteropEmu.cs b/GUI.NET/InteropEmu.cs index 87c4196f..252eab3a 100644 --- a/GUI.NET/InteropEmu.cs +++ b/GUI.NET/InteropEmu.cs @@ -1524,6 +1524,7 @@ namespace Mesen.GUI ToggleAudio, ToggleFastForward, ToggleRewind, + ToggleKeyboardMode, RunSingleFrame,