aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/input/je_mouse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/input/je_mouse.cpp')
-rw-r--r--src/libjin/input/je_mouse.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libjin/input/je_mouse.cpp b/src/libjin/input/je_mouse.cpp
new file mode 100644
index 0000000..476b1a2
--- /dev/null
+++ b/src/libjin/input/je_mouse.cpp
@@ -0,0 +1,28 @@
+#include "../core/je_configuration.h"
+#if defined(jin_input)
+
+#include "SDL.h"
+
+#include "je_mouse.h"
+
+namespace JinEngine
+{
+ namespace Input
+ {
+
+ void Mouse::getState(int* x, int* y)
+ {
+ #ifdef jin_input == jin_input_sdl
+ SDL_GetMouseState(x, y);
+ #endif
+ }
+
+ void Mouse::setVisible(bool visible)
+ {
+ SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE);
+ }
+
+ } // namespace Input
+} // namespace JinEngine
+
+#endif // defined(jin_input) \ No newline at end of file