From e994f66c6f7cefd986fe7c563abc6573f27e7f88 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 13 Jan 2017 08:25:56 +0100 Subject: [PATCH] avoid configuration mismatch in screen settings Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ad8e6180aa7c6e4b1245bc6bcd77d153cd0ac046 Author: vanhofen Date: 2017-01-13 (Fri, 13 Jan 2017) Origin message was: ------------------ - avoid configuration mismatch in screen settings --- src/neutrino.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c0644bd4e..e86cbb05f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -739,6 +739,12 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.screen_width = frameBuffer->getScreenWidth(true); g_settings.screen_height = frameBuffer->getScreenHeight(true); + // avoid configuration mismatch + if (g_settings.screen_EndX > g_settings.screen_width) + g_settings.screen_EndX = g_settings.screen_width; + if (g_settings.screen_EndY > g_settings.screen_height) + g_settings.screen_EndY = g_settings.screen_height; + g_settings.bigFonts = configfile.getInt32("bigFonts", 0); g_settings.window_size = configfile.getInt32("window_size", 100); g_settings.window_width = configfile.getInt32("window_width", g_settings.window_size);