mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Android: Move profile check to when it is saving
This commit is contained in:
@ -499,6 +499,22 @@ public final class SettingsFile
|
|||||||
{
|
{
|
||||||
String profile = gameId + "_Wii" + padId;
|
String profile = gameId + "_Wii" + padId;
|
||||||
|
|
||||||
|
String wiiConfigPath =
|
||||||
|
DirectoryInitialization.getUserDirectory() + "/Config/Profiles/Wiimote/" +
|
||||||
|
profile + ".ini";
|
||||||
|
File wiiProfile = new File(wiiConfigPath);
|
||||||
|
// If it doesn't exist, create it
|
||||||
|
if (!wiiProfile.exists())
|
||||||
|
{
|
||||||
|
String defautlWiiProfilePath =
|
||||||
|
DirectoryInitialization.getUserDirectory() +
|
||||||
|
"/Config/Profiles/Wiimote/WiimoteProfile.ini";
|
||||||
|
DirectoryInitialization.copyFile(defautlWiiProfilePath, wiiConfigPath);
|
||||||
|
|
||||||
|
NativeLibrary.SetProfileSetting(profile, Settings.SECTION_PROFILE, "Device",
|
||||||
|
"Android/" + (Integer.valueOf(padId) + 4) + "/Touchscreen");
|
||||||
|
}
|
||||||
|
|
||||||
NativeLibrary.SetProfileSetting(profile, Settings.SECTION_PROFILE, key,
|
NativeLibrary.SetProfileSetting(profile, Settings.SECTION_PROFILE, key,
|
||||||
value);
|
value);
|
||||||
|
|
||||||
@ -565,19 +581,7 @@ public final class SettingsFile
|
|||||||
DirectoryInitialization.getUserDirectory() + "/Config/Profiles/Wiimote/" +
|
DirectoryInitialization.getUserDirectory() + "/Config/Profiles/Wiimote/" +
|
||||||
profile + ".ini";
|
profile + ".ini";
|
||||||
|
|
||||||
File wiiProfile = new File(wiiConfigPath);
|
return new File(wiiConfigPath);
|
||||||
// If it doesn't exist, create it
|
|
||||||
if (!wiiProfile.exists())
|
|
||||||
{
|
|
||||||
String defautlWiiProfilePath =
|
|
||||||
DirectoryInitialization.getUserDirectory() +
|
|
||||||
"/Config/Profiles/Wiimote/WiimoteProfile.ini";
|
|
||||||
DirectoryInitialization.copyFile(defautlWiiProfilePath, wiiConfigPath);
|
|
||||||
|
|
||||||
NativeLibrary.SetProfileSetting(profile, Settings.SECTION_PROFILE, "Device",
|
|
||||||
"Android/" + (Integer.valueOf(padId) + 4) + "/Touchscreen");
|
|
||||||
}
|
|
||||||
return wiiProfile;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SettingSection sectionFromLine(String line, boolean isCustomGame)
|
private static SettingSection sectionFromLine(String line, boolean isCustomGame)
|
||||||
|
Reference in New Issue
Block a user