// warning broadcom specific, get display size!
display_width = display_height = 0;
- if (graphics_get_display_size(0, &display_width, &display_height) < 0)
+ if (graphics_get_display_size(0, reinterpret_cast<uint32_t*>(&display_width), reinterpret_cast<uint32_t*>(&display_height)) < 0)
{
Log::getInstance()->log("OSD", Log::WARN, "Getting display size failed! (BCM API) ");
vgmutex.unlock();
}
Log::getInstance()->log("OSD", Log::NOTICE, "Displaysize is %d x %d ", display_width, display_height);
- VC_RECT_T dst_rect = {0, 0, (int32_t)display_width, (int32_t)display_height};
+ VC_RECT_T dst_rect = {0, 0, display_width, display_height};
VC_RECT_T src_rect = {0, 0, BACKBUFFER_WIDTH << 16, BACKBUFFER_HEIGHT << 16};
VC_RECT_T src_rect_bg = {0, 0, 16 << 16, 16 << 16};
// VC_RECT_T src_rect_im={0,0,16,16};
bcm_update = vc_dispmanx_update_start(0);
bcm_element = vc_dispmanx_element_add(bcm_update, bcm_display,
2, &dst_rect, 0,
- &src_rect, DISPMANX_PROTECTION_NONE, 0, 0, (DISPMANX_TRANSFORM_T) 0);
+ &src_rect, DISPMANX_PROTECTION_NONE, 0, 0, static_cast<DISPMANX_TRANSFORM_T>(0));
bcm_background = vc_dispmanx_element_add(bcm_update, bcm_display,
0, &dst_rect, bcm_backres,
- &src_rect_bg, DISPMANX_PROTECTION_NONE, 0, 0, (DISPMANX_TRANSFORM_T) 0);
+ &src_rect_bg, DISPMANX_PROTECTION_NONE, 0, 0, static_cast<DISPMANX_TRANSFORM_T>(0));
vc_dispmanx_update_submit_sync(bcm_update);
for (int i = 0; i < fonts->nfont; i++)
{
- char* s = (char*)FcNameUnparse(fonts->fonts[i]);
+ char* s = reinterpret_cast<char*>(FcNameUnparse(fonts->fonts[i]));
if (s)
{
{
vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
vgGetMatrix(save_matrix);
- VGfloat imagewidth = vgGetParameteri((VGImage) command.target.image, VG_IMAGE_WIDTH);
- VGfloat imageheight = vgGetParameteri((VGImage) command.target.image, VG_IMAGE_HEIGHT);
+ VGfloat imagewidth = vgGetParameteri(static_cast<VGImage>(command.target.image), VG_IMAGE_WIDTH);
+ VGfloat imageheight = vgGetParameteri(static_cast<VGImage>(command.target.image), VG_IMAGE_HEIGHT);
//vgScale(command.w,command.h);
{
VGfloat colorramp[5 * 5];
colorramp[0 + 0 * 5] = 0.f;
- colorramp[1 + 0 * 5] = style->red / 255.f;
- colorramp[2 + 0 * 5] = style->green / 255.f;
- colorramp[3 + 0 * 5] = style->blue / 255.f;
- colorramp[4 + 0 * 5] = style->alpha / 255.f;
+ colorramp[1 + 0 * 5] = static_cast<float>(style->red) / 255;
+ colorramp[2 + 0 * 5] = static_cast<float>(style->green) / 255;
+ colorramp[3 + 0 * 5] = static_cast<float>(style->blue) / 255;
+ colorramp[4 + 0 * 5] = static_cast<float>(style->alpha) / 255;
for (int i = 0; i < (style->num_colors - 1); i++)
{