From b6b631440230b265253c44529b00a8298bd350de Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 29 Jan 2020 16:38:06 +0000 Subject: [PATCH] Fixes for Windows --- Makefile.nmake | 2 +- messagequeue.h | 1 + objects.mk | 9 +++++---- osdwinvector.cc | 4 ++-- osdwinvector.h | 8 ++++---- surface.cc | 8 ++++---- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Makefile.nmake b/Makefile.nmake index 2429484..ed6e9ee 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -33,7 +33,7 @@ vompclient-legacy.exe: $(OBJECTS) vompwin.res release:: CXXFLAGS= $(CXXFLAGS_REL) -OBJECTS = $(OBJECTS) $(OBJECTSWINCURRENT) +OBJECTS = $(OBJECTS) $(OBJ_WINCURRENT) LIBS = $(LIBS) $(LIBSCURRENT) release:: vompclient.exe diff --git a/messagequeue.h b/messagequeue.h index e56f8ff..5fa5aa9 100644 --- a/messagequeue.h +++ b/messagequeue.h @@ -37,6 +37,7 @@ class MessageQueue virtual void postMessage(Message* m); virtual void postMessageNoLock(Message* m)=0; virtual void postMessageFromOuterSpace(Message* m)=0; + virtual bool postMessageIfNotBusy(Message* m)=0; protected: virtual void flushMessageQueue(); diff --git a/objects.mk b/objects.mk index 4a8c452..45e88d7 100644 --- a/objects.mk +++ b/objects.mk @@ -17,9 +17,10 @@ OBJ_COMMON = command.o tcp.o dsock.o thread.o timers.o i18n.o vdp6.o vvideolivetv.o vsleeptimer.o playerlivetv.o playerliveradio.o \ wprogressbar.o bitmap.o dvbsubtitles.o tfeed.o vteletextview.o \ teletextdecodervbiebu.o teletxt/txtfont.o movieinfo.o seriesinfo.o \ - wmovieview.o wseriesview.o tvmedia.o wtvmedia.o wpictureview.o + wmovieview.o wseriesview.o tvmedia.o wtvmedia.o wpictureview.o \ + osdvector.o surfacevector.o -OBJ_RASPBERRY = main.o threadp.o osdvector.o surfacevector.o osdopenvg.o \ +OBJ_RASPBERRY = main.o threadp.o osdopenvg.o \ ledraspberry.o videoomx.o audioomx.o imageomx.o \ wjpegsimple.o remotelinux.o signal.o @@ -28,7 +29,7 @@ OBJ_WINDOWS = winmain.o threadwin.o remotewin.o ledwin.o videowin.o wwinvideofilter.o wwinvideoh264filter.o wwinaudiofilter.o \ wwinmp3audiofilter.o wjpegsimple.o -OBJ_WINLEGACY = osdvector.o surfacevector.o osdwinpixel.o surfacewin.o \ +OBJ_WINLEGACY = osdwinpixel.o surfacewin.o \ fonts/helvB24.o fonts/helvB18.o -OBJ_WINCURRENT = osdvector.o surfacevector.o osdwinvector.o +OBJ_WINCURRENT = osdwinvector.o diff --git a/osdwinvector.cc b/osdwinvector.cc index cc3bb09..6e566d1 100644 --- a/osdwinvector.cc +++ b/osdwinvector.cc @@ -242,7 +242,7 @@ OsdWinVector::~OsdWinVector() shutdown(); if (dwritefac) dwritefac->Release(); if (!fontnames.size()) { - vector::iterator itty = fontnames.begin(); + std::vector::iterator itty = fontnames.begin(); while (itty != fontnames.end()) { free((void*)*itty); @@ -707,7 +707,7 @@ OsdWinVector::TTIndex OsdWinVector::loadTTchar(cTeletextChar c) unsigned int glyph_index = c.getGlyphIndex(); - map::iterator glypos = tt_font_chars.find(glyph_index); + std::map::iterator glypos = tt_font_chars.find(glyph_index); if (glypos != tt_font_chars.end()) { return (*glypos).second; diff --git a/osdwinvector.h b/osdwinvector.h index 7957975..b046214 100644 --- a/osdwinvector.h +++ b/osdwinvector.h @@ -82,8 +82,8 @@ protected: int loadFont(bool fontchange); - map font_exp_x; - vector fontnames; + std::map font_exp_x; + std::vector fontnames; //vector fontnames_keys; wchar_t * cur_fontname; bool is_direct_write_initted; @@ -101,8 +101,8 @@ protected: TTIndex loadTTchar(cTeletextChar c); - map tt_font_chars; - vector tt_atlas; + std::map tt_font_chars; + std::vector tt_atlas; TTIndex ttchar_end; ID2D1SolidColorBrush *ttbrush; diff --git a/surface.cc b/surface.cc index 94647de..3322a87 100644 --- a/surface.cc +++ b/surface.cc @@ -55,14 +55,14 @@ void initpol_tables(){ float fposy=((float)(ttcharsizey))/((float)(charsizey))*((float)py); float yweight=fposy-floor(fposy); float yinvweight=1.-yweight; - interpol_upline[py]=min((int)(ceil(fposy)),9); - interpol_lowline[py]=max((int)(floor(fposy)),0); + interpol_upline[py]=std::min((int)(ceil(fposy)),9); + interpol_lowline[py]=std::max((int)(floor(fposy)),0); for (int px=0;px