Update common_host_interface.cpp
This commit is contained in:
parent
b0bd4b8cfe
commit
64bd840195
|
@ -35,7 +35,6 @@
|
|||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include "fullscreen_ui.h"
|
||||
|
||||
#ifdef WITH_SDL2
|
||||
#include "sdl_audio_stream.h"
|
||||
|
@ -55,7 +54,6 @@
|
|||
#include <ShlObj.h>
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
#include <frontend-common/imgui_fullscreen.cpp>
|
||||
|
||||
Log_SetChannel(CommonHostInterface);
|
||||
|
||||
|
@ -1873,12 +1871,12 @@ void CommonHostInterface::RegisterGeneralHotkeys()
|
|||
|
||||
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<u32>(next));
|
||||
System::SwitchMediaSubImage(next);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue