citra/src
JosJuice 3f4b57635e
android: Use case insensitivity in DocumentsTree (#7115)
* android: Unify DocumentNode's `key` and `name`

They're effectively the same data, just obtained in different ways.

* android: Remove getFilenameWithExtensions method

After the previous commit, there's only one remaining use of
getFilenameWithExtensions. Let's get rid of that one in favor of
DocumentFile.getName so we no longer need to do manual URI parsing.

* android: Use case insensitivity in DocumentsTree

External storage on Android is case insensitive. This is still the case
when accessing it through SAF. (Of course, SAF makes no guarantees about
whether the storage location picked by the user is backed by external
storage or whether it's case insensitive, but I'm just going to ignore
that for now because I am *so tired of SAF*)

Because the underlying file system is case insensitive, Citra's caching
layer that had to be implemented because SAF's performance is atrocious
also needs to be case insensitive. Otherwise, we get a problem in the
following scenario:

1. Citra wants to check if a particular folder exists in sdmc, and if
   not, create it.
2. The folder does exist, but it has a different capitalization than
   Citra expects, due to a mismatch between Citra's code and (typically)
   files dumped from a real 3DS using ThreeSD.
3. Citra tries to open the folder, but DocumentsTree fails to find it,
   because the case doesn't match.
4. Citra then tries to create the folder, but creating the folder fails,
   because the underlying filesystem considers the folder to exist.
5. The game fails to start.

(Sorry, did I say creating the folder fails? Actually, a new folder does
get created, with " (1)" appended to the end of the name. SAF makes no
guarantees whatsoever about what happens in this situation – it's all
determined by the storage provider!)

This commit makes the caching layer case insensitive so that the
described scenario will work better.
2023-11-07 11:46:25 -08:00
..
android android: Use case insensitivity in DocumentsTree (#7115) 2023-11-07 11:46:25 -08:00
audio_core audio_core: Replace AAC decoders with single FAAD2-based decoder. (#7098) 2023-11-04 14:56:13 -07:00
citra frontend: Use inverted use_gles as a fallback for GL initialization. (#7117) 2023-11-05 17:23:54 -08:00
citra_qt arm: De-virtualize ThreadContext (#7119) 2023-11-06 17:55:30 -08:00
common video_core: Refactor GLSL fragment emitter (#7093) 2023-11-06 12:26:28 -08:00
core arm: De-virtualize ThreadContext (#7119) 2023-11-06 17:55:30 -08:00
dedicated_room build: Expose ENABLE_SCRIPTING and ENABLE_WEB_SERVICE flags as public. (#6872) 2023-08-07 03:12:49 -07:00
input_common automap: fix power button mapping (#6972) 2023-09-14 14:41:55 -07:00
network build: Enable link time optimization in release builds. (#6887) 2023-08-26 11:15:13 -07:00
tests arm: De-virtualize ThreadContext (#7119) 2023-11-06 17:55:30 -08:00
video_core video_core: Use binary memory-literals for memory-sizes (#7127) 2023-11-06 23:38:54 +02:00
web_service build: Enable link time optimization in release builds. (#6887) 2023-08-26 11:15:13 -07:00
.clang-format clang format: add objective c++ formatting 2022-01-10 13:52:39 +01:00
CMakeLists.txt build: Fortify non-MSVC builds. (#7120) 2023-11-06 17:55:41 -08:00