Fix mouse visibility + coords with resized screen

This commit is contained in:
Inori 2019-08-20 22:49:15 -04:00 committed by Inori
parent 4968069c0e
commit 141e06c7a0
2 changed files with 5 additions and 3 deletions

View file

@ -105,7 +105,7 @@ bool EventThread::allocUserEvents()
EventThread::EventThread()
: fullscreen(false),
showCursor(false)
showCursor(true)
{}
void EventThread::process(RGSSThreadData &rtData)

View file

@ -1,12 +1,13 @@
#ifdef __WIN32__
#include <SDL.h>
#include <SDL_syswm.h>
#include <cmath>
#include <windows.h>
#include "sharedstate.h"
#include "input.h"
#include "fake-api.h"
#include "debugwriter.h"
// Essentials, without edits, needs Win32API. Two problems with that:
@ -98,7 +99,8 @@ MKXP_GetCursorPos(LPPOINT lpPoint)
BOOL __stdcall
MKXP_ScreenToClient(HWND hWnd, LPPOINT lpPoint)
{
SDL_GetMouseState((int*)&lpPoint->x, (int*)&lpPoint->y);
lpPoint->x = shState->input().mouseX();
lpPoint->y = shState->input().mouseY();
return true;
}