Remove redundent logs
This commit is contained in:
@@ -129,12 +129,9 @@ bool deserializeGameData(const char *path, GameData *gameData) {
|
||||
snprintf(buf, sizeof(buf), "%s%s", "/game/", path);
|
||||
path = buf;
|
||||
#endif
|
||||
bzLogInfo("read path: %s", path);
|
||||
|
||||
FILE *f = fopen(path, "r");
|
||||
bzLogInfo("start reading");
|
||||
if (!f) return false;
|
||||
bzLogInfo("reading");
|
||||
GameData data;
|
||||
size_t numRead = fread(&data, sizeof(data), 1, f);
|
||||
fclose(f);
|
||||
@@ -413,8 +410,8 @@ void update(float dt, void *userData) {
|
||||
// Load settings
|
||||
const char *path = GAME_DATA_SAVE_PATH;
|
||||
GameData gameData = getDefaultGameData();
|
||||
if (deserializeGameData(path, &gameData)) {
|
||||
bzLogWarning("Failed to read game data: %s.", path);
|
||||
if (!deserializeGameData(path, &gameData)) {
|
||||
bzLogError("Failed to read game data: %s", path);
|
||||
}
|
||||
game->gameData = gameData;
|
||||
applyOptions(&gameData.options);
|
||||
|
||||
Reference in New Issue
Block a user