Skip to content
Draft
Changes from 1 commit
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
Next Next commit
Update Win32.cs
Add window handler
  • Loading branch information
w0wca7a authored Jun 25, 2025
commit b400661bfa40b34e4453ee697f4e38d475f2e704
3 changes: 3 additions & 0 deletions sources/engine/Stride.Input/Windows/RawInput/Win32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

}
}
#endif