Skip to content

Commit

Permalink
Review db_total
Browse files Browse the repository at this point in the history
Fixes #327
  • Loading branch information
alexbatalov committed Jan 16, 2024
1 parent 1b18c2b commit 8e1e8d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/window_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8e1e8d4

Please sign in to comment.