mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
(Android) Fixed an issue where the application would go into a restart loop if the screen was internally rotated 90 or 270 degrees
This commit is contained in:
parent
1e79d7fce2
commit
67c7fa258b
|
@ -1568,7 +1568,11 @@ void ViewController::reloadAll()
|
|||
void ViewController::setWindowSizeChanged(const int width, const int height)
|
||||
{
|
||||
#if defined(__ANDROID__)
|
||||
const std::pair<int, int> windowSize {Utils::Platform::Android::getWindowSize()};
|
||||
std::pair<int, int> windowSize {Utils::Platform::Android::getWindowSize()};
|
||||
const int screenRotation {Settings::getInstance()->getInt("ScreenRotate")};
|
||||
|
||||
if (screenRotation == 90 || screenRotation == 270)
|
||||
windowSize = std::make_pair(windowSize.second, windowSize.first);
|
||||
|
||||
if (windowSize.first == static_cast<int>(mRenderer->getScreenWidth()) &&
|
||||
windowSize.second == static_cast<int>(mRenderer->getScreenHeight())) {
|
||||
|
|
Loading…
Reference in a new issue