Pārlūkot izejas kodu

Theoraplayer linux fixes.

marksibly 8 gadi atpakaļ
vecāks
revīzija
dfa3a1d26d

+ 5 - 3
modules/theoraplayer/native/theoraplayer/src/FileDataSource.cpp

@@ -85,7 +85,8 @@ namespace theoraplayer
 			this->_openFile();
 		}
 		// fpos_t is not a scalar in Linux, for more info refer here: https://code.google.com/p/libtheoraplayer/issues/detail?id=6
-#ifdef _LINUX
+#ifdef __linux
+//_LINUX
 		fpos_t fpos = { 0 };
 		fpos.__pos = byte_index;
 #else
@@ -109,9 +110,10 @@ namespace theoraplayer
 		{
 			return 0LL;
 		}
-#ifdef _LINUX
+#ifdef __linux
+//_LINUX
 		fpos_t pos;
-		fgetpos(mFilePtr, &pos);
+		fgetpos(this->filePtr, &pos);
 		return (int64_t)pos.__pos;
 #else
 		fpos_t pos;

+ 1 - 1
modules/theoraplayer/native/theoraplayer/src/MemoryDataSource.cpp

@@ -81,7 +81,7 @@ namespace theoraplayer
 				fclose(file);
 				throw TheoraplayerException("MemoryDataSource doesn't support files larger than 4GB!");
 			}
-			if (this->size < UINT_MAX)
+			if (1)	//this->size < UINT_MAX)
 			{
 				this->data = new unsigned char[(unsigned int)this->size];
 				fread(this->data, 1, (size_t)this->size, file);