Fix only one texture being updated on window resize breaking sidebyside and topbottom...
[oweals/minetest.git] / src / subgame.cpp
index 7fee3899d4ace353f7555735034f25390475c215..f2465c93e3d87432312e4b8a8419c0ea964b453c 100644 (file)
@@ -241,8 +241,9 @@ bool initializeWorld(const std::string &path, const std::string &gameid)
        if(!fs::PathExists(worldmt_path)){
                infostream<<"Creating world.mt ("<<worldmt_path<<")"<<std::endl;
                fs::CreateAllDirs(path);
-               std::ofstream of(worldmt_path.c_str(), std::ios::binary);
-               of<<"gameid = "<<gameid<<"\n";
+               std::ostringstream ss(std::ios_base::binary);
+               ss<<"gameid = "<<gameid<< "\nbackend = sqlite3\n";
+               fs::safeWriteToFile(worldmt_path, ss.str());
        }
        return true;
 }