--- nono/vm/keyboard.cpp 2026/04/29 17:05:51 1.1.1.17 +++ nono/vm/keyboard.cpp 2026/04/29 17:05:55 1.1.1.18 @@ -142,11 +142,9 @@ Keyboard::~Keyboard() bool Keyboard::Init() { - // LUNA ならスケジューラとの連携が必要。 - // キーリピートをソフトウェアで処理しないといけないため。 - if (gMainApp.Has(VMCap::LUNA)) { - syncer = GetSyncer(); - } + // LUNA はキーリピートをソフトウェアで処理するため。 + // X68030 も Human68k を高速モードで使う際に必要。 + syncer = GetSyncer(); uimessage = gMainApp.GetUIMessage(); @@ -169,7 +167,7 @@ Keyboard::ResetHard(bool poweron) } // キー通知 - SyncKeyPressed(Any()); + syncer->NotifyKeyPressed(Any()); } // 内部状態をリセット @@ -187,7 +185,7 @@ Keyboard::PowerOff() std::fill(pressed.begin(), pressed.end(), false); // キーが全部解放されたので通知 - SyncKeyPressed(false); + syncer->NotifyKeyPressed(false); DoDisconnect(); } @@ -323,26 +321,16 @@ Keyboard::SetPressed(uint keycode, bool bool prev = Any(); pressed[keycode] = true; if (prev == false) { - SyncKeyPressed(true); + syncer->NotifyKeyPressed(true); } } else { pressed[keycode] = false; if (Any() == false) { - SyncKeyPressed(false); + syncer->NotifyKeyPressed(false); } } } -// LUNA なら、キーの押し下げ状態 (いずれかでも押し下げなら true) を -// syncer にも通知する。 -void -Keyboard::SyncKeyPressed(bool any_pressed) -{ - if (syncer) { - syncer->RequestKeyPressed(any_pressed); - } -} - // キー入力を1つ処理する。 // keystat が押下・開放されたキーの物理的な状態。 // キー入力を受け取らずに破棄した場合は false を返す。