Saving a game not working because of minimap.png code
Bug #1209256 reported by
Nasenbaer
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
High
|
cghislai |
Bug Description
As long as the option --nozip=false, which is the default value, Widelands shows an error when saving a game.
This is due to the fact, that ZipFIlesystem does not support OpenStreamWrite(). Therefore we need to implement it.
Maybe it would be enough to write the data to a bit field and store it in the ZipFilesystem once closed? (but just brainstorming)
Related branches
lp:~widelands-dev/widelands/minimap_fix
- Nasenbaer: Approve
-
Diff: 532 lines (+237/-91)10 files modifiedsrc/game_io/game_preload_data_packet.cc (+2/-1)
src/graphic/image_loader.h (+8/-1)
src/graphic/image_loader_impl.cc (+6/-2)
src/graphic/image_loader_impl.h (+1/-1)
src/io/filesystem/zip_filesystem.cc (+97/-6)
src/io/filesystem/zip_filesystem.h (+23/-1)
src/ui_basic/icon.cc (+10/-6)
src/ui_basic/icon.h (+1/-1)
src/ui_fsmenu/loadgame.cc (+87/-72)
src/ui_fsmenu/loadgame.h (+2/-0)
Changed in widelands: | |
assignee: | nobody → cghislai (charlyghislain) |
To post a comment you must log in.
I see there is that zipWriteInFileInZip function that may even allow us to not buffer anything on our side. I will try to see what it gives.
I think the ideal solution would be to only work with zip files as it seems mandatory to share savegames in multiplayer games.
In the meantime the minimap branch has a check to prevent the error to happen.