-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse cursor problems when starting the core without any game #15
Comments
Can you check with |
Is there a way to build a single engine? Otherwise it takes several hours to compile just to test the main GUI. |
Also, that branch isn't compiling.
|
Is it compiling properly, you just need to make sure |
Right. I downloaded the right artifact¹, and besides the scummvm gui skin being reverted to the default, which i expected because it's a different version that i didn't build the scummvm-data, it still presents the problem. It's a strange thing. I'm not even sure it isn't retroarch itself that it's the problem. Oh well, it takes care of itself like i mentioned. It can happen in any axis. You just move along a direction and 'suddenly' the cursor doesn't move anymore and you're sliding perpendicularly. Then you move up and down or left to righ a little and the area grows, grows until you reach the actual screen limits. Good job fixing the myst III problem, but i tried it now and funny enough the problem also happens there. It appears that the 'rectangle' also has such problems in a rotoscape game which is a bit concerning... because in a rotoscape game you're supposed to be able to turn 360º or even more as many times as you want... ¹ this link: https://git.libretro.com/libretro/scummvm/-/jobs/3143291/artifacts/download?file_type=archive for upstream-master, ie, the first line in the linux 64 artifact. |
I tried with a mouse i dug up just now, instead of a touchpad and it didn't make a difference, so at least it's not one of the many linux 'quirks' with touchpad drivers that bit me in the ass with retroach before (trying to use with my old portable touchpad in KMS with scummvm was a recipe for frustration because the right mouse click didn't work and the touchpad was turned into a absolute coordinate device). |
Do you have the same issue using retropad and/or keyboard directional arrows for cursor movement? |
Retropad... is strange. The problem exists, just seems not apparent in the menu, maybe because some sampling artifact from the keyboard (i use the keyboard as retropad since i don't have a controller). However, in myst III, which is supposed to be 360º rotoscape, shows itself quickly again. A video can be provided, but github only allows ten mb videos so i have to downsample it. I used the out.webmAnyway, in the video you can see me using the mouse after loading the core and the first unnatural horizontal line is the effect. It stops there after that when i jiggle the mouse. Then i load a save from myst 3 beginning i had and i start using the 'retropad'. Then before the end i try using the mouse, to not much help (sometimes messing around a lot helps move that 'window' a bit). This isn't in the video, but loading from the playlist doesn't affect this, but it made me notice (from bypassing the scummvm menu load screen, and thus entering the game menu) that the game menu is like the scummvm GUI where the retropad appears to behave 'better'. I suspect this is a illusion from whatever heuristic that is trying to approximate 'the screen' because as seen in the video, retropad fails in game in a game where the 'screen' is arbitary (rotoscoped). It may be indeed a wayland limitation/bug. I won't speculate what's the aim of it and why it affects retroarch but not scummvm. Standalone scummvm doesn't have any of these problems, you can rotate the view back to the wife and baby and she starts her dialog. |
Interestingly, scummvm in software graphical mode shows a bug that retroarch doesn't (retroarch, i'm assuming, is always in software mode). The screen gets cut off in the right side. I guess it could be a older bug since my build of scummvm is a few months old. edit: in myst 3 that is. |
Might this not be a core bug, but a bug in retroarch mouse itself when resolutions change? |
Eh... i just tried to see if changing from 'fake (windowed) fullscreen' to 'actual fullscreen' did anything and it didn't help, although i'm not sure it would in wayland, which i kind of remember (several years ago) didn't actually have exclusive fullscreen. The fact that another bug reported opened with the same bug but for windows indicates it's not a exclusive problem to wayland anyway. Then i tried to change the input driver from 'sdl' to 'udev' and found the amusing 'touchpad treated as absolute input instead of relative input' problem is BACK, and this time even outside KMS. So that driver doesn't work. (if you don't know how this manifests, touching a touchpad with a finger will 'jump' the cursor whenever the touchpad thinks it projects on the screen, dragging will move normally, but it's still unplayable. The linuxraw and x drivers have the same problems, even if i find it suspicious that the x driver even works on wayland. I think i built retroarch with xwayland support, i'll go disable that and try again. |
No, that didn't help. Tried the sdl and raw input drivers. I did notice that the wayland menu goes a bit... zoomed in for the resolution in my desktop, even with the fake fullscreen. A bug in the wayland version of the graphics driver i suppose (happens in both gl and waylad. SDL fallbacks to rgui instead of ozone). |
Can you test if e7fe82c4886ea4e7a964f9148cb7d76b90fe1edc fixes the RetroPad issue? |
It works better bit it's still a bit random. The first time i could move to the right (more) and left (less), but not all the way (the woman and the baby didn't show) while using the mouse, but the second time i could turn all the way (while using the keyboard/retropad). Strangely it seems this didn't help for the mouse but did for the retropad. This is apparent in the main menu of myst 3 where moving around the mouse often shows the effect but the retropad can continue from where the mouse left off. The same happens in game. I suppose this doesn't help the 'root cause' of whatever is causing this for the mouse and helps with the pad. Only on this core i suppose, from where the fix is applied; since dosbox still has the problem. |
But note, i only tested a dosbox game to find this problem with the mouse since the retroapad doesn't appear to work by default in dosbox-core (i suppose it's for joysticks), so i don't actually know how the retropad behaves in dosbox, just the mouse. |
Just to summarize, with e7fe82c4886ea4e7a964f9148cb7d76b90fe1edc on your platform - considering the ScummVM GUI only - cursor movement with keyboard directional keys/RetroPad D-pad works good, movement with RetroPad left analog axis is untested and RetroMouse movement issue remained unchanged (same as video above), right? |
I've added a |
Sure. Here are two captures, first one where in-game in myst 3 i first look 'up' then sideways, and another where i look to the sides first. |
Back to this core, the test above is scummvm in-game for myst 3, where you're supposed to be able to rotate the mouse east-to-west or west-to-east as many times as you want. It's a bit larger and more 'free' now, but by no means 'a complete turn', much less multiple ones. Retropad achieves that now. edit: spoke too soon about 'mouse behaving in the GUI'. It's rarer, but it still can happen. This usually happens in the first few movements of the GUI only if it's going to, which makes me think it's thinking that the 'center' is where the mouse starts or something. Retropad, still no problems. In fact, using the keyboard/retropad resets the mouse movement too. |
That's a separate (and probably unrelated) issue to be opened there I guess.
If you mean you need to move the mouse multiple times to accomplish a 360° turn, that's the intended behaviour with RetroMouse, same as standalone ScummVM (and I guess original game). You can increase the mouse speed setting to turn more with a single mouse movement.
Cursor is initialised at x=0, y=0, you should always see it at top left corner at ScummVM GUI startup. |
I do notice that the mouse starts in the top-left in the initial GUI.
No. What i mean with that is that although the range is wider, it still doesn't allow a complete turn horizontally - the same game in upstream scummvm allows how many turns you want with a mouse (or my touchpad). Of course i'm pausing in between - i'm using a touchpad, but even if i was using a 'real' mouse i'd need to pause to move the mouse back once in a while in real life. There still exists a hard limit ingame of how much the cursor will allow a move (retropad works now though). If you want a log of a example in the normal GUI 'failing' here i managed to capture one where it slides along a imaginary vertical line when i move the mouse diagonally until it hit that 'line'. I should have exited there after doing that but i ended doing a 'try to move left horizontal line when i though it had found a horizontal line too, but it wasn't there. As for a example of the touchpad resetting - i just noticed that only works in the myst 3 game for some reason. Here it in the core main GUI just moves the line. I lucked out and this time it was a horizontal line. If you see it moving horizontally, i'm using the mouse, if you see that horizontal line moving the y coordinate, it's after using the retropad to move then using the mouse again: |
I find it strange that the first values captured in the log are numbers like
even in the core GUI. I'd expect it to be x=0 and y=0 if the coordinate system sets the upper left as 0,0 and the cursor starts there? Why the negative numbers, are they unintialized and some other piece of code is using random memory to calculate a limit to the mouse? In fact, aren't negative coordinate numbers a sign that there is something wrong? |
The It is not easy to read the logs without seeing what's happening on the screen at the same time: you should check what happens in the log when you try to pass over the virtual vertical or horizontal block line in the GUI. e.g: If you have a vertical block line, when you try to move over that line what's the reading of |
Here us a sequence where i iterated over a vertical line a few times at the end of the file, these should be the same line, nothing much to say except it shows the behavior you theorize and that y sometimes goes negative which i didn't think was possible from what you said about it resetting after the start. The problem being from the libretro api would explain that it also happens on other cores. |
I'm just perplexed how this can remain on multiple cores for what's probably years without anyone noticing or caring. |
If you use a text editor, and 'find' the X repeating line at the end you can easily find the exact line i started being stuck. Is it normal the mouseX/YAcc values always being zero when sampled? |
Ok, so in that case you had a vertical block line at ab 76% of the screen and at that point you are not receiving anymore
Yes, actually that log is useless, as at that point those variables are always 0 (anyway they've nothing to do with this issue). |
I think that is because this issue seems to be specific to your configuration (drivers? hardware?) plus it's specific to RetroMouse, which isn't the most common device used with RetroArch. |
SDL2, but it can happens in any driver that works. Udev, linuxraw too. X driver too (i didn't expect it work with x support disabled, since the x video driver doesn't...) I feel like this is not because of driver code, or if it is, it's on some common code to all. I will also say i don't think it's my environment - i've seen this on two different computers with different versions of ubuntu, and honestly, i still think the bug you previously closed is the same thing and the user that filed it just thinks it's completely fixed (it sometimes doesn't show with the mouse/touchpad in the scummvm GUI menu every time, although when entering myst3 it always can't make a full turn here). If true, it would also happen in windows! |
If you find a better way to track it down, i have some technical knowledge. I can use a command line, and i'm willing to spend time capturing whatever logs and applying patches to retroarch itself, since i already build it regularly. |
This seems to be worked on right now on libretro/RetroArch#15057 if you want to monitor it to see if it solves the issue. The idea appears sound of the reason why it happens in multiple cores (retroarch not playing well with the wayland compositor mouse grab). I'm not too sure why it would also fail with xwayland version of retroarch, but it's not to much of stretch to think that xwayland running on wayland would still have the same problem... |
This was fixed in the last version of the PR at libretro/RetroArch#15103 So it's finally fixed. I tested on both x11 and wayland this time (although i didn't bother recompiling from the wayland driver to test x11 - retroarch started and reported the x11 graphics driver, so i thought it was enough). When it's merged i think this can be closed, finally. |
Description
The mouse cursor appears to be boxed in to a rectangle that is not actually the whole extent of the screen in fullscreen. You can sort of force the cursor to move down if you move it fast. This problem is old, and occurred in the older core too.
Eventually, with some messing around with the cursor, moving fast up and down etc, the 'window' the mouse thinks it is restricted to grows and the problem doesn't happen again.
Expected behavior
Accurate mouse clamping i guess.
Actual behavior
It is very frustating
Steps to reproduce the bug
Version/Commit
[You can find this information under Information->Core Information / System Information]
Environment information
The text was updated successfully, but these errors were encountered: