diff --git a/src/driver/framebuffer_ng.cpp b/src/driver/framebuffer_ng.cpp index 6d0c980f6..46eb05e38 100644 --- a/src/driver/framebuffer_ng.cpp +++ b/src/driver/framebuffer_ng.cpp @@ -308,6 +308,17 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) return g_settings.screen_EndY - g_settings.screen_StartY; } +unsigned int CFrameBuffer::getScreenWidthRel() +{ + // always reduce a possible detailline + return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * (g_settings.big_windows ? 100 : NON_BIG_WINDOWS) / 100; +} + +unsigned int CFrameBuffer::getScreenHeightRel() +{ + return (g_settings.screen_EndY - g_settings.screen_StartY) * (g_settings.big_windows ? 100 : NON_BIG_WINDOWS) / 100; +} + unsigned int CFrameBuffer::getScreenX() { return g_settings.screen_StartX; diff --git a/src/driver/framebuffer_ng.h b/src/driver/framebuffer_ng.h index 03f04831d..e27df034d 100644 --- a/src/driver/framebuffer_ng.h +++ b/src/driver/framebuffer_ng.h @@ -54,6 +54,9 @@ typedef struct fb_var_screeninfo t_fb_var_screeninfo; #define FADE_STEP 5 #define FADE_RESET 0xFFFF +#define NON_BIG_WINDOWS 85 // % +#define ConnectLineBox_Width 16 // px + #if HAVE_GENERIC_HARDWARE #define USE_OPENGL 1 #endif @@ -178,6 +181,8 @@ class CFrameBuffer unsigned int getStride() const; // size of a single line in the framebuffer (in bytes) unsigned int getScreenWidth(bool real = false); unsigned int getScreenHeight(bool real = false); + unsigned int getScreenWidthRel(); + unsigned int getScreenHeightRel(); unsigned int getScreenX(); unsigned int getScreenY();