diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index 05002d843..cdeeb3d7d 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -35,7 +35,6 @@ #include #include #include -#include "fullscreen_ui.h" #ifdef WITH_SDL2 #include "sdl_audio_stream.h" @@ -55,7 +54,6 @@ #include #include #endif -#include Log_SetChannel(CommonHostInterface); @@ -1871,14 +1869,14 @@ void CommonHostInterface::RegisterGeneralHotkeys() SaveScreenshot(); }); - RegisterHotkey(StaticString(TRANSLATABLE("Hotkeys", "General")), StaticString("ChangeDisc"), + RegisterHotkey(StaticString(TRANSLATABLE("Hotkeys", "General")), StaticString("ChangeDisc"), StaticString(TRANSLATABLE("Hotkeys", "ChangeDisc")), [this](bool pressed) { - if (pressed && System::IsValid()) + if (pressed && System::IsValid() && System::HasMediaSubImages()) { - int current = System::GetMediaSubImageIndex(); - int next = (current + 1) % System::GetMediaSubImageCount(); + const u32 current = System::GetMediaSubImageIndex(); + const u32 next = (current + 1) % System::GetMediaSubImageCount(); if (current != next) - System::SwitchMediaSubImage(static_cast(next)); + System::SwitchMediaSubImage(next); } });