Add patch to fix lrint at libsdl_gfx (#411)

pull/414/head
PucklaMotzer09 4 years ago committed by GitHub
parent f874fe763a
commit 4012d2044c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      packages/l/libsdl_gfx/patches/1.0.4/lrint_fix.patch
  2. 1
      packages/l/libsdl_gfx/xmake.lua

@ -0,0 +1,13 @@
diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c
index c6f7894..0ab6b22 100644
--- a/SDL2_gfxPrimitives.c
+++ b/SDL2_gfxPrimitives.c
@@ -1757,7 +1757,7 @@ int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Ui
/* ----- AA Ellipse */
/* Windows targets do not have lrint, so provide a local inline version */
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER < 1928
/* Detect 64bit and use intrinsic version */
#ifdef _M_X64
#include <emmintrin.h>

@ -10,6 +10,7 @@ package("libsdl_gfx")
add_versions("sourceforge:1.0.4", "63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262")
add_patches("1.0.4", path.join(os.scriptdir(), "patches", "1.0.4", "add-x64-support.patch"), "623ed5796c2771dc959ef0249b46a07762981a98dd25a534977f2614791d61a0")
add_patches("1.0.4", path.join(os.scriptdir(), "patches", "1.0.4", "lrint_fix.patch"), "9fb928306fb25293720214377bff2f605f60ea26f43ea5346cf1268c504aff1a")
elseif is_plat("macosx", "linux") then
set_urls("https://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-$(version).tar.gz")
add_urls("https://ufpr.dl.sourceforge.net/project/sdl2gfx/SDL2_gfx-$(version).tar.gz")

Loading…
Cancel
Save