yuzu/src
DanielSvoboda 56e5d99684
Improvement in Directory Path Detection for Shortcuts (#11749)
* Improvement in Directory Path Detection for Shortcuts

This pull request updates how the directory path for shortcuts is determined. The main changes are:

1. Replaced the use of environment variables to determine the path of the desktop and applications menu with `QStandardPaths::writableLocation`. This change addresses an issue where the desktop path was not correctly identified when its location was customized, as shown in the attached screenshot.

2. Added conversion from `QString` to `std::string` using `toUtf8()`, which correctly handles non-ASCII characters in directory paths. This change ensures that directory paths containing Portuguese words like "Área de trabalho" are supported.

3. Replaced directory checking using `Common::FS::IsDir()` with `QDir::exists()`.

These changes should improve cross-platform compatibility and code robustness. Because it couldn't locate my desktop, which wasn't on the C drive, but on the F, and even though localization wouldn't work because it was setting it to find the 'Desktop' folder and in the computer's language it says 'Área de trabalho', that will fix for other languages too.

* Update main.cpp

* formatting

* Update src/yuzu/main.cpp

Co-authored-by: Tobias <thm.frey@gmail.com>

* Update src/yuzu/main.cpp

Co-authored-by: Tobias <thm.frey@gmail.com>

* Update main.cpp

* Update main.cpp

* Update main.cpp

desktopPath > desktop_Path
applicationsPath > applications_Path

* Update main.cpp

* formatting

* Update main.cpp

This code will attempt to use QStandardPaths to find the applications directory. If that fails, it will resort to using the ~/.local/share/applications directory, which is a common location for application shortcuts in Linux.

* Update main.cpp

* formatting

---------

Co-authored-by: Tobias <thm.frey@gmail.com>
2023-10-13 09:57:49 -06:00
..
android Merge pull request #11649 from t895/driver-manager 2023-10-13 09:28:53 -04:00
audio_core Clear DSP buffer after each execution 2023-10-10 18:22:08 +01:00
common Merge pull request #11746 from liamwhite/relr 2023-10-12 18:23:31 -04:00
core Merge pull request #11766 from liamwhite/open-sesame 2023-10-13 09:29:05 -04:00
dedicated_room msvc: set warning level to /W4 globally 2023-09-03 18:42:10 +04:00
input_common ci: fix new codespell errors 2023-10-02 18:03:05 -04:00
network msvc: set warning level to /W4 globally 2023-09-03 18:42:10 +04:00
shader_recompiler ci: fix new codespell errors 2023-10-02 18:03:05 -04:00
tests msvc: set warning level to /W4 globally 2023-09-03 18:42:10 +04:00
video_core Merge pull request #11751 from Kelebek1/transition_msaa_image 2023-10-12 11:17:20 -04:00
web_service Warnings cleanup for GCC 13 and Clang 16 2023-08-25 19:22:31 -04:00
yuzu Improvement in Directory Path Detection for Shortcuts (#11749) 2023-10-13 09:57:49 -06:00
yuzu_cmd cmd/yuzu: Remove uncaught usage of stoi 2023-09-13 13:52:09 -04:00
.clang-format chore: make yuzu REUSE compliant 2022-07-27 12:53:49 +02:00
CMakeLists.txt ci: fix msvc when used with LTO (#11459) 2023-09-11 23:25:21 +02:00