summaryrefslogtreecommitdiffstats
path: root/client/SDL/dialogs/res
diff options
context:
space:
mode:
Diffstat (limited to 'client/SDL/dialogs/res')
-rw-r--r--client/SDL/dialogs/res/convert_res_to_c.cpp6
-rw-r--r--client/SDL/dialogs/res/sdl_resource_manager.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/client/SDL/dialogs/res/convert_res_to_c.cpp b/client/SDL/dialogs/res/convert_res_to_c.cpp
index 07309d5..8ef828a 100644
--- a/client/SDL/dialogs/res/convert_res_to_c.cpp
+++ b/client/SDL/dialogs/res/convert_res_to_c.cpp
@@ -79,6 +79,10 @@ static int readwrite(std::ofstream& out, std::ifstream& ifs)
{
size_t pos = 0;
char c = 0;
+
+ std::ios backup(nullptr);
+ backup.copyfmt(out);
+
while (ifs.read(&c, 1) && ifs.good())
{
unsigned val = c & 0xff;
@@ -89,6 +93,8 @@ static int readwrite(std::ofstream& out, std::ifstream& ifs)
out << std::endl;
}
+ out.copyfmt(backup);
+
return 0;
}
diff --git a/client/SDL/dialogs/res/sdl_resource_manager.cpp b/client/SDL/dialogs/res/sdl_resource_manager.cpp
index 90ccf31..0f0682a 100644
--- a/client/SDL/dialogs/res/sdl_resource_manager.cpp
+++ b/client/SDL/dialogs/res/sdl_resource_manager.cpp
@@ -49,7 +49,7 @@ SDL_RWops* SDLResourceManager::get(const std::string& type, const std::string& i
<< fs::absolute(path) << std::endl;
std::cerr << "file not found, application will fail" << std::endl;
}
- return SDL_RWFromFile(path.native().c_str(), "rb");
+ return SDL_RWFromFile(path.u8string().c_str(), "rb");
#endif
}