mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
parent
127600311f
commit
94cfc99d7b
@ -72,7 +72,10 @@ void SettingsStorage::invalidateNode(const std::vector<std::string> &changedPath
|
||||
|
||||
savedConf.Struct().erase("session");
|
||||
savedConf.minimize(schema);
|
||||
std::ofstream file((GVCMIDirs.UserPath + "/config/settings.json").c_str(), std::ofstream::trunc | std::ofstream::out);
|
||||
|
||||
CResourceHandler::get()->createResource("CONFIG/settings.json");
|
||||
|
||||
std::ofstream file(CResourceHandler::get()->getResourceName(ResourceID("config/settings.json")), std::ofstream::trunc);
|
||||
file << savedConf;
|
||||
}
|
||||
|
||||
|
@ -622,11 +622,11 @@ static si64 lod_seek(URLContext *context, si64 pos, int whence)
|
||||
{
|
||||
CVideoPlayer *video = (CVideoPlayer *)context->priv_data;
|
||||
|
||||
// Not sure what the parameter whence is. Assuming it always
|
||||
// indicates an absolute value;
|
||||
if (whence & AVSEEK_SIZE)
|
||||
return video->length;
|
||||
|
||||
video->offset = pos;
|
||||
vstd::amin(video->offset, video->length);
|
||||
|
||||
return -1;//video->offset;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,8 @@
|
||||
],
|
||||
"CONFIG/":
|
||||
[
|
||||
{"type" : "dir", "path" : "ALL/Config", "writeable": true}
|
||||
{"type" : "dir", "path" : "GLOBAL/Config",} // separate to avoid overwriting global resources
|
||||
{"type" : "dir", "path" : "LOCAL/Config", "writeable": true}
|
||||
],
|
||||
"MAPS/":
|
||||
[
|
||||
|
@ -45,10 +45,6 @@ bool CFilesystemLoader::createEntry(std::string filename)
|
||||
if (fileList.find(res) != fileList.end())
|
||||
return false;
|
||||
|
||||
std::ofstream file(baseDirectory + '/' + filename);
|
||||
if (!file.good())
|
||||
return false;
|
||||
|
||||
fileList[res] = filename;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user