summaryrefslogtreecommitdiffstats
path: root/src/core/CdStreamPosix.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-08-15 17:56:52 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-08-15 17:56:52 +0200
commit1d5e3c74256038c763bbe8d1369715bc47f99dd8 (patch)
treeee2a1dac538b95ddb92d7744a6821917e7dd3056 /src/core/CdStreamPosix.cpp
parentsubmodules (diff)
parentDon't react if player's targeting with melee (diff)
downloadre3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.gz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.bz2
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.lz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.xz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.zst
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.zip
Diffstat (limited to 'src/core/CdStreamPosix.cpp')
-rw-r--r--src/core/CdStreamPosix.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 45fd9832..e114a29a 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -150,9 +150,11 @@ CdStreamInit(int32 numChannels)
ASSERT(0);
return;
}
-
+#ifdef __linux__
_gdwCdStreamFlags = O_RDONLY | O_NOATIME;
-
+#else
+ _gdwCdStreamFlags = O_RDONLY;
+#endif
// People say it's slower
/*
if ( fsInfo.f_bsize <= CDSTREAM_SECTOR_SIZE )
@@ -400,9 +402,12 @@ void *CdStreamThread(void *param)
if (gCdStreamThreadStatus == 0){
gCdStreamThreadStatus = 1;
#endif
+
+#ifdef __linux__
pid_t tid = syscall(SYS_gettid);
int ret = setpriority(PRIO_PROCESS, tid, getpriority(PRIO_PROCESS, getpid()) + 1);
- }
+#endif
+ }
// spurious wakeup or we sent interrupt signal for flushing
if(pChannel->nSectorsToRead == 0)