Files
RSDKv5-Decompilation/libtheora_rint_fix.patch
2024-07-12 00:53:54 -04:00

17 lines
413 B
Diff

diff --git a/examples/encoder_example.c b/examples/encoder_example.c
index d6f5c58..a1f73f1 100644
--- a/examples/encoder_example.c
+++ b/examples/encoder_example.c
@@ -53,7 +53,11 @@
#include <string.h>
#include <ctype.h>
+#ifdef _MSC_VER
+static double rint(double x) { return x < 0 ? ceil(x - 0.5) : floor(x + 0.5); }
+#else
extern double rint(double _x);
+#endif
#define OC_THEORA 0
#define OC_VP3 1