From 0c322302923f3cd84bd2ff4942b3a84d160b1e10 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Tue, 23 Dec 2014 09:52:56 +0100 Subject: [PATCH] Some fixes for raspberry pi compilation --- osdopenvg.cc | 6 +++--- surfacevector.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osdopenvg.cc b/osdopenvg.cc index 90f0d37..584d337 100644 --- a/osdopenvg.cc +++ b/osdopenvg.cc @@ -1191,7 +1191,7 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) case OVGcreateImageMemory: {//imcount++; PictureInfo *info = (PictureInfo*) command.data; VGImage handle; - Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateImageMemory %d",imcount); + //Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateImageMemory %d",imcount); handle=vgCreateImage(VG_sABGR_8888,info->width,info->height,VG_IMAGE_QUALITY_BETTER); vgImageSubData(handle,info->image,info->width*4, VG_sABGR_8888,0,0,info->width,info->height); @@ -1204,7 +1204,7 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) // We have a pictures! send a message to ourself, to switch to gui thread m->from=this; m->to=Command::getInstance(); - m->parameter = handle; + m->parameter.handle = handle; if (!static_image) { m->message=Message::NEW_PICTURE; m->tag = info->lindex; @@ -1222,7 +1222,7 @@ unsigned int OsdOpenVG::handleTask(OpenVGCommand& command) VGImage handle; handle=vgCreateImage(VG_sABGR_8888,info->width,info->height,VG_IMAGE_QUALITY_BETTER); - Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateEGLImage %d %d %x %d",info->width,info->height, handle,imcount); +// Log::getInstance()->log("OSD", Log::DEBUG, "TVMedia OVGcreateEGLImage %d %d %x %d",info->width,info->height, handle,imcount); info->handle = handle; info->reference = eglCreateImageKHR(egl_display, egl_context, EGL_VG_PARENT_IMAGE_KHR, (EGLClientBuffer)handle, NULL); diff --git a/surfacevector.cc b/surfacevector.cc index a511353..720e994 100644 --- a/surfacevector.cc +++ b/surfacevector.cc @@ -80,11 +80,11 @@ int SurfaceVector::drawText(const char* text, int x, int y, int width, const Dra int chars=0; commands.resize(commands_size+strlen(text)); #ifndef WIN32 - num_bytes=mbrtowc(&tempo, run, length, &state); mbstate_t state; wchar_t tempo; size_t num_bytes = 1; memset((void*)&state,0,sizeof(state)); + num_bytes=mbrtowc(&tempo, run, length, &state); while (num_bytes!=((size_t) -1) && num_bytes!=((size_t) -2) && length>0) { -- 2.39.5