From c60e9dfc9e267d807df3af5b751271a5d2f3c557 Mon Sep 17 00:00:00 2001 From: jianglong0156 Date: Thu, 25 Jun 2015 17:25:27 +0800 Subject: [PATCH 1/2] winrt not suppot mouse --- cocos/scripting/js-bindings/script/jsb_boot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cocos/scripting/js-bindings/script/jsb_boot.js b/cocos/scripting/js-bindings/script/jsb_boot.js index 7f0b17fd8e..5c02a47e80 100644 --- a/cocos/scripting/js-bindings/script/jsb_boot.js +++ b/cocos/scripting/js-bindings/script/jsb_boot.js @@ -1481,6 +1481,12 @@ cc._initSys = function(config, CONFIG_KEY){ // desktop capabilities["keyboard"] = true; capabilities["mouse"] = true; + capabilities["touches"] = true; + // winrt can't suppot mouse in current version + if (platform === locSys.WINRT) + { + capabilities["mouse"] = false; + } } /** From 11ac928f59c6a45736ad8e368f305b41acaef7ae Mon Sep 17 00:00:00 2001 From: jianglong0156 Date: Thu, 25 Jun 2015 17:44:03 +0800 Subject: [PATCH 2/2] winrt use touch event replace mouse event --- cocos/scripting/js-bindings/script/jsb_boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/scripting/js-bindings/script/jsb_boot.js b/cocos/scripting/js-bindings/script/jsb_boot.js index 5c02a47e80..c776b1a183 100644 --- a/cocos/scripting/js-bindings/script/jsb_boot.js +++ b/cocos/scripting/js-bindings/script/jsb_boot.js @@ -1481,10 +1481,10 @@ cc._initSys = function(config, CONFIG_KEY){ // desktop capabilities["keyboard"] = true; capabilities["mouse"] = true; - capabilities["touches"] = true; // winrt can't suppot mouse in current version if (platform === locSys.WINRT) { + capabilities["touches"] = true; capabilities["mouse"] = false; } }