From 3593c425b6409d4bac04a2065ab777129ca2a578 Mon Sep 17 00:00:00 2001 From: micha-bbg Date: Mon, 21 May 2012 18:48:56 +0200 Subject: [PATCH] * infoviewer_bb: Workaround for display the CA-icons outside of the infobar --- src/gui/infoviewer_bb.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 70d9dd320..4a9eefcf9 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -638,6 +638,9 @@ void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset if (( caid & 0xFF00 ) == 0x1700) caid = 0x0600; + if (icon_offset[icon_map[( caid & 0xFF00 )].first] == 0) + return; + if (g_settings.casystem_display == 0) { px = endx - (icon_offset[icon_map[( caid & 0xFF00 )].first] - icon_space ); } else { @@ -648,7 +651,11 @@ void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset if (px) { snprintf(buf, sizeof(buf), "%s_%s", icon_map[( caid & 0xFF00 )].second, icon); - frameBuffer->paintIcon(buf, px, py ); + if ((px >= (endx-8)) || (px <= 0)) + printf("#####[%s:%d] Error paint icon %s, px: %d, py: %d, endx: %d, icon_offset: %d\n", + __FUNCTION__, __LINE__, buf, px, py, endx, icon_offset[icon_map[( caid & 0xFF00 )].first]); + else + frameBuffer->paintIcon(buf, px, py); } }