summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/dbcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/dbcache.cpp')
-rw-r--r--plugins/Db3x_mmap/dbcache.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/Db3x_mmap/dbcache.cpp b/plugins/Db3x_mmap/dbcache.cpp
index 1e9369cc85..271de9d512 100644
--- a/plugins/Db3x_mmap/dbcache.cpp
+++ b/plugins/Db3x_mmap/dbcache.cpp
@@ -134,7 +134,7 @@ static VOID CALLBACK DoBufferFlushTimerProc(HWND hwnd, UINT message, UINT_PTR id
if (FlushViewOfFile(pDbCache, 0) == 0) {
if (flushFailTick == 0)
flushFailTick = GetTickCount();
- else if (GetTickCount() - flushFailTick > 5000)
+ else if (GetTickCount() - flushFailTick > 5000)
DatabaseCorruption(NULL);
}
else
@@ -150,7 +150,7 @@ void DBFlush(int setting)
if (FlushViewOfFile(pDbCache, 0) == 0) {
if (flushFailTick == 0)
flushFailTick = GetTickCount();
- else if (GetTickCount() - flushFailTick > 5000)
+ else if (GetTickCount() - flushFailTick > 5000)
DatabaseCorruption(NULL);
}
else
@@ -163,15 +163,6 @@ void DBFlush(int setting)
flushBuffersTimerId = SetTimer(NULL,flushBuffersTimerId,50,DoBufferFlushTimerProc);
}
-static INT_PTR CacheSetSafetyMode(WPARAM wParam,LPARAM lParam)
-{
- EnterCriticalSection(&csDbAccess);
- safetyMode = wParam;
- LeaveCriticalSection(&csDbAccess);
- DBFlush(1);
- return 0;
-}
-
int InitCache(void)
{
DWORD x;