Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Master/NucleusCoopTool/Forms/HandlerScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ private void LoadAutoCompleteSource()
"Game.ProtoInput.RenameNamedPipes",
"Game.ProtoInput.XinputHook",
"Game.ProtoInput.UseOpenXinput",
"Game.ProtoInput.TranslateMKBtoXinput",
"Game.ProtoInput.UseDinputRedirection",
"Game.Hook.DInputEnabled",
"Game.Hook.DInputForceDisable",
Expand Down
1 change: 1 addition & 0 deletions Master/NucleusGaming/Coop/GameProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public static bool UseNicknames
set => useNicknames = value;
}


private static bool audioDefaultSettings;
public static bool AudioDefaultSettings
{
Expand Down
20 changes: 13 additions & 7 deletions Master/NucleusGaming/Coop/Generic/GenericGameHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Nucleus.Gaming.Coop.Generic.Cursor;
using Nucleus.Gaming.Coop.InputManagement;
using Nucleus.Gaming.Coop.InputManagement.Gamepads;
using Nucleus.Gaming.Coop.InputManagement.Structs;
using Nucleus.Gaming.Coop.ProtoInput;
using Nucleus.Gaming.Forms;
using Nucleus.Gaming.Platform.PCSpecs;
Expand Down Expand Up @@ -1491,7 +1492,9 @@ public string Play()

if (gen.XInputPlusDll?.Length > 0 && !gen.ProcessChangesAtEnd)
{
XInputPlusDll.SetupXInputPlusDll(player, i, setupDll);
if (gen.ProtoInput.TranslateMKBtoXinput && (player.IsRawMouse || player.IsRawKeyboard))
XInputPlusDll.SetupXInputPlusDll(player, i, setupDll, true); //last bool is block Xinput
else XInputPlusDll.SetupXInputPlusDll(player, i, setupDll, false);
}

if (gen.UseDevReorder && !gen.ProcessChangesAtEnd)
Expand Down Expand Up @@ -2757,7 +2760,7 @@ public string Play()
}
}
}

//Set up raw input window
//if (player.IsRawKeyboard || player.IsRawMouse)
{
Expand Down Expand Up @@ -3079,9 +3082,12 @@ private void ProcessChangeAtEnd()
setupDll = false;
}

if (gen.XInputPlusDll?.Length > 0)
if (gen.XInputPlusDll?.Length > 0 )
{
XInputPlusDll.SetupXInputPlusDll(player, i, setupDll);
//last bool is block Xinput. used to block real Xinput if translating
if (gen.ProtoInput.TranslateMKBtoXinput && (player.IsRawMouse || player.IsRawKeyboard))
XInputPlusDll.SetupXInputPlusDll(player, i, setupDll, true);
else XInputPlusDll.SetupXInputPlusDll(player, i, setupDll, false);
}

if (gen.UseDevReorder)
Expand Down Expand Up @@ -3290,10 +3296,10 @@ private void ProcessChangeAtEnd()
GamepadNavigation.StopUINavigation();
GameProfile.SaveGameProfile(profile);
}

gen.OnFinishedSetup?.Invoke();

WindowsMerger.Instance?.InsertGameWindows();
WindowsMerger.Instance?.InsertGameWindows();
}

struct UpdateTickThread
Expand Down Expand Up @@ -3599,7 +3605,7 @@ public void End(bool fromStopButton)
hasEnded = true;
IsRunning = false;
}

public void Log(StreamWriter writer)
{
}
Expand Down
1 change: 1 addition & 0 deletions Master/NucleusGaming/Coop/Generic/GenericGameInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class GenericGameInfo
public bool SendFakeFocusMsg;
public bool SplitDivCompatibility = true;
public bool SetTopMostAtEnd;
public bool ForwardWindowToProtoInput;
public bool Favorite;

public void AddOption(string name, string desc, string key, object value, object defaultValue)
Expand Down
225 changes: 187 additions & 38 deletions Master/NucleusGaming/Coop/ProtoInput/ProtoInput.cs

Large diffs are not rendered by default.

134 changes: 134 additions & 0 deletions Master/NucleusGaming/Coop/ProtoInput/ProtoInputEnumsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public enum SetWindowPosHook
DontReposition
}



public enum MoveWindowHook
{
True = 1,
Expand All @@ -32,4 +34,136 @@ public enum SetRemoveBorderHook
True = 1,
DontWait
}

public enum Key
{

Back = 8,
Tab = 9,

Clear = 12,
Return = 13,

Shift = 16,
Control = 17,
Menu = 18,
Pause = 19,
Capital = 20,

Escape = 27,

Space = 32,
Prior = 33,
Next = 34,
End = 35,
Home = 36,
Left = 37,
Up = 38,
Right = 39,
Down = 40,
Select = 41,
Print = 42,
Execute = 43,
Snapshot = 44,
Insert = 45,
Delete = 46,
Help = 47,

N0 = 48,
N1 = 49,
N2 = 50,
N3 = 51,
N4 = 52,
N5 = 53,
N6 = 54,
N7 = 55,
N8 = 56,
N9 = 57,

A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,

LWin = 91,
RWin = 92,
Apps = 93,

Sleep = 95,

NumPad0 = 96,
NumPad1 = 97,
NumPad2 = 98,
NumPad3 = 99,
NumPad4 = 100,
NumPad5 = 101,
NumPad6 = 102,
NumPad7 = 103,
NumPad8 = 104,
NumPad9 = 105,

Multiply = 106,
Add = 107,
Separator = 108,
Subtract = 109,
Decimal = 110,
Divide = 111,

F1 = 112,
F2 = 113,
F3 = 114,
F4 = 115,
F5 = 116,
F6 = 117,
F7 = 118,
F8 = 119,
F9 = 120,
F10 = 121,
F11 = 122,
F12 = 123,
F13 = 124,
F14 = 125,
F15 = 126,
F16 = 127,
F17 = 128,
F18 = 129,
F19 = 130,
F20 = 131,
F21 = 132,
F22 = 133,
F23 = 134,
F24 = 135,

NumLock = 144,
Scroll = 145,

LShift = 160,
RShift = 161,
LControl = 162,
RControl = 163,
LMenu = 164,
RMenu = 165,
}
}
Loading