mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 23:58:59 +00:00
change registry flag
This commit is contained in:
parent
b7b9fe5369
commit
813d535002
6 changed files with 14 additions and 10 deletions
|
@ -12,13 +12,13 @@
|
||||||
|
|
||||||
// The normal user directory
|
// The normal user directory
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NORMAL_USER_DIR "Dolphin Emulator"
|
#define NORMAL_USER_DIR "Dolphin MPN"
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#define NORMAL_USER_DIR "Library/Application Support/Dolphin"
|
#define NORMAL_USER_DIR "Library/Application Support/Dolphin MPN"
|
||||||
#elif defined(ANDROID)
|
#elif defined(ANDROID)
|
||||||
#define NORMAL_USER_DIR "/sdcard/dolphin-emu"
|
#define NORMAL_USER_DIR "/sdcard/dolphin-mpn"
|
||||||
#else
|
#else
|
||||||
#define NORMAL_USER_DIR "dolphin-emu"
|
#define NORMAL_USER_DIR "dolphin-mpn"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The portable user directory
|
// The portable user directory
|
||||||
|
|
|
@ -118,7 +118,7 @@ const char* GetGeckoCodeHandlerPath()
|
||||||
case 1:
|
case 1:
|
||||||
return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
|
return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
|
||||||
default:
|
default:
|
||||||
return GECKO_CODE_HANDLER; // Fallback
|
return GECKO_CODE_HANDLER_MPN; // Fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,8 @@ const char* GetGeckoCodeHandlerPath()
|
||||||
{
|
{
|
||||||
case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock)
|
case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock)
|
||||||
case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
|
case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
|
||||||
default: return GECKO_CODE_HANDLER; // Fallback
|
default:
|
||||||
|
return GECKO_CODE_HANDLER_MPN; // Fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,8 @@ const char* GetGeckoCodeHandlerPath()
|
||||||
{
|
{
|
||||||
case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock)
|
case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock)
|
||||||
case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
|
case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
|
||||||
default: return GECKO_CODE_HANDLER; // Fallback
|
default:
|
||||||
|
return GECKO_CODE_HANDLER_MPN; // Fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,9 @@ void GeneralPane::CreateCheats()
|
||||||
m_combobox_codehandler = new QComboBox();
|
m_combobox_codehandler = new QComboBox();
|
||||||
|
|
||||||
m_combobox_codehandler->addItem(tr("Dolphin (Stock)"), QVariant(0));
|
m_combobox_codehandler->addItem(tr("Dolphin (Stock)"), QVariant(0));
|
||||||
m_combobox_codehandler->addItem(tr("MPN (Super Extended)"), QVariant(2));
|
m_combobox_codehandler->addItem(tr("MPN (Extended)"), QVariant(1));
|
||||||
|
|
||||||
|
m_combobox_codehandler->setCurrentIndex(1);
|
||||||
|
|
||||||
code_handler_layout->addRow(code_handler_label, m_combobox_codehandler);
|
code_handler_layout->addRow(code_handler_label, m_combobox_codehandler);
|
||||||
cheats_group_layout->addLayout(code_handler_layout);
|
cheats_group_layout->addLayout(code_handler_layout);
|
||||||
|
|
|
@ -318,7 +318,7 @@ void SetUserDirectory(std::string custom_path)
|
||||||
wil::unique_hkey hkey;
|
wil::unique_hkey hkey;
|
||||||
DWORD local = 0;
|
DWORD local = 0;
|
||||||
std::unique_ptr<TCHAR[]> configPath;
|
std::unique_ptr<TCHAR[]> configPath;
|
||||||
if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Dolphin Emulator"), 0, KEY_QUERY_VALUE,
|
if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Dolphin MPN"), 0, KEY_QUERY_VALUE,
|
||||||
hkey.put()) == ERROR_SUCCESS)
|
hkey.put()) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DWORD size = sizeof(local);
|
DWORD size = sizeof(local);
|
||||||
|
@ -372,7 +372,7 @@ void SetUserDirectory(std::string custom_path)
|
||||||
// they will use this as the User directory instead.
|
// they will use this as the User directory instead.
|
||||||
// (If we're in this case, then this key doesn't exist, so it's OK to set it.)
|
// (If we're in this case, then this key doesn't exist, so it's OK to set it.)
|
||||||
std::wstring wstr_path = UTF8ToWString(user_path);
|
std::wstring wstr_path = UTF8ToWString(user_path);
|
||||||
RegSetKeyValueW(HKEY_CURRENT_USER, TEXT("Software\\Dolphin Emulator"), TEXT("UserConfigPath"),
|
RegSetKeyValueW(HKEY_CURRENT_USER, TEXT("Software\\Dolphin MPN"), TEXT("UserConfigPath"),
|
||||||
REG_SZ, wstr_path.c_str(),
|
REG_SZ, wstr_path.c_str(),
|
||||||
static_cast<DWORD>((wstr_path.size() + 1) * sizeof(wchar_t)));
|
static_cast<DWORD>((wstr_path.size() + 1) * sizeof(wchar_t)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue