mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +02:00
our current experimental Neutrino branch
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@27 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
51
src/driver/screen_max.cpp
Normal file
51
src/driver/screen_max.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* $Header: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/screen_max.cpp,v 1.3 2004/03/17 22:56:08 rasc Exp $
|
||||
*
|
||||
* -- some odd module to calc max. screen usage of an menue
|
||||
* -- this should be somewhere else (neutrino needs redesign)
|
||||
*
|
||||
* (C) 2004 by rasc
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#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.
|
||||
// -- so using this function will make menues to obey max. screen settings.
|
||||
//
|
||||
// usage: e.g. try to paint menue h: 500 w, 400 (but screen is limited
|
||||
// to (450 x 420)), functions will return 450 and 400
|
||||
// the _add factor is for boundary...
|
||||
//
|
||||
// 16:9 Zoom-Mode on a Thomson TV set will e.g. be 625x415
|
||||
//
|
||||
// 2004-03-17 rasc
|
||||
|
||||
int w_max (int w_size, int w_add)
|
||||
{
|
||||
int dw;
|
||||
int ret;
|
||||
|
||||
dw = (g_settings.screen_EndX - g_settings.screen_StartX);
|
||||
|
||||
ret = w_size;
|
||||
if (dw <= (w_size + w_add) ) ret = dw - w_add;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int h_max (int h_size, int h_add)
|
||||
{
|
||||
int dh;
|
||||
int ret;
|
||||
|
||||
dh = (g_settings.screen_EndY - g_settings.screen_StartY);
|
||||
|
||||
ret = h_size;
|
||||
if (dh <= (h_size + h_add) ) ret = dh - h_add;
|
||||
|
||||
return ret;
|
||||
}
|
Reference in New Issue
Block a user