- screen-max: formatting code using astyle

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-10-21 22:35:06 +02:00
committed by Thilo Graf
parent e4c2dd39b5
commit d88402bb52
2 changed files with 15 additions and 25 deletions

View File

@@ -9,13 +9,9 @@
*
*/
#include <global.h>
#include <driver/screen_max.h>
// -- this is a simple odd class provided for 'static' usage
// -- to calculate max. usage of a preferred menue size (x,y)
// -- this is due to 16:9 TV zoom functions, which are cutting menues.
@@ -29,7 +25,6 @@
//
// 2004-03-17 rasc
int w_max(int w_size, int w_add)
{
int dw;
@@ -38,12 +33,12 @@ int w_max (int w_size, int w_add)
dw = (g_settings.screen_EndX - g_settings.screen_StartX);
ret = w_size;
if (dw <= (w_size + w_add) ) ret = dw - w_add;
if (dw <= (w_size + w_add))
ret = dw - w_add;
return ret;
}
int h_max(int h_size, int h_add)
{
int dh;
@@ -52,7 +47,8 @@ int h_max (int h_size, int h_add)
dh = (g_settings.screen_EndY - g_settings.screen_StartY);
ret = h_size;
if (dh <= (h_size + h_add) ) ret = dh - h_add;
if (dh <= (h_size + h_add))
ret = dh - h_add;
return ret;
}
@@ -71,6 +67,3 @@ int getScreenStartY (int height)
int r = (((g_settings.screen_EndY - g_settings.screen_StartY) - y) / 2) + g_settings.screen_StartY;
return r < 0 ? 0 : r;
}

View File

@@ -22,13 +22,10 @@
#ifndef __SCREEN_MAX__
#define __SCREEN_MAX__
int w_max(int w_size, int w_add);
int h_max(int h_size, int h_add);
int getScreenStartX(int width);
int getScreenStartY(int height);
#endif