FireBirdLib - Topfield TMS PVR TAP Programming Library
TAP_Osd_Savebox_Chk.c
Go to the documentation of this file.
1
#define FB_DEBUG_CHK
2
#define FB_LOG_ENTRY_LIB_PRINTF
3
#include "
libFireBird.h
"
4
5
byte
*
TAP_Osd_SaveBox_Chk
(
char
*Comment, word rgn, dword x, dword y, dword w, dword h)
6
{
7
TRACEENTER
();
8
9
byte
*ret;
10
dword RgnH, RgnW;
11
12
if
(Comment)
13
{
14
RgnH =
GetOSDRegionHeight
(rgn);
15
RgnW =
GetOSDRegionWidth
(rgn);
16
17
if
(!
isOSDRegionAlive
(rgn))
LogEntryFBLibPrintf
(TRUE,
"TAP_Osd_SaveBox_Chk Warning: rgn(%d) points to an undefined region @ %s"
, rgn, Comment);
18
if
(x >= RgnW)
LogEntryFBLibPrintf
(TRUE,
"TAP_Osd_SaveBox_Chk Warning: x(%lu) out of range @ %s"
, x, Comment);
19
if
(y >= RgnH)
LogEntryFBLibPrintf
(TRUE,
"TAP_Osd_SaveBox_Chk Warning: y(%lu) out of range @ %s"
, y, Comment);
20
if
((x + w) > RgnW)
LogEntryFBLibPrintf
(TRUE,
"TAP_Osd_SaveBox_Chk Warning: x(%lu) + w(%lu) out of range @ %s"
, x, w, Comment);
21
if
((y + h) > RgnH)
LogEntryFBLibPrintf
(TRUE,
"TAP_Osd_SaveBox_Chk Warning: y(%lu) + h(%lu) out of range @ %s"
, y, h, Comment);
22
}
23
24
ret = TAP_Osd_SaveBox(rgn, x, y, w, h);
25
26
if
(Comment)
if
(ret == NULL)
LogEntryFBLibPrintf
(TRUE,
"TAP_Osd_SaveBox_Chk Warning: TAP_Osd_SaveBox() returned a NULL pointer @ %s"
, Comment);
27
28
TRACEEXIT
();
29
return
ret;
30
}
GetOSDRegionHeight
word GetOSDRegionHeight(word Region)
Definition:
GetOSDRegionHeight.c:3
GetOSDRegionWidth
word GetOSDRegionWidth(word Region)
Definition:
GetOSDRegionWidth.c:3
LogEntryFBLibPrintf
void LogEntryFBLibPrintf(bool Console, char *format,...)
Definition:
LogEntryFBLibPrintf.c:13
TAP_Osd_SaveBox_Chk
byte * TAP_Osd_SaveBox_Chk(char *Comment, word rgn, dword x, dword y, dword w, dword h)
Definition:
TAP_Osd_Savebox_Chk.c:5
isOSDRegionAlive
bool isOSDRegionAlive(word Region)
Definition:
isOSDRegionAlive.c:3
libFireBird.h
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
debug
TAP_Osd_Savebox_Chk.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3