feat(extra-natives/five): add IS_FULLSCREEN
Goal of this PR
This PR introduces a new native function that determines whether the client window is in fullscreen mode. This feature can benefit web developers and be useful for some functionalities.
How is this PR achieving the goal
By adding the native function IsFullscreen, developers can easily check if the client window is in fullscreen mode.
This PR applies to the following area(s)
- FiveM
- Natives
Successfully tested on
- 3258
- 3095
- 2944
Game builds: all
Platforms: Windows
Checklist
- [x] Code compiles and has been tested successfully.
- [x] Code explains itself well and/or is documented.
- [ ] My commit message explains what the changes do and what they are for.
- [x] No extra compilation warnings are added by these changes.
Fixes issues
none
Sorry for shitty commits name, it's because i have modified the native-decls in github web.
Can you explain what this is needed for?
This feature can benefit web developers and be useful for some functionalities.
Isn't very specific.
A feature request like this got shut down before out of fear that people would abuse this for cheat detection
A feature request like this got shut down before out of fear that people would abuse this for cheat detection
What is the problem if it's used to detect cheaters? It's the server problem if it lead to a fake ban.
You can already do this with
print(GetConvar("profile_vidScreenType", 1))
You can already do this with
print(GetConvar("profile_vidScreenType", 1))
oh ok good to know but very few people know it adding the native would make it “easier”.
A feature request like this got shut down before out of fear that people would abuse this for cheat detection
What is the problem if it's used to detect cheaters? It's the server problem if it lead to a fake ban.
Because this will lead to servers trying to force players to play in "Fullscreen" or risk being banned because of the possibility of the player cheating.
There is also no need for the server to have access to this information, unless you have another reason other than "to detect cheats"
A set screen type of Windowed or Fullscreen (with a non-default resolution) would result in this returning false. So there's no way to differentiate between a non-focused game window and these screen settings. I can't think of any use case where a script could benefit from this information.
Thank you for your contribution but our current common goal is to not increase codebase without proper reason for that. I can't find any real use case for that. If you have such use case feel free to provide it, but for now I will close this PR.