Implement writing for RWops

This commit is contained in:
Alexander van Gessel 2017-09-20 14:20:54 +02:00 committed by Jyrki Vesterinen
parent e707a916c3
commit 45f29a247e

View file

@ -61,6 +61,7 @@ rwops_ptr make_read_RWops(const std::string &path) {
return rw;
}
rwops_ptr make_write_RWops(const std::string &path) {
rwops_ptr rw(SDL_AllocRW(), &SDL_FreeRW);
@ -110,6 +111,7 @@ static Sint64 ofs_size (struct SDL_RWops * context) {
}
typedef std::pair<Sint64, std::ios_base::seekdir> offset_dir;
static offset_dir translate_seekdir(Sint64 offset, int whence) {
switch(whence){
case RW_SEEK_SET: