void DVBSubtitles::nudge()
{
+#ifndef WIN32
pthread_mutex_lock(&threadCondMutex);
threadNudged = true;
pthread_cond_signal(&threadCond);
pthread_mutex_unlock(&threadCondMutex);
+#else
+ WaitForSingleObject(threadCondMutex, INFINITE);
+ threadNudged = true;
+ SetEvent(threadCond);
+ ReleaseMutex(threadCondMutex);
+#endif
}
void DVBSubtitles::threadMethod()
void SurfaceWin::drawBitmap(int x, int y, const Bitmap& bm)
{
// Temporary code? Draw one pixel at a time using drawPixel()
+ startFastDraw();
for (UINT j = 0; j < bm.getHeight(); ++j)
for (UINT i = 0; i < bm.getWidth(); ++i)
drawPixel(x+i, y+j, bm.getColour(i,j));
+ endFastDraw();
}
int SurfaceWin::updateToScreen(int sx, int sy, int w, int h, int dx, int dy) // FIXME new, replace others with this FIXME
// Internal bits and pieces
- private:
+// private: // TODO: make these private again when dvbsubtitles.cc
+ // no longer needs direct access.
HANDLE pthread;
HANDLE threadCondMutex;
HANDLE threadCond;