mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-04 15:55:51 +00:00
Fix string concatenation
This commit is contained in:
parent
7077252b8d
commit
e7e32da5e2
@ -9,8 +9,6 @@ namespace urde
|
|||||||
* Modified to not use dolphin-binary-relative paths. */
|
* Modified to not use dolphin-binary-relative paths. */
|
||||||
kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlot slot)
|
kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlot slot)
|
||||||
{
|
{
|
||||||
kabufuda::SystemString userPath;
|
|
||||||
|
|
||||||
/* Detect where the User directory is. There are two different cases
|
/* Detect where the User directory is. There are two different cases
|
||||||
* 1. HKCU\Software\Dolphin Emulator\UserConfigPath exists
|
* 1. HKCU\Software\Dolphin Emulator\UserConfigPath exists
|
||||||
* -> Use this as the user directory path
|
* -> Use this as the user directory path
|
||||||
@ -36,14 +34,14 @@ kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlo
|
|||||||
bool my_documents_found = SUCCEEDED(
|
bool my_documents_found = SUCCEEDED(
|
||||||
SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, my_documents));
|
SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, my_documents));
|
||||||
|
|
||||||
|
kabufuda::SystemString path;
|
||||||
if (configPath[0]) /* Case 1 */
|
if (configPath[0]) /* Case 1 */
|
||||||
userPath = configPath;
|
path = configPath;
|
||||||
else if (my_documents_found) /* Case 2 */
|
else if (my_documents_found) /* Case 2 */
|
||||||
userPath = my_documents + _S("/Dolphin Emulator");
|
path = kabufuda::SystemString(my_documents) + _S("/Dolphin Emulator");
|
||||||
else /* Unable to find */
|
else /* Unable to find */
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
kabufuda::SystemString path = userPath;
|
|
||||||
path += hecl::SysFormat(_S("/GC/MemoryCard%c.USA.raw"),
|
path += hecl::SysFormat(_S("/GC/MemoryCard%c.USA.raw"),
|
||||||
slot == kabufuda::ECardSlot::SlotA ? _S('A') : _S('B'));
|
slot == kabufuda::ECardSlot::SlotA ? _S('A') : _S('B'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user