Skip to content

setCursorPosition returns true even if MTA main window isn't focused in Windows #1113

@MrDadosz

Description

@MrDadosz

Describe the bug
setCursorPosition returns true even if MTA window isn't focused. When you have game in window mode or you have borderless mode, setCursorPosition returns true.
You can't determine by any function or any event if player is in game.

To reproduce
Watch YouTube: https://youtu.be/zjQcOE3c_V8
Script: https://pastebin.com/HgvuZb6x

Why it's important for me: https://youtu.be/OItkIjldqBM?t=14

Expected behaviour
There's should be function for check if MTA isn't focused or setCursorPosition shouldn't return true if MTA isn't focused

Screenshots
Look at "to reproduce"

Version
Multi Theft Auto v1.5.7-release-20288

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions