Check if device should use mobile controls
Takes into account device type, screen size, and touch capability
Uses user-agent detection to correctly identify mobile devices regardless
of screen resolution. This ensures high-end Android 15/16 phones with
2K/4K displays (1200px+, 1440px+) show mobile controls.
Returns boolean
True if mobile controls should be shown
Example
// High-res Android phone (1440x3168) → returns true via user-agent // Desktop with 1440px screen → returns false (no mobile user-agent) if (shouldUseMobileControls()) { return <VirtualDPad />; // Touch-optimized controls }
Check if device should use mobile controls Takes into account device type, screen size, and touch capability
Uses user-agent detection to correctly identify mobile devices regardless of screen resolution. This ensures high-end Android 15/16 phones with 2K/4K displays (1200px+, 1440px+) show mobile controls.