Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Waiting to run
On Linux, using system libraries is generally preferred, but this is
less relevant on macOS and Windows. In particular, macOS does not
provide "alext.h" in its OpenAL framework, which causes the build to
fail.
Even when USE_SYSTEM_OPENAL was enabled, the code directly included the
bundled OpenAL headers, bypassing the system headers.
Since `#include <AL/al.h>` is not portable, use `#include "al.h"`
instead.
https://cmake.org/cmake/help/latest/module/FindOpenAL.html
Currently, this is a draft PR to implement Feral Interactive's Gamemode
into RPCS3, which can improve game performance on certain Linux systems.
At the moment, I am running into various compiler warnings when trying
to include "gamemode_client.h" due to the file not using strict typings
and old C-style casts. I know I can disable these flags during RPCS3's
compilation but I wanted to check with the maintainers before going
forward and if this feature should be implemented.
It should be noted that RPCS3 only fails to compile and run if I include
Feral's header file, but everything else compiles if I comment out the
include.
Targets Issue #11299
The function event_strcmp_events was previously returning int values
(-1, 0, 1) to indicate ordering. While this may resemble strcmp-like
semantics, it is invalid when used as a comparator with std::sort.
According to the C++ standard, the comparator used in standard
algorithms must be a function object returning a value contextually
convertible to bool, where comp(a, b) returns true if and only if a is
considered less than b.
Returning -1, 0, or 1 violates these rules. In particular, std::sort()
only expects the comparator to return a boolean value, and it uses that
value to infer ordering. Returning an int may lead to incorrect sorting
behavior and undefined behavior, including segmentation faults.
Replace the int-style comparator with a strict boolean comparison to
comply with the standard and ensure sorting correctness.