From a9a67052ff749518e678c70cc7de01a9ac8fedcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=9A=93?= Date: Sat, 17 May 2025 10:08:36 -0400 Subject: [PATCH] Fix libretro PlayStation 3 build --- .../packagefiles/openal-soft-constexpr.patch | 125 +++++++++++++++++- 1 file changed, 119 insertions(+), 6 deletions(-) diff --git a/subprojects/packagefiles/openal-soft-constexpr.patch b/subprojects/packagefiles/openal-soft-constexpr.patch index d5b6d1cd..941cfa21 100644 --- a/subprojects/packagefiles/openal-soft-constexpr.patch +++ b/subprojects/packagefiles/openal-soft-constexpr.patch @@ -3,15 +3,128 @@ --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp -@@ -243,7 +243,7 @@ constexpr auto EffectSlotTypeFromEnum(ALenum type) noexcept -> EffectSlotType - case AL_EFFECT_DEDICATED_DIALOGUE: return EffectSlotType::Dedicated; - case AL_EFFECT_CONVOLUTION_SOFT: return EffectSlotType::Convolution; +@@ -221,7 +221,7 @@ void RemoveActiveEffectSlots(const al::span auxslots, ALCcontext + + + [[nodiscard]] +-constexpr auto EffectSlotTypeFromEnum(ALenum type) noexcept -> EffectSlotType ++auto EffectSlotTypeFromEnum(ALenum type) noexcept -> EffectSlotType + { + switch(type) + { +--- a/al/buffer.cpp ++++ b/al/buffer.cpp +@@ -81,7 +81,7 @@ constexpr auto AmbiLayoutFromEnum(ALenum layout) noexcept -> std::optional ALenum ++auto EnumFromAmbiLayout(AmbiLayout layout) -> ALenum + { + switch(layout) + { +@@ -102,7 +102,7 @@ constexpr auto AmbiScalingFromEnum(ALenum scale) noexcept -> std::optional ALenum ++auto EnumFromAmbiScaling(AmbiScaling scale) -> ALenum + { + switch(scale) + { +--- a/al/debug.cpp ++++ b/al/debug.cpp +@@ -100,7 +100,7 @@ constexpr auto GetDebugSeverity(ALenum severity) noexcept -> std::optional ALenum ++auto GetDebugSourceEnum(DebugSource source) -> ALenum + { + switch(source) + { +@@ -114,7 +114,7 @@ constexpr auto GetDebugSourceEnum(DebugSource source) -> ALenum + int{al::to_underlying(source)})}); + } + +-constexpr auto GetDebugTypeEnum(DebugType type) -> ALenum ++auto GetDebugTypeEnum(DebugType type) -> ALenum + { + switch(type) + { +@@ -132,7 +132,7 @@ constexpr auto GetDebugTypeEnum(DebugType type) -> ALenum + int{al::to_underlying(type)})}); + } + +-constexpr auto GetDebugSeverityEnum(DebugSeverity severity) -> ALenum ++auto GetDebugSeverityEnum(DebugSeverity severity) -> ALenum + { + switch(severity) + { +--- a/al/effects/chorus.cpp ++++ b/al/effects/chorus.cpp +@@ -36,7 +36,7 @@ constexpr std::optional WaveformFromEnum(ALenum type) noexcept + } + return std::nullopt; + } +-constexpr ALenum EnumFromWaveform(ChorusWaveform type) ++ALenum EnumFromWaveform(ChorusWaveform type) + { + switch(type) + { +--- a/al/effects/fshifter.cpp ++++ b/al/effects/fshifter.cpp +@@ -32,7 +32,7 @@ constexpr std::optional DirectionFromEmum(ALenum value) noexc + } + return std::nullopt; + } +-constexpr ALenum EnumFromDirection(FShifterDirection dir) ++ALenum EnumFromDirection(FShifterDirection dir) + { + switch(dir) + { +--- a/al/effects/modulator.cpp ++++ b/al/effects/modulator.cpp +@@ -32,7 +32,7 @@ constexpr std::optional WaveformFromEmum(ALenum value) noexce + } + return std::nullopt; + } +-constexpr ALenum EnumFromWaveform(ModulatorWaveform type) ++ALenum EnumFromWaveform(ModulatorWaveform type) + { + switch(type) + { +--- a/al/effects/vmorpher.cpp ++++ b/al/effects/vmorpher.cpp +@@ -61,7 +61,7 @@ constexpr std::optional PhenomeFromEnum(ALenum val) noexcept + return std::nullopt; + #undef HANDLE_PHENOME + } +-constexpr ALenum EnumFromPhenome(VMorpherPhenome phenome) ++ALenum EnumFromPhenome(VMorpherPhenome phenome) + { + #define HANDLE_PHENOME(x) case VMorpherPhenome::x: return AL_VOCAL_MORPHER_PHONEME_ ## x + switch(phenome) +@@ -111,7 +111,7 @@ constexpr std::optional WaveformFromEmum(ALenum value) noexcep + } + return std::nullopt; + } +-constexpr ALenum EnumFromWaveform(VMorpherWaveform type) ++ALenum EnumFromWaveform(VMorpherWaveform type) + { + switch(type) + { +--- a/al/state.cpp ++++ b/al/state.cpp +@@ -129,7 +129,7 @@ constexpr auto DistanceModelFromALenum(ALenum model) noexcept -> std::optional ALenum ++auto ALenumFromDistanceModel(DistanceModel model) -> ALenum + { + switch(model) + { --- a/common/alstring.h +++ b/common/alstring.h @@ -22,15 +22,15 @@ auto sizei(const std::basic_string &str) noexcept -> int