framebuffer-ng: port commit 0dc92e99 to fix window sizes

This commit is contained in:
Stefan Seyfried
2013-11-15 11:57:32 +01:00
parent 518612d601
commit e508ba1fe8
2 changed files with 4 additions and 3 deletions

View File

@@ -305,14 +305,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;
}