mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2025-02-28 15:30:32 +01:00
Fix utf8 handling when opening recent files
This commit is contained in:
parent
0c9227a568
commit
aa77bad015
@ -47,11 +47,11 @@ void Toolbox::pushNewRecentFile(std::filesystem::path file, std::filesystem::pat
|
||||
writeFile.close();
|
||||
}
|
||||
|
||||
std::vector<std::string> Toolbox::getRecentFiles(std::filesystem::path settings) {
|
||||
std::vector<std::filesystem::path> Toolbox::getRecentFiles(std::filesystem::path settings) {
|
||||
nowide::ifstream readFile{path_to_utf8_encoded_string(settings / recent_files_file)};
|
||||
std::vector<std::string> recent;
|
||||
std::vector<std::filesystem::path> recent;
|
||||
for (std::string line; getline(readFile, line);) {
|
||||
recent.push_back(line);
|
||||
recent.push_back(to_path(line));
|
||||
}
|
||||
readFile.close();
|
||||
return recent;
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
namespace Toolbox {
|
||||
void pushNewRecentFile(std::filesystem::path file, std::filesystem::path settings);
|
||||
std::vector<std::string> getRecentFiles(std::filesystem::path settings);
|
||||
std::vector<std::filesystem::path> getRecentFiles(std::filesystem::path settings);
|
||||
|
||||
struct CustomConstraints {
|
||||
static void ContentSquare(ImGuiSizeCallbackData* data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user