aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/newgui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 9b9ff8f3bd..3bbbfc7ee1 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -83,7 +83,8 @@ void NewGui::updateScaleFactor() {
kDefaultGUIHeight = 200
};
- _scaleFactor = MIN(_system->getOverlayWidth() / kDefaultGUIWidth, _system->getOverlayHeight() / kDefaultGUIHeight);
+ // NES has 256 pixels width which makes MIN() return 0 here.
+ _scaleFactor = MAX(MIN(_system->getOverlayWidth() / kDefaultGUIWidth, _system->getOverlayHeight() / kDefaultGUIHeight), 1);
}
// Pick the font depending on the scale factor.