Issues with razer Kishi on mobile
Opened this issue · 0 comments
emmanuel-senft commented
React-gamepads has issues with razer Kishi on mobile.
A page working on laptop with a gamepad does not work well on android with a Razer Kishi.
Your environment
Android: version 12
Phone: Pixel 3A
Gamepad: Razer Kishi
Code:
import React, { useState } from 'react';
import { useGamepads } from 'react-gamepads';
export default function App() {
const [gamepads, setGamepads] = useState({});
useGamepads(gamepads => setGamepads(gamepads));
const gamepadDisplay = Object.keys(gamepads).map(gamepadId => {
// console.log("displaying gamepad", gamepads[gamepadId]);
return (
<div>
<h2>{gamepads[gamepadId].id}</h2>
{gamepads[gamepadId].axes &&
gamepads[gamepadId].axes.map((ax, index) => (
<div>
{index}: {ax}
</div>
))}
</div>
);
});
return (
<div className="Gamepads">
<h1>Gamepads</h1>
{gamepadDisplay}
</div>
);
}
Symptoms:
The axes display mostly 0 with around one correct value per second.
I suspect that the lower level android uses the inputs from the gamepad, but some leak and can reach the react layer.
The gamepad was tested in an android app and works without issue.