Make input settings requests submit-only
This commit is contained in:
parent
26a6026338
commit
4241bdf8a1
2 changed files with 7 additions and 6 deletions
|
|
@ -3245,6 +3245,7 @@ static void RequireRuntimeInputScreenUsesEveSurface(string root)
|
|||
|
||||
var requiredActionGameManagerSymbols = new[]
|
||||
{
|
||||
"SendRuntimeInputSettingsCommand(",
|
||||
"AetheriaRuntimeEveCommands.TrySendInputSettingsCommand",
|
||||
"AetheriaRuntimeEveCommandKind.SetBindingOverride",
|
||||
"AetheriaRuntimeEveCommandKind.SetActionBarEnabled"
|
||||
|
|
@ -3265,6 +3266,8 @@ static void RequireRuntimeInputScreenUsesEveSurface(string root)
|
|||
{
|
||||
"public static void CommitRuntimeInputBindingOverride",
|
||||
"public static void CommitRuntimeActionBarInput",
|
||||
"TrySendRuntimeInputSettingsCommand(",
|
||||
"private static bool TrySendRuntimeInputSettingsCommand(",
|
||||
"RuntimePlayerSettings.InputSettings.SetBindingOverride(actionName, bindingIndex, inputSystemPath)",
|
||||
"RuntimePlayerSettings.InputSettings.SetActionBarInputEnabled(inputSystemPath, enabled)"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
public static void RequestRuntimeInputBindingOverride(string actionName, int bindingIndex, string inputSystemPath)
|
||||
{
|
||||
TrySendRuntimeInputSettingsCommand(
|
||||
SendRuntimeInputSettingsCommand(
|
||||
AetheriaRuntimeEveCommandKind.SetBindingOverride,
|
||||
new AetheriaRuntimeInputSettingsCommandBody
|
||||
{
|
||||
|
|
@ -102,7 +102,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
public static void RequestRuntimeActionBarInput(string inputSystemPath, bool enabled)
|
||||
{
|
||||
TrySendRuntimeInputSettingsCommand(
|
||||
SendRuntimeInputSettingsCommand(
|
||||
AetheriaRuntimeEveCommandKind.SetActionBarEnabled,
|
||||
new AetheriaRuntimeInputSettingsCommandBody
|
||||
{
|
||||
|
|
@ -113,7 +113,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
"action-bar input");
|
||||
}
|
||||
|
||||
private static bool TrySendRuntimeInputSettingsCommand(
|
||||
private static void SendRuntimeInputSettingsCommand(
|
||||
AetheriaRuntimeEveCommandKind command,
|
||||
AetheriaRuntimeInputSettingsCommandBody body,
|
||||
string clientId,
|
||||
|
|
@ -130,16 +130,14 @@ public class ActionGameManager : MonoBehaviour
|
|||
out var error))
|
||||
{
|
||||
Debug.LogError($"Failed to submit Aetheria {label} Eve command: {error}");
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"Submitted Aetheria {label} Eve command: {submitted!.CommandId}");
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Failed to send Aetheria {label} Eve command: {ex}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue