Try to prevent windows machines going to sleep during encodes.
[dcpomatic.git] / src / lib / cross.cc
index 746b4f509c7e010a7c0203eda85bc155239af779..9f7a761248aef9f045ba85a14e05356a066b5a4b 100644 (file)
@@ -288,3 +288,21 @@ fopen_boost (boost::filesystem::path p, string t)
         return fopen (p.c_str(), t.c_str ());
 #endif
 }
+
+int
+dcpomatic_fseek (FILE* stream, int64_t offset, int whence)
+{
+#ifdef DCPOMATIC_WINDOWS
+       return _fseeki64 (stream, offset, whence);
+#else  
+       return fseek (stream, offset, whence);
+#endif 
+}
+
+void
+kick ()
+{
+#ifdef DCPOMATIC_WINDOWS
+       SetThreadExecutionState (ES_CONTINUOUS);
+#endif 
+}