Skip to content

Conversation

w0wca7a
Copy link

@w0wca7a w0wca7a commented Jun 25, 2025

PR Details

When connecting a Logitech RumblePad II gamepad, SharpDX.DirectInput returns an error related to an invalid window identifier.

Related Issue

#1791

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

w0wca7a added 4 commits June 25, 2025 23:30
Add window handler
fix: Gamepad not detected due to window handle definition error
@w0wca7a
Copy link
Author

w0wca7a commented Jun 25, 2025

@dotnet-policy-service agree

@@ -16,6 +16,9 @@ internal static class Win32

[DllImport("user32.dll")]
public static extern void ClipCursor(IntPtr rect);

[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
Copy link
Contributor

@Doprez Doprez Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How reliable is this to always get the game window? If there is a possibility that the game window may not be in focus, there may be a better way to do this with a GameWindow reference.

@Eideren Eideren marked this pull request as draft August 27, 2025 15:17
@Eideren
Copy link
Collaborator

Eideren commented Aug 27, 2025

Converting this to draft while the contributor gets back to us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants