Qt: Fix mouse scaling

Since yuzu-emu/yuzu#4949 any user that had a window scale different from 100% will have wrong mouse coordinates. This PR fixes the issue by removing the workaround for scaling since now it should be 1:1 at any scale.

This PR also splits mouse input into 3 different devices. A physical mouse, touch and finally one for controllers. This solves the issue Zeikken85 had where having emulated mouse enabled had a weird behavior on stick input. As a final protection against setting invalid configs a warning message will show up if emulated mouse is enabled.

Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
This commit is contained in:
FearlessTobi
2023-02-19 00:59:40 +01:00
committed by GPUCode
parent 0382b275c0
commit 2a4f9b5dd4
5 changed files with 90 additions and 38 deletions

View File

@ -194,6 +194,10 @@ bool MappingFactory::IsDriverValid(const MappingData& data) const {
if (data.engine == "keyboard" && data.pad.port != 0) {
return false;
}
// Only port 0 can be mapped on the mouse
if (data.engine == "mouse" && data.pad.port != 0) {
return false;
}
// To prevent mapping with two devices we disable any UDP except motion
if (data.engine == "cemuhookudp" && data.type != EngineInputType::Motion) {
return false;