summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/database-sqlite3.cpp6
-rw-r--r--src/subgame.cpp7
2 files changed, 9 insertions, 4 deletions
diff --git a/src/database-sqlite3.cpp b/src/database-sqlite3.cpp
index 7f7850719..3ec13a1a2 100644
--- a/src/database-sqlite3.cpp
+++ b/src/database-sqlite3.cpp
@@ -187,12 +187,12 @@ void Database_SQLite3::saveBlock(MapBlock *block)
const char *bytes = tmp.c_str();
if(sqlite3_bind_int64(m_database_write, 1, getBlockAsInteger(p3d)) != SQLITE_OK)
- infostream<<"WARNING: Block position failed to bind: "<<sqlite3_errmsg(m_database)<<std::endl;
+ errorstream<<"WARNING: Block position failed to bind: "<<sqlite3_errmsg(m_database)<<std::endl;
if(sqlite3_bind_blob(m_database_write, 2, (void *)bytes, o.tellp(), NULL) != SQLITE_OK) // TODO this mught not be the right length
- infostream<<"WARNING: Block data failed to bind: "<<sqlite3_errmsg(m_database)<<std::endl;
+ errorstream<<"WARNING: Block data failed to bind: "<<sqlite3_errmsg(m_database)<<std::endl;
int written = sqlite3_step(m_database_write);
if(written != SQLITE_DONE)
- infostream<<"WARNING: Block failed to save ("<<p3d.X<<", "<<p3d.Y<<", "<<p3d.Z<<") "
+ errorstream<<"WARNING: Block failed to save ("<<p3d.X<<", "<<p3d.Y<<", "<<p3d.Z<<") "
<<sqlite3_errmsg(m_database)<<std::endl;
// Make ready for later reuse
sqlite3_reset(m_database_write);
diff --git a/src/subgame.cpp b/src/subgame.cpp
index 95ae9ef98..1030d535a 100644
--- a/src/subgame.cpp
+++ b/src/subgame.cpp
@@ -242,7 +242,12 @@ bool initializeWorld(const std::string &path, const std::string &gameid)
infostream<<"Creating world.mt ("<<worldmt_path<<")"<<std::endl;
fs::CreateAllDirs(path);
std::ostringstream ss(std::ios_base::binary);
- ss<<"gameid = "<<gameid<<"\nbackend = sqlite3\n";
+ ss<<"gameid = "<<gameid<<
+#ifdef __ANDROID__
+ "\nbackend = leveldb\n";
+#else
+ "\nbackend = sqlite3\n";
+#endif
fs::safeWriteToFile(worldmt_path, ss.str());
}
return true;