From 0dc92e99f93a5069d05b5dfc9270ab4f8bb8f9c1 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 7 Nov 2013 17:25:15 +0400 Subject: [PATCH] driver/framebuffer.cpp: switch from window_size to window width/height, allow 50% min window size --- src/driver/framebuffer.cpp | 4 ++-- src/driver/framebuffer.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index ca6649176..31f008a17 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -459,14 +459,14 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN : g_settings.window_size; + int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_width; // always reduce a possible detailline return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * percent / 100; } unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN : g_settings.window_size; + int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_height; return (g_settings.screen_EndY - g_settings.screen_StartY) * percent / 100; } diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index 527157b9b..575c2510a 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -55,7 +55,8 @@ typedef struct fb_var_screeninfo t_fb_var_screeninfo; #define FADE_RESET 0xFFFF #define WINDOW_SIZE_MAX 100 // % -#define WINDOW_SIZE_MIN 80 // % +#define WINDOW_SIZE_MIN 50 // % +#define WINDOW_SIZE_MIN_FORCED 80 // % #define ConnectLineBox_Width 16 // px /** Ausfuehrung als Singleton */