mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +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)
|
void ViewController::setWindowSizeChanged(const int width, const int height)
|
||||||
{
|
{
|
||||||
#if defined(__ANDROID__)
|
#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()) &&
|
if (windowSize.first == static_cast<int>(mRenderer->getScreenWidth()) &&
|
||||||
windowSize.second == static_cast<int>(mRenderer->getScreenHeight())) {
|
windowSize.second == static_cast<int>(mRenderer->getScreenHeight())) {
|
||||||
|
|
Loading…
Reference in a new issue