first commit

This commit is contained in:
JJBanana13
2026-02-16 14:55:56 +01:00
commit bd171e45da
3858 changed files with 974230 additions and 0 deletions

0
patches/.gitkeep Normal file
View File

View File

@@ -0,0 +1,19 @@
diff --git CMakeLists.txt CMakeLists.txt
index 5dad9e9..972183d 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -51,6 +51,13 @@ add_library(rapidjson STATIC IMPORTED ${RAPIDJSON})
# add subdirs
add_subdirectory(src)
+
+# Suppress memcpy warnings from modern GCC/Clang in rapidjson.
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ target_compile_options(discord-rpc PRIVATE "-Wno-class-memaccess")
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang")
+ target_compile_options(discord-rpc PRIVATE "-Wno-nontrivial-memcall")
+endif()
+
if (BUILD_EXAMPLES)
add_subdirectory(examples/send-presence)
endif(BUILD_EXAMPLES)

View File

@@ -0,0 +1,112 @@
diff --git a/externals/mcl/include/mcl/mp/metafunction/map.hpp b/externals/mcl/include/mcl/mp/metafunction/map.hpp
index 13fcaecd..6bbe1a23 100644
--- a/externals/mcl/include/mcl/mp/metafunction/map.hpp
+++ b/externals/mcl/include/mcl/mp/metafunction/map.hpp
@@ -4,22 +4,32 @@
#pragma once
+#include "mcl/mp/typelist/list.hpp"
+
namespace mcl::mp {
-namespace detail {
+ namespace detail {
+
+ template<template<class...> class F, class L>
+ struct map_impl;
+
+ template<template<class...> class F, template<class...> class LT, class... Es>
+ struct map_impl<F, LT<Es...>> {
+ using type = LT<F<Es>...>;
+ };
-template<template<class...> class F, class L>
-struct map_impl;
-template<template<class...> class F, template<class...> class LT, class... Es>
-struct map_impl<F, LT<Es...>> {
- using type = LT<F<Es>...>;
-};
+ #if defined(__clang__) && !defined(_MSC_VER)
+ template <template<class...> class F, class... Es>
+ struct map_impl<F, mcl::mp::list<Es...>> {
+ using type = mcl::mp::list<F<Es>...>;
+ };
+ #endif
-} // namespace detail
+ } // namespace detail
-/// Applies each element of list L to metafunction F
-template<template<class...> class F, class L>
-using map = typename detail::map_impl<F, L>::type;
+ /// Applies each element of list L to metafunction F
+ template<template<class...> class F, class L>
+ using map = typename detail::map_impl<F, L>::type;
} // namespace mcl::mp
diff --git a/externals/mcl/include/mcl/mp/typelist/lift_sequence.hpp b/externals/mcl/include/mcl/mp/typelist/lift_sequence.hpp
index ba2617b8..10f7d6c5 100644
--- a/externals/mcl/include/mcl/mp/typelist/lift_sequence.hpp
+++ b/externals/mcl/include/mcl/mp/typelist/lift_sequence.hpp
@@ -5,25 +5,36 @@
#pragma once
#include <type_traits>
+#include <utility>
#include "mcl/mp/typelist/list.hpp"
namespace mcl::mp {
-namespace detail {
+ namespace detail {
-template<class VL>
-struct lift_sequence_impl;
+ template <class VL>
+ struct lift_sequence_impl; // Forward declaration
-template<class T, template<class, T...> class VLT, T... values>
-struct lift_sequence_impl<VLT<T, values...>> {
- using type = list<std::integral_constant<T, values>...>;
-};
+ // Original specialization (works for GCC/MSVC)
+ template <class T, template <class, T...> class VLT, T... values>
+ struct lift_sequence_impl<VLT<T, values...>> {
+ using type = list<std::integral_constant<T, values>...>;
+ };
-} // namespace detail
+ // Clang-specific fix: Add a more explicit specialization that Clang can match.
+ // We check for __clang__ but not _MSC_VER, as clang-cl on Windows might not need this.
+ #if defined(__clang__) && !defined(_MSC_VER)
+ template <class T, T... Ints>
+ struct lift_sequence_impl<std::integer_sequence<T, Ints...>> {
+ using type = list<std::integral_constant<T, Ints>...>;
+ };
+ #endif
-/// Lifts values in value list VL to create a type list.
-template<class VL>
-using lift_sequence = typename detail::lift_sequence_impl<VL>::type;
+ } // namespace detail
+
+ /// Lifts values in value list VL to create a type list.
+ template <class VL>
+ using lift_sequence = typename detail::lift_sequence_impl<VL>::type;
} // namespace mcl::mp
diff --git a/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp b/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp
index b8aa3eb6..b6eda4e4 100644
--- a/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp
+++ b/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp
@@ -1285,6 +1285,7 @@ void EmitX64::EmitFPVectorMul64(EmitContext& ctx, IR::Inst* inst) {
template<typename FPT, bool needs_rounding_correction, bool needs_nan_correction>
static void EmitFPVectorMulAddFallback(VectorArray<FPT>& result, const VectorArray<FPT>& addend, const VectorArray<FPT>& op1, const VectorArray<FPT>& op2, FP::FPCR fpcr, [[maybe_unused]] FP::FPSR& fpsr) {
+ #pragma clang loop vectorize(enable)
for (size_t i = 0; i < result.size(); i++) {
if constexpr (needs_rounding_correction) {
constexpr FPT non_sign_mask = FP::FPInfo<FPT>::exponent_mask | FP::FPInfo<FPT>::mantissa_mask;

View File

@@ -0,0 +1,11 @@
--- thirdparty/rapidjson-1.1.0/include/rapidjson/document.h.original 2025-10-02 02:27:11.502467388 -0400
+++ thirdparty/rapidjson-1.1.0/include/rapidjson/document.h 2025-10-02 02:27:49.451894238 -0400
@@ -316,7 +316,7 @@
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+ GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; }
//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }

View File

@@ -0,0 +1,22 @@
diff --git externals/stb/stb_image.h externals/stb/stb_image.h
index 5e807a0a6..725d0ec9e 100644
--- externals/stb/stb_image.h
+++ externals/stb/stb_image.h
@@ -5079,7 +5079,7 @@ static void stbi__de_iphone(stbi__png *z)
static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
{
stbi_uc palette[1024], pal_img_n=0;
- stbi_uc has_trans=0, tc[3]={0};
+ stbi_uc has_trans=0, tc[4]={0};
stbi__uint16 tc16[3];
stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
int first=1,k,interlace=0, color=0, is_iphone=0;
@@ -5163,7 +5163,7 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
if (z->depth == 16) {
for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is
} else {
- for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
+ for (k = 0; k < s->img_n && k < 4; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
}
}
break;