[Twinsen] [1.1.110] Mouse cursor shows when using controller and opening steam overlay on windows

A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

[Twinsen] [1.1.110] Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

Setup: Windows 11, installed through steam

To reproduce:

1. Connect an Xbox controller to computer over Bluetooth
2. Open steam in big picture mode with Xbox controller
3. Launch factorio with controller
4. When game launches, observe there is no mouse cursor (as expected). The cursor might show while the game is loading but it goes away once at the main menu.
5. Play factorio with no mouse cursor using controller. Everything works fine.
6 open steam overlay while playing using the big Xbox button in middle of controller
7. Observe the mouse cursor now shows (super annoying since on the couch with a controller only. I don't even have a mouse so I can't even move it to the corner)
8. Exit the steam overlay and try playing again
9. Controller works as before, but cursor never goes away no matter what you do
10. Have to restart Factorio :(
Last edited by A7x49 on Fri Sep 27, 2024 9:22 pm, edited 1 time in total.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

To the moderator who approved this,

I think this should be in "Bugs" section, not "Technical Help". This issue meets the following criteria of a bug:

- It is reproducible
- It is a defect in the code. The software itself should prevent the mouse cursor from showing in this case, since no mouse is ever used in the reproduction steps that I shared
- It is not an issue in other steam games
- Unless I am missing something, there seems to be nothing that I can do on my end to fix this (other than the workaround of never opening the steam overlay or restarting the games, both of which are inadequate solutions.)
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

While playing with just a controller (no keyboard or mouse), I observed that this bug also occurs when the virtual keyboard comes up. For example, when renaming a train stop. The virtual keyboard works as expected, aside from that a mouse cursor comes up and never goes away until the game is restarted.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

This also occurs if I try to edit the "time passed" condition for a train stop. Even if I intend to use the slider only, the game assumes I might want to type the number of seconds into the input field so the virtual keyboard comes up, and the mouse appears in the middle of the screen permanently until I restart the whole game.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

As I get further into the game where train stop logic is beccomming more important, I am realizing that this is a major, not a minor bug. Sadly I might have to stop playing until this is fixed. I'll have to see how much I can tolerate this.

One reason is that in certain cases, the controller in not adequate for fine grained tuning of certain conditions. For example, I can drag the slider for the number of items I need at a train stop with my controller. However, the number I need is 25k and the slider steps from 20k to 30k. So I have to use the virtual keyboard to get the 25k, which then causes this bug.

But also, I've noticed lately that sometimes in addition to the mouse continuing to show, the game also "short circuits" something related to the input to the virtual keyboard, causing the game (or steam) to think that I am continuously pressing virtual keyboard keys. As a result, the game plays a loud never ending series of beeps, the sound effect that plays when you move around the virtual keyboard. This continues even after the virtual keyboard goes away, and even after exiting to the main menu of the game. The only way to fix it is to restart. This might be a different bug, but it is related.
NineNine
Fast Inserter
Fast Inserter
Posts: 150
Joined: Mon Oct 24, 2022 11:20 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by NineNine »

This sounds like a Steam problem. Can you reproduce it when you're not using Steam?
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

This sounds like a Steam problem.
This bug is evidently caused by a problem in the Factorio code, making it a Factorio problem. I use the same setup (controller only, no mouse) with other games on the same computer and do not experience this problem. In other games on the same setup, I open the steam overlay and the steam virtual keyboard and a mouse cursor does not show. In Factorio however, not only does a mouse cursor show but it then never goes away until the game is restarted.
Can you reproduce it when you're not using Steam?
The bug is caused by the steam overlay or the steam virtual keyboard being open in-game. So no, this cannot be reproduced without Steam as far as I know.

It is a problem with Factorio's integration with steam. And it is evidently caused by Factorio, not by steam, because I have not seen this problem in any other game.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

From a software development perspective, it is the responsibility of the actively frontmost running software to hide the cursor if that is how it is meant to be used.

It is technically possible that Steam does something annoying on its end and contributes to this problem somehow. I'm sure this is a frustrating issue for Factorio devs, as integrating with other software can be a huge pain, and I sympathize. However, the ultimate responsibility is still on Factorio, as evidenced mainly by the fact that it works fine in other games and that desktop applications are responsible for managing their own cursors.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

As far as I know, no software has the technical ability to hide the cursor in another software. When you hover your mouse over an application, that application tells the system how to draw the cursor. Steam can't tell Windows OS how to draw (or hide, which is what we want) Factorio's cursor. Only Factorio can do that.

Yes, the Steam overlay could be doing something annoying that causes changes the state of Factorio in unexpected ways. But Factorio will just have to test for this and handle it in its own code. Its a straightforward but likely annoying bug and I can sympathize.

It would be nice for this bug to be acknowledged.
Tertius
Filter Inserter
Filter Inserter
Posts: 935
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by Tertius »

A7x49 wrote: Tue Sep 17, 2024 7:11 am As far as I know, no software has the technical ability to hide the cursor in another software.
For Windows, that's not the case. The mouse is a global resource and every app has always access to all of the mouse functions and full control of the mouse if it is interested in doing that. There are app specific mouse events, but they're just convenience. You're always free to hook global mouse events and get everything.

For example, if you check the mouse functions of Autohotkey https://www.autohotkey.com/docs/v2/lib/ControlClick.htm (check the functions in the sidebar on the left), you get a glimpse of what is possible. Via direct DllCalls even more is possible, including hide the mouse cursor: https://www.autohotkey.com/docs/v2/lib/ ... HideCursor
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

Thank you @Tertius I appreciate the information. I have a background developing desktop software (and not video games) for MacOS and Java so I admit I don't really know how Windows or Steam works. I see I was wrong in what I said above.

Based on what you provided though, I can conceptualize a solution that Factorio could possibly implement.

I did some research and found `https://steamworks.github.io/gettingstarted/`, which is aparently the code for how a windows game might get events for when the steam overlay is activated and deactivated. I am not sure if this is the proper solution or not, but maybe Factorio could just listen for when the steam overlay is deactivated and then call some DllCalls API function to hide the mouse cursor as you suggested (if and only if the player is using a controller and no mouse).
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

It has been over a week without any responses, and this post is still in the "Technical Help" section. I am afraid that developers are unaware of this bug as result. since this forums section might be the responsibility of a tech support team instead of the development team.

Can it please be moved to the bugs forum, which is where I originally posted it?
Loewchen
Global Moderator
Global Moderator
Posts: 9195
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by Loewchen »

If you want someone to take a look at it, edit your post to follow 52433.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Mouse cursor shows when using controller and opening steam overlay on windows

Post by Bilka »

I can reproduce the issue, moving to bug reports.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: [1.1.110] Mouse cursor shows when using controller and opening steam overlay on windows

Post by A7x49 »

Thank you. Please let me know if there is anything else you need from me. I can provide a log file if its helpful, though since you already reproduced it I'm not sure if you need it.
Post Reply

Return to “Assigned”