summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index ea527e3ef..f7878a55f 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -98,6 +98,13 @@
#include "net/ipc.h"
+#ifdef __native_client__
+#include <ppapi/c/ppb_mouse_cursor.h>
+#include <ppapi/cpp/instance.h>
+#include <ppapi/cpp/mouse_cursor.h>
+#include <ppapi_simple/ps.h>
+#endif
+
#include "debug.h"
Gui *gui = nullptr;
@@ -533,6 +540,18 @@ void Gui::setUseCustomCursor(const bool customCursor)
{
mCustomCursor = customCursor;
+#ifdef __native_client__
+ PP_MouseCursor_Type cursor;
+ if (mCustomCursor)
+ cursor = PP_MOUSECURSOR_TYPE_NONE; // hide cursor
+ else
+ cursor = PP_MOUSECURSOR_TYPE_POINTER; // show default cursor
+
+ pp::MouseCursor::SetCursor(
+ pp::InstanceHandle(PSGetInstanceId()),
+ cursor);
+#endif
+
if (mCustomCursor)
{
// Hide the SDL mouse cursor