mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-28 05:06:42 +00:00
commit
42964e8531
11 changed files with 33 additions and 47 deletions
|
@ -19,7 +19,7 @@ IR/Forward = `Axis 116`
|
|||
IR/Backward = `Axis 117`
|
||||
IR/Hide = `Button 118`
|
||||
IR/Height = 50
|
||||
IR/Width = 30
|
||||
IR/Width = 50
|
||||
IR/Center = 50
|
||||
Swing/Up = `Axis 120`
|
||||
Swing/Down = `Axis 121`
|
||||
|
@ -158,7 +158,7 @@ IR/Forward = `Axis 116`
|
|||
IR/Backward = `Axis 117`
|
||||
IR/Hide = `Button 118`
|
||||
IR/Height = 50
|
||||
IR/Width = 30
|
||||
IR/Width = 50
|
||||
IR/Center = 50
|
||||
Swing/Up = `Axis 120`
|
||||
Swing/Down = `Axis 121`
|
||||
|
@ -297,7 +297,7 @@ IR/Forward = `Axis 116`
|
|||
IR/Backward = `Axis 117`
|
||||
IR/Hide = `Button 118`
|
||||
IR/Height = 50
|
||||
IR/Width = 30
|
||||
IR/Width = 50
|
||||
IR/Center = 50
|
||||
Swing/Up = `Axis 120`
|
||||
Swing/Down = `Axis 121`
|
||||
|
@ -436,7 +436,7 @@ IR/Forward = `Axis 116`
|
|||
IR/Backward = `Axis 117`
|
||||
IR/Hide = `Button 118`
|
||||
IR/Height = 50
|
||||
IR/Width = 30
|
||||
IR/Width = 50
|
||||
IR/Center = 50
|
||||
Swing/Up = `Axis 120`
|
||||
Swing/Down = `Axis 121`
|
||||
|
|
|
@ -19,7 +19,7 @@ IR/Forward = `Axis 116`
|
|||
IR/Backward = `Axis 117`
|
||||
IR/Hide = `Button 118`
|
||||
IR/Height = 50
|
||||
IR/Width = 30
|
||||
IR/Width = 50
|
||||
IR/Center = 50
|
||||
Swing/Up = `Axis 120`
|
||||
Swing/Down = `Axis 121`
|
||||
|
|
|
@ -298,12 +298,14 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
|||
if (!pressed && overlayPointer != null)
|
||||
{
|
||||
overlayPointer.onTouch(event);
|
||||
float[] axises = overlayPointer.getAxisValues();
|
||||
float[] axes = overlayPointer.getAxisValues();
|
||||
|
||||
NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR + 2,
|
||||
axises[0]);
|
||||
NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR + 4,
|
||||
axises[1]);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
NativeLibrary
|
||||
.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR_UP + i,
|
||||
axes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
invalidate();
|
||||
|
|
|
@ -127,9 +127,11 @@ public class InputOverlayPointer
|
|||
|
||||
public float[] getAxisValues()
|
||||
{
|
||||
float[] ir = {0f, 0f};
|
||||
ir[0] = axes[0];
|
||||
ir[1] = axes[1];
|
||||
return axes;
|
||||
float[] iraxes = {0f, 0f, 0f, 0f};
|
||||
iraxes[1] = axes[0];
|
||||
iraxes[0] = axes[0];
|
||||
iraxes[3] = axes[1];
|
||||
iraxes[2] = axes[1];
|
||||
return iraxes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public final class DirectoryInitialization
|
|||
"org.dolphinemu.dolphinemu.DIRECTORY_INITIALIZATION";
|
||||
|
||||
public static final String EXTRA_STATE = "directoryState";
|
||||
private static final Integer WiimoteNewVersion = 2;
|
||||
private static volatile DirectoryInitializationState directoryState = null;
|
||||
private static String userPath;
|
||||
private static String internalPath;
|
||||
|
@ -145,7 +146,20 @@ public final class DirectoryInitialization
|
|||
createWiimoteProfileDirectory(profileDirectory);
|
||||
|
||||
copyAsset("GCPadNew.ini", new File(configDirectory, "GCPadNew.ini"), true, context);
|
||||
copyAsset("WiimoteNew.ini", new File(configDirectory, "WiimoteNew.ini"), false, context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (prefs.getInt("WiimoteNewVersion", 0) != WiimoteNewVersion)
|
||||
{
|
||||
copyAsset("WiimoteNew.ini", new File(configDirectory, "WiimoteNew.ini"), true, context);
|
||||
SharedPreferences.Editor sPrefsEditor = prefs.edit();
|
||||
sPrefsEditor.putInt("WiimoteNewVersion", WiimoteNewVersion);
|
||||
sPrefsEditor.apply();
|
||||
}
|
||||
else
|
||||
{
|
||||
copyAsset("WiimoteNew.ini", new File(configDirectory, "WiimoteNew.ini"), false, context);
|
||||
}
|
||||
|
||||
copyAsset("WiimoteProfile.ini", new File(profileDirectory, "WiimoteProfile.ini"), true,
|
||||
context);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue