summaryrefslogtreecommitdiffstats
path: root/client/SDL/dialogs/res
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
commit827a4c3faa27e0c186452585b15094eee1119085 (patch)
treee6a08b0c767863d66f7d4a9de80db5edc7db29be /client/SDL/dialogs/res
parentReleasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff)
downloadfreerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz
freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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
}