Skip to content

Instantly share code, notes, and snippets.

View Themaister's full-sized avatar

Hans-Kristian Arntzen Themaister

View GitHub Profile
From a140e58c748880daf2a75bb16d593146cb8165a1 Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Sun, 15 Apr 2012 21:36:46 +0200
Subject: [PATCH 1/3] Fix build for Linux.
Removes seemingly useless usage of chown().
---
memmap.cpp | 6 ------
1 file changed, 6 deletions(-)
From f735fa91f9b527e0fe268ef60c45a9533e6f21f9 Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Sun, 15 Apr 2012 21:38:49 +0200
Subject: [PATCH] Fix build on 64-bit systems.
---
libretro/libretro.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp
Index: src/burner/ioapi.c
===================================================================
--- src/burner/ioapi.c (revision 395)
+++ src/burner/ioapi.c (working copy)
@@ -14,6 +14,12 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
+#if defined(__APPLE__)
+#define fopen64 fopen
From a30607e9b99511590d521d25ca093afd9e535244 Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Fri, 9 Mar 2012 00:38:13 +0100
Subject: [PATCH] Do not include png.h when targeting libsnes.
---
src/burner/burner.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/burner/burner.h b/src/burner/burner.h
From b2ed2ca1dbcf5c9a03bd55f46e4aa32e54cc480f Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Fri, 9 Mar 2012 00:32:07 +0100
Subject: [PATCH] Fix libsnes build.
---
makefile.libsnes | 5 +++--
src/burner/libsnes/generate_files.sh | 4 ++--
src/burner/libsnes/libsnes.cpp | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
From c1eed92b019561d35742bf6e6be1a085bebe0de7 Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Wed, 29 Feb 2012 18:52:13 +0100
Subject: [PATCH] Fix off-by-one bug in joypad ID handling.
---
libsnes.hpp | 2 --
ps3/menu.c | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
From 18eafaf6d1304cdb9fbc5335de9b19e544508e27 Mon Sep 17 00:00:00 2001
From: Themaister <[email protected]>
Date: Tue, 3 Jan 2012 17:55:53 -0800
Subject: [PATCH] Check for -framework SDL.
---
qb/config.libs.sh | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/qb/config.libs.sh b/qb/config.libs.sh
#include <emmintrin.h>
#include <stdio.h>
int main(void)
{
// Attempt to divide by 0x8000. With integer math this is right shift by 15.
// IEEE floats are laid out like this:
// [1 - 8 - 23]
// [Sign bit - Exponent - Mantissa]
#include <emmintrin.h>
#include <stdio.h>
int main(void)
{
static float buf[] __attribute__((aligned(16))) = {0x4000, 0x3000, 0x2000, 0x1000};
printf("Before: %f, %f, %f, %f\n", buf[0], buf[1], buf[2], buf[3]);
__m128i reg = _mm_load_si128((__m128i*)buf);
#ifndef __SHIFTMUL_H
#define __SHIFTMUL_H
namespace Internal
{
template <unsigned a, unsigned x, unsigned y>
struct static_if
{
enum { value = x };
};