Skip to content

Hide game window on quit to make it look instant #4253

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lopezloo
Copy link
Member

Resolves #4242.

Works best on windowed/borderless video mode.

@lopezloo lopezloo added the bugfix Solution to a bug of any kind label Jun 12, 2025
@lopezloo lopezloo mentioned this pull request Jun 12, 2025
1 task
@nekjutsu
Copy link

"Hide a problem to avoid solving it"

@Fernando-A-Rocha
Copy link
Contributor

"Hide a problem to avoid solving it"

Developer of the anticheat "netc" would need to solve the long execution of the code that makes MTA wait on quit... And I don't think that's gonna happen soon, so this is realistic 😅

@nekjutsu
Copy link

"Hide a problem to avoid solving it"

Developer of the anticheat "netc" would need to solve the long execution of the code that makes MTA wait on quit... And I don't think that's gonna happen soon, so this is realistic 😅

Let anticheat developer always "feel" the long exit. It will serve as a reminder to him 😉

P.S. What if I just want to restart the client? I’ll have to guess when the invisible game process will close before launching the client again

@AlexTMjugador
Copy link
Member

AlexTMjugador commented Jun 13, 2025

P.S. What if I just want to restart the client? I’ll have to guess when the invisible game process will close before launching the client again

Given that #4242 states that "it takes few seconds to quit MTA client", it's likely that the time most users would take to launch the game again is greater than the time the game takes to properly close, rendering this workaround a non-issue. Moreover, I don't think launching MTA again tenths of seconds after closing it is a common use case, and if it ever happens, people can just try again.

I agree that the proper fix to this issue would be to locate what's causing that slowdown and optimize that, but given that such slowdown is said to be located on the net module, which for all intents and purposes is a closed-source, binary blob for the vast majority of MTA developers, I reckon getting it fixed there would be a slow process at best.

Edit: it was also said in the linked issue that the net module has been tweaked in r23238, so maybe the situation with this slowdown is better now?

@lopezloo
Copy link
Member Author

it was also said in the linked issue that the net module has been tweaked in r23238, so maybe the situation with this slowdown is better now?

Yes, it should be slighty better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Solution to a bug of any kind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quit is slow
4 participants