mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Ally Mappings
This commit is contained in:
@@ -33,7 +33,7 @@ namespace GHelper.Ally
|
|||||||
|
|
||||||
SettingsForm settings;
|
SettingsForm settings;
|
||||||
|
|
||||||
static ControllerMode mode = ControllerMode.Auto;
|
static ControllerMode _mode = ControllerMode.Auto;
|
||||||
static ControllerMode _applyMode = ControllerMode.Auto;
|
static ControllerMode _applyMode = ControllerMode.Auto;
|
||||||
static int _autoCount = 0;
|
static int _autoCount = 0;
|
||||||
|
|
||||||
@@ -420,6 +420,8 @@ namespace GHelper.Ally
|
|||||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 0x01, 0x01, (byte)_applyMode }, "Controller");
|
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 0x01, 0x01, (byte)_applyMode }, "Controller");
|
||||||
AsusHid.WriteInput(MappingSave);
|
AsusHid.WriteInput(MappingSave);
|
||||||
|
|
||||||
|
MappingZone(BindingZone.M1M2);
|
||||||
|
|
||||||
if (_applyMode == ControllerMode.Gamepad)
|
if (_applyMode == ControllerMode.Gamepad)
|
||||||
{
|
{
|
||||||
MappingZone(BindingZone.DPadUpDown);
|
MappingZone(BindingZone.DPadUpDown);
|
||||||
@@ -429,11 +431,9 @@ namespace GHelper.Ally
|
|||||||
MappingZone(BindingZone.AB);
|
MappingZone(BindingZone.AB);
|
||||||
MappingZone(BindingZone.XY);
|
MappingZone(BindingZone.XY);
|
||||||
MappingZone(BindingZone.ViewMenu);
|
MappingZone(BindingZone.ViewMenu);
|
||||||
|
MappingZone(BindingZone.Trigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
MappingZone(BindingZone.M1M2);
|
|
||||||
MappingZone(BindingZone.Trigger);
|
|
||||||
|
|
||||||
AsusHid.WriteInput(MappingSave);
|
AsusHid.WriteInput(MappingSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,6 +452,7 @@ namespace GHelper.Ally
|
|||||||
ApplyMode(mode);
|
ApplyMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_mode = mode;
|
||||||
AppConfig.Set("controller_mode", (int)mode);
|
AppConfig.Set("controller_mode", (int)mode);
|
||||||
settings.VisualiseController(mode);
|
settings.VisualiseController(mode);
|
||||||
}
|
}
|
||||||
@@ -459,20 +460,20 @@ namespace GHelper.Ally
|
|||||||
public void ToggleMode()
|
public void ToggleMode()
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case ControllerMode.Auto:
|
case ControllerMode.Auto:
|
||||||
mode = ControllerMode.Gamepad;
|
_mode = ControllerMode.Gamepad;
|
||||||
break;
|
break;
|
||||||
case ControllerMode.Gamepad:
|
case ControllerMode.Gamepad:
|
||||||
mode = ControllerMode.Mouse;
|
_mode = ControllerMode.Mouse;
|
||||||
break;
|
break;
|
||||||
case ControllerMode.Mouse:
|
case ControllerMode.Mouse:
|
||||||
mode = ControllerMode.Auto;
|
_mode = ControllerMode.Auto;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMode(mode);
|
SetMode(_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user