Description
Describe the bug
I recently started using isMTAWindowFocused() to reduce CPU usage of clients while they're minimized.
I join a server via a shortcut on my desktop like this: mtasa://94.23.158.180:22003/
I then maximize MTA once the server has been joined.
And noticed that it was as if my game was minimized (not rendering stuff and lowered FPS)
Because even though the game is visible as you can see from the screenshot, isMTAWindowFocused() returns false when it should return true.
Minimizing and then maximizing the game does fix it.
I also added an event handler to see if onClientRestore triggers when first maximizing and it doesn't.
Steps to reproduce
Add a shortcut like: mtasa://94.23.158.180:22003/
Double click on it, do something else so that it doesn't get maximized when it opens.
Once joined the server: crun isMTAWindowFocused()
Version
Multi Theft Auto v1.6-release-23198
Additional context
No response
Relevant log output
Security Policy
- I have read and understood the Security Policy and this issue is not security related.