From 8e1e8d483cb88137aa674554088197788604659d Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Tue, 16 Jan 2024 22:37:06 +0300 Subject: [PATCH] Review db_total Fixes #327 --- src/db.cc | 4 ++-- src/db.h | 2 +- src/window_manager.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/db.cc b/src/db.cc index 960a48a..c5cf9f6 100644 --- a/src/db.cc +++ b/src/db.cc @@ -64,9 +64,9 @@ int dbOpen(const char* filePath1, int a2, const char* filePath2, int a4) } // 0x4C5D58 -int _db_total() +int db_total() { - return 0; + return 1; } // 0x4C5D60 diff --git a/src/db.h b/src/db.h index b8fbe18..dda5051 100644 --- a/src/db.h +++ b/src/db.h @@ -12,7 +12,7 @@ typedef void FileReadProgressHandler(); typedef char* StrdupProc(const char* string); int dbOpen(const char* filePath1, int a2, const char* filePath2, int a4); -int _db_total(); +int db_total(); void dbExit(); int dbGetFileSize(const char* filePath, int* sizePtr); int dbGetFileContents(const char* filePath, void* ptr); diff --git a/src/window_manager.cc b/src/window_manager.cc index 5b55351..b07291d 100644 --- a/src/window_manager.cc +++ b/src/window_manager.cc @@ -140,7 +140,7 @@ int windowManagerInit(VideoSystemInitProc* videoSystemInitProc, VideoSystemExitP gWindowIndexes[index] = -1; } - if (_db_total() == 0) { + if (db_total() == 0) { if (dbOpen(nullptr, 0, _path_patches, 1) == -1) { return WINDOW_MANAGER_ERR_INITIALIZING_DEFAULT_DATABASE; }