mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15: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 (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();
|
mMediaViewer->launchPDFViewer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (config->isMappedLike("right", input) && input.value != 0)
|
else if (config->isMappedLike("right", input) && input.value != 0) {
|
||||||
mMediaViewer->showNext();
|
mMediaViewer->showNext();
|
||||||
else if (config->isMappedLike("left", input) && input.value != 0)
|
}
|
||||||
|
else if (config->isMappedLike("left", input) && input.value != 0) {
|
||||||
mMediaViewer->showPrevious();
|
mMediaViewer->showPrevious();
|
||||||
else if (input.value != 0)
|
}
|
||||||
|
else if (input.value != 0) {
|
||||||
// Any other input stops the media viewer.
|
// Any other input stops the media viewer.
|
||||||
stopMediaViewer();
|
stopMediaViewer();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mPDFViewer && mRenderPDFViewer) {
|
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();
|
mPDFViewer->launchMediaViewer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (config->isMappedLike("right", input) && input.value != 0)
|
else if (config->isMappedLike("right", input) && input.value != 0) {
|
||||||
mPDFViewer->showNextPage();
|
mPDFViewer->showNextPage();
|
||||||
else if (config->isMappedLike("left", input) && input.value != 0)
|
}
|
||||||
|
else if (config->isMappedLike("left", input) && input.value != 0) {
|
||||||
mPDFViewer->showPreviousPage();
|
mPDFViewer->showPreviousPage();
|
||||||
else if (config->isMappedLike("righttrigger", input) && input.value != 0)
|
}
|
||||||
|
else if (config->isMappedLike("righttrigger", input) && input.value != 0) {
|
||||||
mPDFViewer->showLastPage();
|
mPDFViewer->showLastPage();
|
||||||
else if (config->isMappedLike("lefttrigger", input) && input.value != 0)
|
}
|
||||||
|
else if (config->isMappedLike("lefttrigger", input) && input.value != 0) {
|
||||||
mPDFViewer->showFirstPage();
|
mPDFViewer->showFirstPage();
|
||||||
else if (input.value != 0)
|
}
|
||||||
|
else if (input.value != 0) {
|
||||||
// Any other input stops the PDF viewer.
|
// Any other input stops the PDF viewer.
|
||||||
stopPDFViewer();
|
stopPDFViewer();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue