56e5d99684
* 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> |
||
---|---|---|
.. | ||
applets | ||
configuration | ||
debugger | ||
multiplayer | ||
util | ||
about_dialog.cpp | ||
about_dialog.h | ||
aboutdialog.ui | ||
bootmanager.cpp | ||
bootmanager.h | ||
CMakeLists.txt | ||
compatdb.cpp | ||
compatdb.h | ||
compatdb.ui | ||
compatibility_list.cpp | ||
compatibility_list.h | ||
discord_impl.cpp | ||
discord_impl.h | ||
discord.h | ||
game_list_p.h | ||
game_list_worker.cpp | ||
game_list_worker.h | ||
game_list.cpp | ||
game_list.h | ||
hotkeys.cpp | ||
hotkeys.h | ||
Info.plist | ||
install_dialog.cpp | ||
install_dialog.h | ||
loading_screen.cpp | ||
loading_screen.h | ||
loading_screen.ui | ||
main.cpp | ||
main.h | ||
main.ui | ||
mini_dump.cpp | ||
mini_dump.h | ||
play_time_manager.cpp | ||
play_time_manager.h | ||
precompiled_headers.h | ||
qt_common.cpp | ||
qt_common.h | ||
startup_checks.cpp | ||
startup_checks.h | ||
uisettings.cpp | ||
uisettings.h | ||
vk_device_info.cpp | ||
vk_device_info.h | ||
yuzu.qrc | ||
yuzu.rc |