Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions Master/NucleusCoopTool/Controls/InputIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static Control[] SetInputsIcons(GenericGameInfo game)
icons.Add(icon2);
}

if ((game.Hook.XInputEnabled && !game.Hook.XInputReroute && !game.ProtoInput.DinputDeviceHook) || game.ProtoInput.XinputHook)
if ((game.Hook.XInputEnabled && !game.Hook.XInputReroute && !game.ProtoInput.DinputDeviceHook) || game.ProtoInput.XinputHook || game.ProtoInput.TranslateXinputtoMKB)
{
Bitmap bmp = ImageCache.GetImage(Globals.ThemeFolder + "xinput_icon.png");
float ratio = (float)bmp.Width / (float)bmp.Height;
Expand All @@ -62,8 +62,8 @@ public static Control[] SetInputsIcons(GenericGameInfo game)
{
Name = "icon1",
Size = size,
Image = bmp,
SizeMode = PictureBoxSizeMode.StretchImage,
Image = bmp,
SizeMode = PictureBoxSizeMode.StretchImage,
};

CustomToolTips.SetToolTip(icon, "Supports XInput gamepads (e.g. X360).", "icon1", new int[] { 190, 0, 0, 0 }, new int[] { 255, 255, 255, 255 });
Expand Down
2 changes: 2 additions & 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 All @@ -391,6 +392,7 @@ private void LoadAutoCompleteSource()
"Game.ProtoInput.MouseButtonFilter",
"Game.ProtoInput.KeyboardButtonFilter",
"Game.ProtoInput.DrawFakeCursor",
"Game.ProtoInput.DrawFakeCursorFix",
"Game.ProtoInput.AllowFakeCursorOutOfBounds",
"Game.ProtoInput.ExtendFakeCursorBounds",
"Game.ProtoInput.SendMouseWheelMessages",
Expand Down
36 changes: 18 additions & 18 deletions Master/NucleusCoopTool/Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Master/NucleusCoopTool/ProtoInputHooks32.dll
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputHooks64.dll
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputHost.exe
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputIJ32.exe
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputIJ64.exe
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputIJP32.dll
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputIJP64.dll
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputLoader32.dll
Binary file not shown.
Binary file added Master/NucleusCoopTool/ProtoInputLoader64.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static void GamepadTimer_Tick(object state)
}

//Using OpenXinput with more than 4 players means we can use more than 4 xinput controllers
if ((g.Hook.XInputEnabled && !g.Hook.XInputReroute && !g.ProtoInput.DinputDeviceHook) || g.ProtoInput.XinputHook)
if ((g.Hook.XInputEnabled && !g.Hook.XInputReroute && !g.ProtoInput.DinputDeviceHook) || g.ProtoInput.XinputHook || g.ProtoInput.TranslateXinputtoMKB)
{
changed = CheckConnectedGamepads();

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
32 changes: 19 additions & 13 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 @@ -2684,7 +2687,7 @@ public string Play()
{
topMostFlag = new IntPtr(-2);
}

User32Interop.SetWindowPos(aproc.NucleusGetMainWindowHandle(), topMostFlag, 0, 0, 0, 0, (uint)(PositioningFlags.SWP_NOMOVE | PositioningFlags.SWP_NOSIZE | PositioningFlags.SWP_SHOWWINDOW));
}
}
Expand All @@ -2696,7 +2699,7 @@ public string Play()
Thread.Sleep(TimeSpan.FromSeconds(gen.PauseBetweenStarts));
}
}

if (!ProcessUtil.IsRunning(proc))
{
Log("Process is no longer running. Attempting to find process by window title");
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 @@ -2798,7 +2801,7 @@ public string Play()
}
}
}

if (gen.KillLastInstanceMutex && !gen.RenameNotKillMutex)
{
for (; ; )
Expand Down Expand Up @@ -2839,12 +2842,12 @@ public string Play()
}

Thread.Sleep(1000);

if (gen.ResetWindows)
{
GlobalWindowMethods.ResetWindows(data, prevWindowX, prevWindowY, prevWindowWidth, prevWindowHeight, i + 1);
}

if (gen.FakeFocus)
{
Log($"Start sending fake focus messages every {gen.FakeFocusInterval} ms");
Expand Down Expand Up @@ -2977,7 +2980,7 @@ int WindowEnum(IntPtr _hWnd, int lParam)
WinApi.EnumWindows(WindowEnum, thread.Id);
}
}

RawInputProcessor.Start();

if (gen.SetForegroundWindowElsewhere)
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
Loading