mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Prevented the up and down buttons to quit the media viewer and PDF viewer
This commit is contained in:
parent
a964d89b80
commit
8ad3bd2afd
|
@ -221,36 +221,50 @@ void Window::input(InputConfig* config, Input input)
|
|||
}
|
||||
|
||||
if (mMediaViewer && mRenderMediaViewer) {
|
||||
if (config->isMappedLike("up", input) && input.value != 0) {
|
||||
if (config->isMappedLike("down", input) && input.value != 0) {
|
||||
return;
|
||||
}
|
||||
else if (config->isMappedLike("up", input) && input.value != 0) {
|
||||
mMediaViewer->launchPDFViewer();
|
||||
return;
|
||||
}
|
||||
else if (config->isMappedLike("right", input) && input.value != 0)
|
||||
else if (config->isMappedLike("right", input) && input.value != 0) {
|
||||
mMediaViewer->showNext();
|
||||
else if (config->isMappedLike("left", input) && input.value != 0)
|
||||
}
|
||||
else if (config->isMappedLike("left", input) && input.value != 0) {
|
||||
mMediaViewer->showPrevious();
|
||||
else if (input.value != 0)
|
||||
}
|
||||
else if (input.value != 0) {
|
||||
// Any other input stops the media viewer.
|
||||
stopMediaViewer();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (mPDFViewer && mRenderPDFViewer) {
|
||||
if (config->isMappedLike("down", input) && input.value != 0) {
|
||||
if (config->isMappedLike("up", input) && input.value != 0) {
|
||||
return;
|
||||
}
|
||||
else if (config->isMappedLike("down", input) && input.value != 0) {
|
||||
mPDFViewer->launchMediaViewer();
|
||||
return;
|
||||
}
|
||||
else if (config->isMappedLike("right", input) && input.value != 0)
|
||||
else if (config->isMappedLike("right", input) && input.value != 0) {
|
||||
mPDFViewer->showNextPage();
|
||||
else if (config->isMappedLike("left", input) && input.value != 0)
|
||||
}
|
||||
else if (config->isMappedLike("left", input) && input.value != 0) {
|
||||
mPDFViewer->showPreviousPage();
|
||||
else if (config->isMappedLike("righttrigger", input) && input.value != 0)
|
||||
}
|
||||
else if (config->isMappedLike("righttrigger", input) && input.value != 0) {
|
||||
mPDFViewer->showLastPage();
|
||||
else if (config->isMappedLike("lefttrigger", input) && input.value != 0)
|
||||
}
|
||||
else if (config->isMappedLike("lefttrigger", input) && input.value != 0) {
|
||||
mPDFViewer->showFirstPage();
|
||||
else if (input.value != 0)
|
||||
}
|
||||
else if (input.value != 0) {
|
||||
// Any other input stops the PDF viewer.
|
||||
stopPDFViewer();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue