Review db_total

Fixes #327
This commit is contained in:
Alexander Batalov 2024-01-16 22:37:06 +03:00
parent 1b18c2baa3
commit 8e1e8d483c
3 changed files with 4 additions and 4 deletions

View File

@ -64,9 +64,9 @@ int dbOpen(const char* filePath1, int a2, const char* filePath2, int a4)
} }
// 0x4C5D58 // 0x4C5D58
int _db_total() int db_total()
{ {
return 0; return 1;
} }
// 0x4C5D60 // 0x4C5D60

View File

@ -12,7 +12,7 @@ typedef void FileReadProgressHandler();
typedef char* StrdupProc(const char* string); typedef char* StrdupProc(const char* string);
int dbOpen(const char* filePath1, int a2, const char* filePath2, int a4); int dbOpen(const char* filePath1, int a2, const char* filePath2, int a4);
int _db_total(); int db_total();
void dbExit(); void dbExit();
int dbGetFileSize(const char* filePath, int* sizePtr); int dbGetFileSize(const char* filePath, int* sizePtr);
int dbGetFileContents(const char* filePath, void* ptr); int dbGetFileContents(const char* filePath, void* ptr);

View File

@ -140,7 +140,7 @@ int windowManagerInit(VideoSystemInitProc* videoSystemInitProc, VideoSystemExitP
gWindowIndexes[index] = -1; gWindowIndexes[index] = -1;
} }
if (_db_total() == 0) { if (db_total() == 0) {
if (dbOpen(nullptr, 0, _path_patches, 1) == -1) { if (dbOpen(nullptr, 0, _path_patches, 1) == -1) {
return WINDOW_MANAGER_ERR_INITIALIZING_DEFAULT_DATABASE; return WINDOW_MANAGER_ERR_INITIALIZING_DEFAULT_DATABASE;
} }