mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
port g_settings.window_size to framebuffer_ng
Origin commit data
------------------
Commit: 377761ce52
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-09-03 (Tue, 03 Sep 2013)
This commit is contained in:
@@ -356,24 +356,16 @@ unsigned int CFrameBuffer::getScreenHeight(bool real)
|
||||
return g_settings.screen_EndY - g_settings.screen_StartY;
|
||||
}
|
||||
|
||||
|
||||
unsigned int CFrameBuffer::getScreenPercentRel(bool force_small)
|
||||
{
|
||||
if (force_small || !g_settings.big_windows)
|
||||
return NON_BIG_WINDOWS;
|
||||
return 100;
|
||||
}
|
||||
|
||||
unsigned int CFrameBuffer::getScreenWidthRel(bool force_small)
|
||||
{
|
||||
int percent = getScreenPercentRel(force_small);
|
||||
int percent = force_small ? WINDOW_SIZE_MIN : g_settings.window_size;
|
||||
// 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 = getScreenPercentRel(force_small);
|
||||
int percent = force_small ? WINDOW_SIZE_MIN : g_settings.window_size;
|
||||
return (g_settings.screen_EndY - g_settings.screen_StartY) * percent / 100;
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,8 @@ typedef struct fb_var_screeninfo t_fb_var_screeninfo;
|
||||
#define FADE_STEP 5
|
||||
#define FADE_RESET 0xFFFF
|
||||
|
||||
#define NON_BIG_WINDOWS 85 // %
|
||||
#define WINDOW_SIZE_MAX 100 // %
|
||||
#define WINDOW_SIZE_MIN 80 // %
|
||||
#define ConnectLineBox_Width 16 // px
|
||||
|
||||
#if HAVE_GENERIC_HARDWARE
|
||||
@@ -191,7 +192,6 @@ 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 getScreenPercentRel(bool force_small);
|
||||
unsigned int getScreenWidthRel(bool force_small = false);
|
||||
unsigned int getScreenHeightRel(bool force_small = false);
|
||||
unsigned int getScreenX();
|
||||
|
Reference in New Issue
Block a user