From b4abc350e03ed88806f166d0889627357e999612 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sun, 9 Apr 2023 19:23:35 +0200 Subject: [PATCH] Skip the USB controller views while we do not have QuickEmu support --- internal/ui_main_events.go | 5 ++++- internal/ui_main_functions.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/ui_main_events.go b/internal/ui_main_events.go index a69c8ba..d308a57 100644 --- a/internal/ui_main_events.go +++ b/internal/ui_main_events.go @@ -21,9 +21,12 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case "ctrl+z", "backspace": // Go backwards in the model - if m.focused > 0 { + if m.focused > 0 && m.focused != DONE { m.focused-- return m, nil + } else if m.focused == DONE { + // Since we have no QuickEmu support, skip the usb controller configuration + m.focused = VIDEO } else { // If we are at the beginning, just exit return m, tea.Quit diff --git a/internal/ui_main_functions.go b/internal/ui_main_functions.go index 3c4e37d..9438859 100644 --- a/internal/ui_main_functions.go +++ b/internal/ui_main_functions.go @@ -78,7 +78,10 @@ func (m *model) processSelection() bool { configs.Set_Modprobe(gpu_IDs) // Go to the next view - m.focused++ + //m.focused++ + + // Because we have no QuickEmu support yet, just skip USB Controller configuration + m.focused = DONE case INTRO: // This is an OK Dialog