Move {Init,Hide,Show}Cursor to SDLInput.cpp

This commit is contained in:
Iliyas Jorio 2021-07-18 13:12:30 +02:00
parent 91f6390055
commit 630e8e9b24
2 changed files with 22 additions and 22 deletions

View File

@ -190,10 +190,30 @@ void GetMouse(Point* mouseLoc)
Boolean Button(void)
{
ONCE(TODOMINOR());
return false;
return SDL_GetMouseState(NULL, NULL) & SDL_BUTTON_LMASK;
}
//-----------------------------------------------------------------------------
// Mouse cursor
void InitCursor()
{
SDL_ShowCursor(1);
}
void HideCursor()
{
SDL_ShowCursor(0);
}
void ShowCursor()
{
SDL_ShowCursor(1);
}
//-----------------------------------------------------------------------------
// Init
void Pomme::Input::Init()
{
InitScancodeLookupTable();

View File

@ -8,8 +8,6 @@
#include "PommeSound.h"
#include "PommeInput.h"
#include "SDL.h"
#if _WIN32
#include "Platform/Windows/PommeWindows.h"
#endif
@ -44,24 +42,6 @@ void FlushEvents(short, short)
TODOMINOR();
}
//-----------------------------------------------------------------------------
// Mouse cursor
void InitCursor()
{
SDL_ShowCursor(1);
}
void HideCursor()
{
SDL_ShowCursor(0);
}
void ShowCursor()
{
SDL_ShowCursor(1);
}
//-----------------------------------------------------------------------------
// Our own init