mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-04 17:53:17 +00:00
Use fs::path::native whenever possible, avoid unnecessary fs->string conversions in GUI code (#1064)
* Use filesystem::path whenever possible, remove fs::path::string * My hatred for Windows grows with every passing day * More Qt stuff * custom u8string formatter for fmt library * Use u8string for imgui * Fix toml errors hopefully * Fix not printing issue * Oh and on SDL * I hate Windows even more today * fix toml reading utf-8 paths also small fix for fmt::UTF * Formatting * Fix QT path to run games * Fix path logging in save data * Fix trophy path handling * Update game_list_frame.cpp fixed snd0path * Update main_window.cpp fix snd0path * Update main_window.cpp * paths finally fixed * git info in WIP versions title --------- Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev> Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
parent
54e2179337
commit
6295d6c416
30 changed files with 271 additions and 125 deletions
|
@ -51,8 +51,16 @@ void Initialize(const ::Vulkan::Instance& instance, const Frontend::WindowSDL& w
|
|||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||
io.DisplaySize = ImVec2((float)window.getWidth(), (float)window.getHeight());
|
||||
io.IniFilename = SDL_strdup(config_path.string().c_str());
|
||||
io.LogFilename = SDL_strdup(log_path.string().c_str());
|
||||
|
||||
auto path = config_path.u8string();
|
||||
char* config_file_buf = new char[path.size() + 1]();
|
||||
std::memcpy(config_file_buf, path.c_str(), path.size());
|
||||
io.IniFilename = config_file_buf;
|
||||
|
||||
path = log_path.u8string();
|
||||
char* log_file_buf = new char[path.size() + 1]();
|
||||
std::memcpy(log_file_buf, path.c_str(), path.size());
|
||||
io.LogFilename = log_file_buf;
|
||||
|
||||
ImFontGlyphRangesBuilder rb{};
|
||||
rb.AddRanges(io.Fonts->GetGlyphRangesDefault());
|
||||
|
@ -114,8 +122,8 @@ void Shutdown(const vk::Device& device) {
|
|||
Sdl::Shutdown();
|
||||
DestroyContext();
|
||||
|
||||
SDL_free(ini_filename);
|
||||
SDL_free(log_filename);
|
||||
delete[] (char*)ini_filename;
|
||||
delete[] (char*)log_filename;
|
||||
}
|
||||
|
||||
bool ProcessEvent(SDL_Event* event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue