Closed NickZ closed 4 years ago
For me it works well on windows with both scaling and video mode change. Which OS? Linux? LZDoom has the same ancient ZDoom code and i only ported some fixes. Sometimes there are problems but that's nothing new. My linux machine is very old and slow so i did only limited testing but i haven't received any reports and the code in this version is the same as in older ones.
Yes, this occurs on Linux; it's pretty consistent across all the machines that I've tried.
I found that VMs with 3d hardware acceleration (like virtualbox) is decent enough to test this on Linux, too
I've been testing it and for me it works well, position never was very accurate and you had to click close (same as on windows). Which resolutions are you using?
I am using 848x480, but I am able to reproduce on basically all of them. I am building from source on both ubuntu 19.10 and 18.04 from the current branch, g3.3mgw. I've tested in both software and opengl.
But which scale mode (vid_scalemode) are you using?
I'm using the defaults for scaling, 0, i.e. Scaled (Nearest), but it's happening on every scale mode. I'm testing this on a 1080p desktop, btw.
Same scale mode here on a 1400 4:3 panel. What about the windows version? Native or wine.
I'm testing in a Windows VM, the mouse seems to work fine there, in either fullscreen or borderless.
What about linux with vid_renderer 0 and vid_glswfb 0?
Ah hah, vid_glswfb 0 fixed the issue; of course, the colors look all gross now.
Strange, you were using vid_renderer 1 before right?
I used both 0 and 1 (software and opengl), I was having the same issue.
I've noticed that you're using a letterboxed mode and not a native resolution, why? The function void ScaleWithAspect (int &w, int &h, int Width, int Height) performs the adjustment only for standard aspect ratios and then there's a correction for letterboxed modes in OpenGLSWFrameBuffer and OpenGLFrameBuffer but it doesn't work well. It's the commit "Fix mouse position being wrong when vid_scalemode is active". I've managed to reproduce the issue on windows but i don't know how i could fix it, that old code was added by dpJudas and it's no longer maintained upstream. Have you tried those LB modes with vid_glswfb 0?
I'm not using the letterboxed mode? I've never tried to test it with letterboxing turned on.
Do you mean 848x480 is supported by your graphics driver? That's not an standard resolution and it's not adjusted. For me it doesn't work propery for LB modes on windows. I can only test software on linux as i'm on an old laptop with GL 1.3 support. Which other resolutions are you using? Edit: letterboxed modes have LB next to them.
It happens on non-letterboxed resolutions as well. It happens on 720p, and other higher resolutions supported by my graphics card.
Also, do you have a raspberry pi? If not, would you like one?
And you say it doesn't happen with vid_glswfb 0? The code is the same minus the adjustment for LB somewhere else. What are the exact resolutions? (to know the aspect ratio) I'm a poor guy and i can't afford one so no thanks. Performance in my master branch on my old ibm laptop is very poor and i dunno why. Current branch is 3x faster. Could you try it on the Pi with SoftPoly? (it's the default vid_preferbackend but change vid_rendermode to 1 and set swtruecolor true here)
I meant I can send you one, you live in spain, right? I know a supplier there and can get one very cheap to send you. Hit me up on Discord, I messaged you.
Yeah i live in Granada, that would be great. You mean you sent me a message on Discord? I uninstalled the app becouse the phone was full. Now i can't join with the same account.
Gotcha, I think the easiest thing to do would be for you to just add this item here to an Amazon wishlist, then I can just get it for you, can you do that? https://www.amazon.es/LABISTS-Raspberry-Interruptor-Disipadores-Ventilador/dp/B07YYZBQYP
Thanks, i don't use Amazon but i've managed to restore the password for my Discord account.
Cool, I'm NickZ on discord
The ScaleCoordsFromWindow function is overriden and the adjustment wasn't performed. I've pushed a commit to fix this but i can't test it since i can only run SDLFB on my old laptop. In theory it should work. https://github.com/drfrag666/gzdoom/commit/d8d72f5d75dd444ec7966af72b1595fc673eb4e7 https://github.com/drfrag666/gzdoom/commit/dde31dcac4222f459019b29700879149716e6c2c
In the end i declined the offer, i still use CRTs and i wouldn't have taken full advantage of it anyway. Since now there's no feedback i'm closing this as fixed.
When using fullscreen and the resolution of LZDoom is set to something other than the desktop resolution, the mouse will still behave as if it's using the desktop resolution and as a result the mouse cursor position and the actual mouse position will be very different.