]> source.dussan.org Git - tigervnc.git/commitdiff
MinGW tweak: Like last patch, use __rfbmax/__rfbmin.
authorPeter Åstrand <astrand@cendio.se>
Tue, 9 Dec 2008 11:20:39 +0000 (11:20 +0000)
committerPeter Åstrand <astrand@cendio.se>
Tue, 9 Dec 2008 11:20:39 +0000 (11:20 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3338 3789f03b-4d11-0410-bbf8-ca57d06f2519

win/rfb_win32/SDisplayCorePolling.cxx

index fc57ecd0a4a925fc87eb261dcf49cd12d1ac5f03..510ffb1f5c06586c0d5763ea904775f393af3c13 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <rfb_win32/SDisplayCorePolling.h>
 #include <rfb/LogWriter.h>
+#include <rfb/util.h>
 
 using namespace rfb;
 using namespace rfb::win32;
@@ -33,7 +34,7 @@ const int SDisplayCorePolling::pollTimerId = 1;
 SDisplayCorePolling::SDisplayCorePolling(SDisplay* d, UpdateTracker* ut, int pollInterval_)
   : MsgWindow(_T("rfb::win32::SDisplayCorePolling")), updateTracker(ut),
   pollTimer(getHandle(), pollTimerId), pollNextStrip(false), display(d) {
-  pollInterval = max(10, (pollInterval_ / POLLING_SEGMENTS));
+  pollInterval = __rfbmax(10, (pollInterval_ / POLLING_SEGMENTS));
   copyrect.setUpdateTracker(ut);
 }
 
@@ -74,7 +75,7 @@ void SDisplayCorePolling::flushUpdates() {
       // No.  Poll the next section
       pollrect.tl.y = pollNextY;
       pollNextY += pollIncrementY;
-      pollrect.br.y = min(pollNextY, pollrect.br.y);
+      pollrect.br.y = __rfbmin(pollNextY, pollrect.br.y);
       updateTracker->add_changed(pollrect);
     }
   }