Architecture: adding windows on ARM support
Description
This pull request introduces Windows on ARM support for the OBS-WebSocket. The changes include modifications which are carefully guarded with ARM-specific macros to ensure compatibility without affecting the existing codebase.
Motivation and Context
The primary motivation for this change is to expand the compatibility of OBS Studio to include Windows on ARM-based systems. This enhancement allows users running on ARM architecture to leverage the functionalities of OBS-WebSocket. By ensuring that changes are guarded with ARM-specific macros, we maintain the integrity and compatibility of the existing codebase.
How Has This Been Tested?
Tested OS(s): Windows 11
The changes were tested by building the OBS Studio application on an ARM machine (X-Elite machine). All builds were successful. Basic functionality tests confirmed that the OBS Studio application with the modified WebSocket is functional.
Types of changes
Code Refactoring:
- Replaces "std::numeric_limits<uint32_t>::max()" with "(std::numeric_limits<uint32_t>::max)()" to avoid conflicts with macros named "max" in certain environments.
Checklist:
- [x] I have read the Contributing Guidelines.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] My code is not on
masteror arelease/*branch. - [x] The code has been tested.
- [x] I have included updates to all appropriate documentation.
I don't fully understand this. The code in master already builds on ARM platforms for Mac and Linux, and is valid C++ code. For what reason should Windows not also work fine?
I don't fully understand this. The code in
masteralready builds on ARM platforms for Mac and Linux, and is valid C++ code.
This code causes compilation errors in WOA devices related to the use of std::numeric_limits<int>::min() and std::numeric_limits<int>::max(). The () are included to ensure that we are explicitly invoking the functions from the <limits> header rather than the windows macros that are defined.
Click here to view the previous discussion on this particular change in the Obs-Studio repo.
OBS Studio's CMake now always sets NOMINMAX on Windows builds, so this should no longer be needed.