dolphin/Source/Core/VideoCommon/Assets
JosJuice 86910f406e VideoCommon: Fix std::filesystem::path encoding conversion
In std::string, you can store strings using any encoding, but in Dolphin
we have decided to use UTF-8. The problem is that if you convert between
std::string and std::filesystem::path using the built-in methods, the
standard library will make up its own assumption of what encoding you're
using in the std::string. On most OSes this is UTF-8, but on Windows
it's whatever the user's code page is.

What I believe is the C++ standard authors' intended solution to this is
to use std::u8string instead of std::string, but that's a big hassle to
move over to, because there's no convenient way to convert between
std::string and std::u8string. Instead, in Dolphin, we have added helper
functions that convert between std::string and std::filesystem::path in
the manner we want. You *always* have to use these when converting
between std::string and std::filesystem::path, otherwise we get these
kinds of encoding problems that we've been having with custom textures.

Fixes https://bugs.dolphin-emu.org/issues/13328.
2023-08-16 09:56:56 +02:00
..
CustomAsset.cpp VideoCommon: add additional locks around asset access and usage to ensure thread safety 2023-06-05 16:19:46 -05:00
CustomAsset.h VideoCommon: fix some compiler warnings for CustomAsset. FreeBSD compiler complained about a defaulted move constructor due to the mutex being implicitly deleted. Additionally, the const owning library deleted the copy constructor. 2023-07-16 19:45:55 -05:00
CustomAssetLibrary.cpp
CustomAssetLibrary.h VideoCommon: initialize load info variables 2023-07-16 12:56:03 -05:00
CustomAssetLoader.cpp VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader 2023-07-09 12:21:34 -05:00
CustomAssetLoader.h VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader 2023-07-09 12:21:34 -05:00
CustomTextureData.cpp VideoCommon: when loading a PNG with no custom texture data levels already, create a level, this avoids a potential segfault 2023-06-03 12:19:30 -05:00
CustomTextureData.h VideoCommon: when loading a PNG with no custom texture data levels already, create a level, this avoids a potential segfault 2023-06-03 12:19:30 -05:00
DirectFilesystemAssetLibrary.cpp VideoCommon: Fix std::filesystem::path encoding conversion 2023-08-16 09:56:56 +02:00
DirectFilesystemAssetLibrary.h VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader 2023-07-09 12:21:34 -05:00
MaterialAsset.cpp VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader 2023-07-09 12:21:34 -05:00
MaterialAsset.h VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader 2023-07-09 12:21:34 -05:00
ShaderAsset.cpp VideoCommon: add a pixel shader asset 2023-06-30 01:32:53 -05:00
ShaderAsset.h VideoCommon: add a pixel shader asset 2023-06-30 01:32:53 -05:00
TextureAsset.cpp VideoCommon: don't treat incorrect aspect ratio or sizes that aren't a multiple of native textures as an error 2023-06-12 21:19:29 -05:00
TextureAsset.h VideoCommon: add multithreaded asset loader and define a texture asset 2023-06-02 17:31:31 -05:00