Enable cursor support

Enables the ability to use the cursor/mouse scripts. 
e.g. Shaz's Super Simple Mouse System
https://forums.rpgmakerweb.com/index.php?threads/amaranths-super-simple-mouse-system-for-ace.17829/
works without relying in it's Win32API settings/Declarations
This commit is contained in:
pk-2000 2021-09-03 16:36:38 +03:00 committed by GitHub
parent 1f017a8278
commit 7a4de087f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -105,6 +105,8 @@ EventThread::EventThread()
showCursor(false)
{}
SDL_DisplayMode dm = {0};
void EventThread::process(RGSSThreadData &rtData)
{
SDL_Event event;
@ -119,6 +121,8 @@ void EventThread::process(RGSSThreadData &rtData)
#endif
fullscreen = rtData.config.fullscreen;
showCursor = rtData.config.showCursor;
SDL_GetDesktopDisplayMode(0, &dm);
int toggleFSMod = rtData.config.anyAltToggleFS ? KMOD_ALT : KMOD_LALT;
fps.lastFrame = SDL_GetPerformanceCounter();
@ -540,6 +544,7 @@ void EventThread::resetInputStates()
void EventThread::setFullscreen(SDL_Window *win, bool mode)
{
SDL_GetDesktopDisplayMode(0, &dm);
SDL_SetWindowFullscreen
(win, mode ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
fullscreen = mode;