summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/defaults.cpp4
-rw-r--r--src/gui/gui.cpp19
2 files changed, 19 insertions, 4 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 45cec23a8..a301d2323 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -139,11 +139,7 @@ DefaultsData* getConfigDefaults()
AddDEF("fpslimit", 60);
AddDEF("theme", "");
AddDEF("showChatColorsList", true);
-#ifdef __native_client__
- AddDEF("customcursor", false);
-#else
AddDEF("customcursor", true);
-#endif
AddDEF("showDidYouKnow", true);
AddDEF("longmouseclick", false);
#endif
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