citra/src/yuzu
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
..
applets Merge pull request #11144 from flodavid/master 2023-10-11 09:23:52 -04:00
configuration Merge pull request #10519 from mdmrk/master 2023-10-08 17:11:34 -04:00
debugger kernel: convert KThread to new style 2023-03-12 22:09:09 -04:00
multiplayer uisettings: Fix typings 2023-07-21 10:56:07 -04:00
util yuzu: Save multiple resolutions per icon 2023-10-10 17:24:49 -06:00
about_dialog.cpp
about_dialog.h
aboutdialog.ui
bootmanager.cpp general: Use console mode helper across project 2023-08-22 21:58:23 -04:00
bootmanager.h general: remove atomic signal and wait 2023-06-22 09:25:23 -04:00
CMakeLists.txt Address review comments 2023-08-27 19:45:25 -04:00
compatdb.cpp general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
compatdb.h yuzu/compatdb: Rework compatibility submission system 2022-11-10 21:36:22 +01:00
compatdb.ui yuzu/compatdb: Rework compatibility submission system 2022-11-10 21:36:22 +01:00
compatibility_list.cpp
compatibility_list.h
discord_impl.cpp Address feedback 2023-07-26 00:41:24 -04:00
discord_impl.h yuzu: Replace httplib with QtNetworkRequest 2023-07-21 16:53:06 -06:00
discord.h
game_list_p.h Address review comments 2023-08-27 19:45:25 -04:00
game_list_worker.cpp qt: ensure worker cancellation is complete before clearing 2023-10-12 21:07:49 -04:00
game_list_worker.h qt: ensure worker cancellation is complete before clearing 2023-10-12 21:07:49 -04:00
game_list.cpp qt: ensure worker cancellation is complete before clearing 2023-10-12 21:07:49 -04:00
game_list.h Merge pull request #10519 from mdmrk/master 2023-10-08 17:11:34 -04:00
hotkeys.cpp fix format 2023-01-18 15:49:47 +01:00
hotkeys.h debug: Add renderdoc capture hotkey 2023-09-14 16:37:41 +03:00
Info.plist macOS: Make Yuzu show up in the Launchpad Games folder (#9594) 2023-01-09 16:43:45 -05:00
install_dialog.cpp main: Globally disable the "?" button on dialogs 2023-01-25 01:12:50 -05:00
install_dialog.h
loading_screen.cpp general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
loading_screen.h
loading_screen.ui
main.cpp Improvement in Directory Path Detection for Shortcuts (#11749) 2023-10-13 09:57:49 -06:00
main.h Merge pull request #11650 from german77/lle_album 2023-10-10 11:47:13 +02:00
main.ui yuzu: Allow to launch album applet from firmware 2023-10-02 11:29:12 -06:00
mini_dump.cpp
mini_dump.h
play_time_manager.cpp Address review comments 2023-08-27 19:45:25 -04:00
play_time_manager.h Address review comments 2023-08-27 19:45:25 -04:00
precompiled_headers.h CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
qt_common.cpp vulkan: Use newer VK_EXT_metal_surface to create surface for MoltenVK. 2023-06-30 23:46:03 -07:00
qt_common.h qt_common: Remove yuzu prefix 2023-05-03 18:11:53 -04:00
startup_checks.cpp android: native: Add support for custom Vulkan driver loading. 2023-06-03 00:05:31 -07:00
startup_checks.h startup_checks: Use Windows flow for *nix 2022-11-23 21:35:47 -05:00
uisettings.cpp uisettings: Add TODO for stretched aspect being ignored 2023-08-16 22:57:19 -04:00
uisettings.h Merge pull request #10519 from mdmrk/master 2023-10-08 17:11:34 -04:00
vk_device_info.cpp vulkan: centralize config 2023-08-02 00:05:14 +02:00
vk_device_info.h vk_device_info: Check only affected Intel drivers 2023-06-18 16:15:51 -04:00
yuzu.qrc
yuzu.rc