obs-websocket icon indicating copy to clipboard operation
obs-websocket copied to clipboard

Architecture: adding windows on ARM support

Open thirumalai-qcom opened this issue 1 year ago • 2 comments

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 master or a release/* branch.
  • [x] The code has been tested.
  • [x] I have included updates to all appropriate documentation.

thirumalai-qcom avatar Jul 16 '24 19:07 thirumalai-qcom

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?

tt2468 avatar Aug 18 '24 03:08 tt2468

I don't fully understand this. The code in master already 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.

thirumalai-qcom avatar Aug 19 '24 07:08 thirumalai-qcom

OBS Studio's CMake now always sets NOMINMAX on Windows builds, so this should no longer be needed.

RytoEX avatar Feb 20 '25 19:02 RytoEX