mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

Mouse cursor doesn't disappear when it should with certain system configuration #45

Closed gate001 closed 5 years ago

gate001 commented 5 years ago

hi, I had not noticed before but by putting my intro video of the playfield and backglass (playfield is partly black when the action of the video is on the backglass) I noticed that the arrow/mouse cursor is visible in the middle of my playfield . Once the video is over it is still there but as there is a lot of color and movement on the media of the playfield that is difficult to notice it but if you pay attention it is there (maybe that's why I've never noticed before using the intro video).

Can you put the mouse to not visible when we start PinballY. The mouse could be visible when we move it and that after a delay without activity of the mouse becomes invisible again.

mjrgh commented 5 years ago

The mouse cursor should already be hidden every time you press a button. That's not happening for you?

(It reappears any time the mouse moves. Is it possible it's getting hidden, and that you have some minimal mouse motion due to vibration that's waking it up again, something like that?)

gate001 commented 5 years ago

I start Pinball in manual mode (wireless mouse is off) During the intro video, the mouse is visible, same thing for the media tables video. Non change when i press a button.

mjrgh commented 5 years ago

Actually, the mouse isn't being hidden until after the startup video finishes, so that part I can fix.

But you say the mouse cursor isn't getting hidden when you press, say, the Left/Right buttons to change to different tables? (I'm not talking about pressing a mouse button - I'm talking about pressing a command key.) If it's not getting hidden then, something else is wrong. The mouse is supposed to appear again as soon as the mouse moves, but it should stay hidden from the time you press a command key to the next mouse motion.

gate001 commented 5 years ago

When I push the buttons of the flippers to change tables, the mouse remains visible.

mjrgh commented 5 years ago

When I push the buttons of the flippers to change tables, the mouse remains visible.

Okay, that's a bit of a mystery, then. I'm just using the standard "hide the mouse cursor" API to hide it, each time you push a button. I'll have to do some research and see if there's any reason that doesn't work on some systems.

mjrgh commented 5 years ago

One more question: you have the mouse positioned over one of the PinballY windows when trying the button presses, right? (The reason I ask is that Windows doesn't let a program hide the mouse when the mouse is over a window belonging to another program, so if the mouse is over a Windows desktop area or another application's window, that would explain why it's not getting hidden.)

mjrgh commented 5 years ago

I can't find anything suggesting that SetCursor(NULL) fails in any configurations. Are you running any special mouse software that could be interfering?

gate001 commented 5 years ago

I do not have a configuration or special software for the mouse. The mouse is in the middle of the playfield.

mjrgh commented 5 years ago

Okay, I posted a note on vpforums asking if anyone else is running into this - if so maybe we can figure out what the common element is.

gate001 commented 5 years ago

OK, thanks

mjrgh commented 5 years ago

In the beta 7 (out now), I changed it to use a slightly different way of hiding the mouse, which hopefully will be more successful on your system. Give it a try and let me know if it works any better.

gate001 commented 5 years ago

no luck, the mouse still visible

mjrgh commented 5 years ago

Huh, I'm at a loss. How about this: put the playfield window in NON full screen mode, so that it has sizing borders. Does the mouse change shape to the sizing arrows when you move it over the sizing borders?

gate001 commented 5 years ago

Yes, the mouse change to the sizing arrow.

mjrgh commented 5 years ago

A couple more questions:

mjrgh commented 5 years ago

One more thing to try. It occurs to me that you said you're testing this with your wireless mouse turned off. I wonder if maybe having the mouse turned off is the issue - maybe Windows ignores the cursor functions if it doesn't think there's a physical mouse attached, or something along those lines. Have you tried with the physical mouse on and active?

gate001 commented 5 years ago

The only thing that runs at the same time is PinVol. I have Windows 10 home 64 bit. With the mouse at on or at off, the mouse arrow is always visible. You gave me an idea, I tried without the USB dongle of the mouse and BINGO, no more mouse arrow. I think it's a function of Windows, because the mouse disappears even if I'm not in PinballY.

mjrgh commented 5 years ago

My guess is that removing the wireless receiver is only hiding the cursor because there's no mouse attached at all at that point, which probably isn't what you want as the permanent setup. (Like you said, that hides the cursor across the board, not just for PinballY purposes.)

Do you have a regular wired mouse to test with? Maybe the always-visible issue has to do with your specific wireless mouse, so I'd be curious to see if it happens with a different physical device.

If it still happens with a different mouse attached, try exiting PinVol (close the program entirely so that it's not even running in the background) and run PBY again. Just want to rule out that PinVol isn't the cause.

gate001 commented 5 years ago

I borrowed a wire mouse and did a test without PinVol. No luck, the mouse is always visible. It does not matter since when my pincab is finished, I will not need my mouse anymore.

mjrgh commented 5 years ago

It does not matter since when my pincab is finished, I will not need my mouse anymore.

Let me take one more stab at it anyway... in my experience, you probably will want to keep a mouse connected, because there's always some stupid Windows maintenance task that comes up that requires a mouse (or at least is a lot easier with a mouse), or you want to install a new program, etc.

Here's a test build with yet another attempt to get the mouse to disappear. I really can't figure out why the approaches I've tried so far aren't working on your system, since they're such basic Windows APIs, but this build uses yet another API, so let's see if that makes any difference. This is just the EXE file - you can use it to replace your current one.

http://mjrnet.org/pinscape/downloads/PinballY/PinballY-new-hide-cursor1.zip

gate001 commented 5 years ago

no luck with the new EXE, the mouse is still visible.

mjrgh commented 5 years ago

Okay, thanks for trying. I'd really like to know what's going on with your system. No one has replied to my query asking if anyone else has had this happen. I can't think of anything else to try, so I'm going to leave this open under the "unsolved" category. If anyone else encounters the same problem, let me know - hopefully we can piece together what your systems have in common that's making the normal Windows mouse handling APIs fail.

mjrgh commented 5 years ago

Hi - one more thought...

Can you experiment with your system and see if there's a safe place to "park" the mouse where it won't be visible, or at least won't be in the way?

By "safe", I mean that it won't trigger any unwanted Windows tool tips, charm bars, task bar popup, etc. On my system it's kind of difficult to find anywhere near the edge of a window that doesn't make Windows go into some crazy mode. :)

If so, I could add an option that moves the mouse to a safe parking location that you specify in the options in lieu of hiding it. That way even if the cursor is stuck permanently visible as it seems to be on your system, it'll at least be moved out of the way for you.

gate001 commented 5 years ago

It's a good idea. On my DMD screen I have two windows, the DMD and the Topper. There is space between the two windows and the two windows don’t take the full width of the screen.

mjrgh commented 5 years ago

1.0.0 Beta 9 has a new "hide mouse by moving it" option that will hopefully solve this for you. It's under the Mouse section of the settings dialog. Check the box for the new option, and use the controls to set the coordinates where you'd like to position the mouse.

mjrgh commented 5 years ago

I'm going to close this out on the assumption that this is fixed with the "hide mouse by moving it" option. Let me know if not.