-
Notifications
You must be signed in to change notification settings - Fork 10
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
Shortcut to kill currently running game #5
Comments
It seems using hooks on Windows (is there something like that on Linux and Mac?) could work but it's low level so we would need to compile a module to access it: https://learn.microsoft.com/en-us/windows/win32/winmsg/using-hooks. Another solution could be to integrate a simple python script, which doesn't require compiling a module. If python is not available on the platform, it would simply not be used. https://github.com/boppreh/keyboard There is a proposal about including that in Godot but I don't think it's being worked on: godotengine/godot-proposals#1919 |
Godot by its nature is restricted to minimal OS-level features... This is a bit of a problem for an application like this... if you dont fully trust the games running properly or leaving it unattended. Perhaps a batch file wrapper around the whole Godot game launcher? This would handle the OS-level stuff and Godot would be just one step in the batch file to pick what process to launch next. Or Python instead of batch file? I'm not really great with Windows, so not sure what the best solution would be. Another idea: a batch file that's running in a loop, querying Godot Game Launcher. If the game launcher responds that it wants focus, the batch file could ask the OS to give it focus. |
Honestly this feature is just a bonus. The application already watches the PID that was launched so I won't get stuck if the game crashes or something. It would just make life easier if we could force kill the game without going back to the launcher to hit the kill button. I think I'll go with the python version. This app is aimed at developer showcasing their games so we can assume they have python or at least know how to get it if they want to use this feature. |
I'm part of a local nonprofit group that is making an arcade machine to showcase local games and for game jams. Eventually the machine will need to be left unattended for long periods so being crash-resilient will be a priority Planning on trying your launcher for this purpose .... so I may be a lot more active here lol |
I added ctrl-c as a shortcut to kill the game but Godot won't receive inputs when not focused. It could probably be done with OS specific functions. If anyone want to help on that, let me know.
The text was updated successfully, but these errors were encountered: