mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
[Android] Fix multi-gamecube controller input, config changes
This commit is contained in:
parent
3a04c77180
commit
9bb63bf2eb
@ -45,14 +45,14 @@ public final class UserPreferences
|
||||
else
|
||||
editor.putString("cpuCorePref", getConfig("Dolphin.ini", "Core", "CPUCore", "3"));
|
||||
|
||||
editor.putBoolean("dualCorePref", getConfig("Dolphin.ini", "Core", "CPUThread", "False").equals("True"));
|
||||
editor.putBoolean("fastmemPref", getConfig("Dolphin.ini", "Core", "Fastmem", "False").equals("True"));
|
||||
editor.putBoolean("dualCorePref", getConfig("Dolphin.ini", "Core", "CPUThread", "True").equals("True"));
|
||||
editor.putBoolean("fastmemPref", getConfig("Dolphin.ini", "Core", "Fastmem", "True").equals("True"));
|
||||
|
||||
editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend", "OGL"));
|
||||
editor.putBoolean("showFPS", getConfig("gfx_opengl.ini", "Settings", "ShowFPS", "False").equals("True"));
|
||||
editor.putBoolean("drawOnscreenControls", getConfig("Dolphin.ini", "Android", "ScreenControls", "True").equals("True"));
|
||||
|
||||
editor.putString("internalResolution", getConfig("gfx_opengl.ini", "Settings", "EFBScale", "2") );
|
||||
editor.putString("internalResolution", getConfig("gfx_opengl.ini", "Settings", "EFBScale", "2"));
|
||||
editor.putString("FSAA", getConfig("gfx_opengl.ini", "Settings", "MSAA", "0"));
|
||||
editor.putString("anisotropicFiltering", getConfig("gfx_opengl.ini", "Enhancements", "MaxAnisotropy", "0"));
|
||||
editor.putString("postProcessingShader", getConfig("gfx_opengl.ini", "Enhancements", "PostProcessingShader", ""));
|
||||
@ -62,10 +62,14 @@ public final class UserPreferences
|
||||
editor.putBoolean("disableFog", getConfig("gfx_opengl.ini", "Settings", "DisableFog", "False").equals("True"));
|
||||
editor.putBoolean("skipEFBAccess", getConfig("gfx_opengl.ini", "Hacks", "EFBAccessEnable", "False").equals("True"));
|
||||
editor.putBoolean("ignoreFormatChanges", getConfig("gfx_opengl.ini", "Hacks", "EFBEmulateFormatChanges", "False").equals("True"));
|
||||
editor.putString("stereoscopyMode", getConfig("gfx_opengl.ini", "Enhancements", "StereoMode", "0"));
|
||||
editor.putString("stereoscopyMode", getConfig("gfx_opengl.ini", "Enhancements", "StereoMode", "0"));
|
||||
editor.putBoolean("stereoSwapEyes", getConfig("gfx_opengl.ini", "Enhancements", "StereoSwapEyes", "False").equals("True"));
|
||||
editor.putString("stereoDepth", getConfig("gfx_opengl.ini", "Enhancements", "StereoDepth", "20"));
|
||||
editor.putString("stereoConvergence", getConfig("gfx_opengl.ini", "Enhancements", "StereoConvergence", "20"));
|
||||
editor.putBoolean("enableController1", getConfig("Dolphin.ini", "Settings", "SIDevice0", "6") == "6");
|
||||
editor.putBoolean("enableController2", getConfig("Dolphin.ini", "Settings", "SIDevice1", "0") == "6");
|
||||
editor.putBoolean("enableController3", getConfig("Dolphin.ini", "Settings", "SIDevice2", "0") == "6");
|
||||
editor.putBoolean("enableController4", getConfig("Dolphin.ini", "Settings", "SIDevice3", "0") == "6");
|
||||
|
||||
String efbCopyOn = getConfig("gfx_opengl.ini", "Hacks", "EFBCopyEnable", "True");
|
||||
String efbToTexture = getConfig("gfx_opengl.ini", "Hacks", "EFBToTextureEnable", "True");
|
||||
@ -136,7 +140,7 @@ public final class UserPreferences
|
||||
String currentEmuCore = prefs.getString("cpuCorePref", "0");
|
||||
|
||||
// Fastmem JIT core usage
|
||||
boolean isUsingFastmem = prefs.getBoolean("fastmemPref", false);
|
||||
boolean isUsingFastmem = prefs.getBoolean("fastmemPref", true);
|
||||
|
||||
// Current video backend being used. Falls back to software rendering upon error.
|
||||
String currentVideoBackend = prefs.getString("gpuPref", "Software Rendering");
|
||||
@ -207,6 +211,13 @@ public final class UserPreferences
|
||||
// Stereoscopy convergence
|
||||
String stereoscopyConvergence = prefs.getString("stereoConvergence", "20");
|
||||
|
||||
// Controllers
|
||||
// Controller 1 never gets disconnected due to touch screen
|
||||
//boolean enableController1 = prefs.getBoolean("enableController1", true);
|
||||
boolean enableController2 = prefs.getBoolean("enableController2", false);
|
||||
boolean enableController3 = prefs.getBoolean("enableController3", false);
|
||||
boolean enableController4 = prefs.getBoolean("enableController4", false);
|
||||
|
||||
// CPU related Settings
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Core", "CPUCore", currentEmuCore);
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Core", "CPUThread", isUsingDualCore ? "True" : "False");
|
||||
@ -280,5 +291,9 @@ public final class UserPreferences
|
||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoSwapEyes", stereoscopyEyeSwap ? "True" : "False");
|
||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoDepth", stereoscopySeparation);
|
||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "StereoConvergence", stereoscopyConvergence);
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice0", "6");
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice1", enableController2 ? "6" : "0");
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice2", enableController3 ? "6" : "0");
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Settings", "SIDevice3", enableController4 ? "6" : "0");
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<!-- CPU Settings -->
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:defaultValue="true"
|
||||
android:key="dualCorePref"
|
||||
android:summary="@string/dual_core_descrip"
|
||||
android:title="@string/dual_core"/>
|
||||
@ -20,7 +20,7 @@
|
||||
android:entryValues="@array/int_emu_cores"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:defaultValue="true"
|
||||
android:key="fastmemPref"
|
||||
android:summary="@string/fastmem_desc"
|
||||
android:title="@string/fastmem"/>
|
||||
|
@ -201,20 +201,12 @@ namespace ButtonManager
|
||||
auto it = m_controllers.find(dev);
|
||||
if (it != m_controllers.end())
|
||||
return it->second->PressEvent(button, action);
|
||||
|
||||
m_controllers[dev] = new InputDevice(dev);
|
||||
return m_controllers[dev]->PressEvent(button, action);
|
||||
}
|
||||
void GamepadAxisEvent(const std::string& dev, int axis, float value)
|
||||
{
|
||||
auto it = m_controllers.find(dev);
|
||||
if (it != m_controllers.end())
|
||||
{
|
||||
it->second->AxisEvent(axis, value);
|
||||
return;
|
||||
}
|
||||
m_controllers[dev] = new InputDevice(dev);
|
||||
m_controllers[dev]->AxisEvent(axis, value);
|
||||
}
|
||||
void Shutdown()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user