mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-09 08:25:33 +02:00
Resurrect mouse detection
This commit is contained in:
parent
56c6d4b441
commit
ad0cf67cb9
3 changed files with 15 additions and 1 deletions
|
@ -44,6 +44,7 @@ MiniFFI_GetFunctionHandle(void *lib, const char *func)
|
|||
CAPTURE(GetWindowThreadProcessId);
|
||||
CAPTURE(FindWindowEx);
|
||||
CAPTURE(GetForegroundWindow);
|
||||
CAPTURE(GetClientRect);
|
||||
CAPTURE(GetCursorPos);
|
||||
CAPTURE(ScreenToClient);
|
||||
CAPTURE(SetWindowPos);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "sharedstate.h"
|
||||
#include "fake-api.h"
|
||||
#include "debugwriter.h"
|
||||
|
||||
|
||||
// Essentials, without edits, needs Win32API. Two problems with that:
|
||||
|
@ -65,6 +66,16 @@ MKXP_GetForegroundWindow(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL __stdcall
|
||||
MKXP_GetClientRect(HWND hWnd, LPRECT lpRect)
|
||||
{
|
||||
SDL_GetWindowSize(shState->sdlWindow(),
|
||||
(int*)&lpRect->right,
|
||||
(int*)&lpRect->bottom);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FIXME: Mouse stuff doesn't work right now,
|
||||
// but at least it's not causing any Ruby exceptions
|
||||
|
@ -82,7 +93,6 @@ MKXP_ScreenToClient(HWND hWnd, LPPOINT lpPoint)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
BOOL __stdcall
|
||||
MKXP_SetWindowPos(HWND hWnd,
|
||||
HWND hWndInsertAfter,
|
||||
|
|
|
@ -45,6 +45,9 @@ MKXP_FindWindowEx(HWND hWnd,
|
|||
DWORD __stdcall
|
||||
MKXP_GetForegroundWindow(void);
|
||||
|
||||
BOOL __stdcall
|
||||
MKXP_GetClientRect(HWND hWnd, LPRECT lpRect);
|
||||
|
||||
BOOL __stdcall
|
||||
MKXP_GetCursorPos(LPPOINT lpPoint);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue