diff options
| author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2022-09-19 20:59:54 -0700 | 
|---|---|---|
| committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2022-09-19 20:59:54 -0700 | 
| commit | aae70d09b04e02f55168b0ffcf83907412e6525d (patch) | |
| tree | c6562702d64471ac8dc837d6a59632989ad40357 | |
| parent | Rebuild against boost 1.80.0 (diff) | |
| download | mupen64plus-aae70d09b04e02f55168b0ffcf83907412e6525d.tar.xz | |
Rebuild with sdl patch.
| -rw-r--r-- | 030-mupen64plus-sdl12-compat-fix.patch | 29 | ||||
| -rw-r--r-- | PKGBUILD | 9 | 
2 files changed, 35 insertions, 3 deletions
| diff --git a/030-mupen64plus-sdl12-compat-fix.patch b/030-mupen64plus-sdl12-compat-fix.patch new file mode 100644 index 0000000..449e425 --- /dev/null +++ b/030-mupen64plus-sdl12-compat-fix.patch @@ -0,0 +1,29 @@ +From 8fac78d8cb54da960ca85a49547dcc4fb952457d Mon Sep 17 00:00:00 2001 +From: VarNepvius <14352929+VarNepvius@users.noreply.github.com> +Date: Tue, 6 Sep 2022 20:31:03 +0200 +Subject: [PATCH] Fix wrong pitch argument in call to SDL_CreateRGBSurfaceFrom. + +--- + src/api/vidext_sdl2_compat.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/api/vidext_sdl2_compat.h b/src/api/vidext_sdl2_compat.h +index 06d778dd9..071a64402 100644 +--- a/src/api/vidext_sdl2_compat.h ++++ b/src/api/vidext_sdl2_compat.h +@@ -474,8 +474,14 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) +         if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { +             return NULL; +         } ++ ++        /* Pitch: size of of line in bytes */ ++        /* Add 7 to bpp before division, to ensure correct rounding towards infinity ++         * in cases where bits per pixel do not cleanly divide by 8 (such as 15) ++         */ ++        int pitch = (bpp + 7) / 8 * width; +         SDL_VideoSurface = +-            SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); ++            SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, pitch, 0, 0, 0, 0); +         if (!SDL_VideoSurface) { +             return NULL; +         } @@ -12,7 +12,7 @@  pkgname=mupen64plus  pkgver=2.5  #_pkgver=2.5 -pkgrel=22 +pkgrel=23  pkgdesc='Nintendo64 Emulator'  arch=('x86_64')  url='https://github.com/mupen64plus/mupen64plus-core' @@ -23,10 +23,12 @@ depends=('boost-libs' 'freetype2' 'glu' 'libgl' 'libpng' 'libsamplerate'  makedepends=('boost' 'mesa' 'nasm')  source=("https://github.com/mupen64plus/mupen64plus-core/releases/download/${pkgver}/mupen64plus-bundle-src-${pkgver}.tar.gz"          '010-mupen64plus-ui-console-pie.patch' -        '020-mupen64plus-core-gcc10-fix.patch') +        '020-mupen64plus-core-gcc10-fix.patch' +        '030-mupen64plus-sdl12-compat-fix.patch')  sha256sums=('9c75b9d826f2d24666175f723a97369b3a6ee159b307f7cc876bbb4facdbba66'              '0b674779949ca90db9f156b56dd9d7be9847354f5b07ec73aa3a89dde79d6b6d' -            'f84f262bcf2b748ccded4443735caba92926241f9238f545a621009f6ae64ef7') +            'f84f262bcf2b748ccded4443735caba92926241f9238f545a621009f6ae64ef7' +            '1de522155742fd493075d051855e420a9bc98af2f4774ecb66b4fdef69a7adc4')  prepare() {    cd mupen64plus-bundle-src-${pkgver} @@ -42,6 +44,7 @@ prepare() {    patch -Np1 -i ../010-mupen64plus-ui-console-pie.patch    patch -Np1 -i ../020-mupen64plus-core-gcc10-fix.patch +  patch -d source/mupen64plus-core -Np1 -i ${srcdir}/030-mupen64plus-sdl12-compat-fix.patch  }  build() { | 
