* Save the game using a (writer) filter. * @param writer The filter to write the savegame to. * @param threaded Whether to try to perform the saving asynchronously. * @return Return the result of the action. #SL_OK or #SL_ERROR */
| 3076 | * @return Return the result of the action. #SL_OK or #SL_ERROR |
| 3077 | */ |
| 3078 | SaveOrLoadResult SaveWithFilter(std::shared_ptr<SaveFilter> writer, bool threaded) |
| 3079 | { |
| 3080 | try { |
| 3081 | _sl.action = SLA_SAVE; |
| 3082 | return DoSave(std::move(writer), threaded); |
| 3083 | } catch (...) { |
| 3084 | ClearSaveLoadState(); |
| 3085 | return SL_ERROR; |
| 3086 | } |
| 3087 | } |
| 3088 | |
| 3089 | /** |
| 3090 | * Determines the SaveLoadFormat that is connected to the given tag. |
no test coverage detected