mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 17:36:36 +00:00
[Refs #87: Static Analysis] Fix P/Invoke - C# point varies on x86/x64
This commit is contained in:
@@ -38,7 +38,7 @@ namespace renderdocui.Code
|
||||
|
||||
// for redirecting mousewheel
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr WindowFromPoint(System.Drawing.Point pt);
|
||||
public static extern IntPtr WindowFromPoint(int xPoint, int yPoint);
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr SendMessage(IntPtr wnd, int msg, IntPtr wp, IntPtr lp);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace renderdocui.Windows
|
||||
short x = (short)((pos >> 0) & 0xffff);
|
||||
short y = (short)((pos >> 16) & 0xffff);
|
||||
|
||||
IntPtr wnd = Win32PInvoke.WindowFromPoint(new Point(x, y));
|
||||
IntPtr wnd = Win32PInvoke.WindowFromPoint((int)x, (int)y);
|
||||
|
||||
if (wnd != IntPtr.Zero && wnd != m.HWnd && Control.FromHandle(wnd) != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user