forked from pool/python-pygame
- Cherry-pick upstream patch to fix build with GCC 14 * pygame-pr4236-gcc14.patch - Add python-Cython to BuildRequires - Switch upstream source to GitHub to avoid generated C code OBS-URL: https://build.opensuse.org/request/show/1177462 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=57
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 504a11fd4855e33ecb945af1270311aa463aae59 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
|
|
Date: Sun, 19 May 2024 11:12:33 +0200
|
|
Subject: [PATCH] pypm: Fix incorrect param in Pm_OpenInput
|
|
|
|
---
|
|
src_c/cython/pygame/pypm.pyx | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src_c/cython/pygame/pypm.pyx b/src_c/cython/pygame/pypm.pyx
|
|
index f2c16c9e2b..54a88fd83a 100644
|
|
--- a/src_c/cython/pygame/pypm.pyx
|
|
+++ b/src_c/cython/pygame/pypm.pyx
|
|
@@ -106,7 +106,7 @@ cdef extern from "portmidi.h":
|
|
PmDeviceID inputDevice,
|
|
void *inputDriverInfo,
|
|
long bufferSize,
|
|
- long (*PmPtr) (), # long = PtTimestamp
|
|
+ PmTimeProcPtr time_proc, # long = PtTimestamp
|
|
void *time_info)
|
|
|
|
PmError Pm_OpenOutput(PortMidiStream** stream,
|
|
@@ -538,11 +538,14 @@ cdef class Input:
|
|
"""Instantiate MIDI input stream object."""
|
|
|
|
cdef PmError err
|
|
+ cdef PmTimeProcPtr PmPtr
|
|
self.device = input_device
|
|
self.debug = 0
|
|
|
|
+ PmPtr = <PmTimeProcPtr>&Pt_Time
|
|
+
|
|
err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
|
|
- &Pt_Time, NULL)
|
|
+ PmPtr, NULL)
|
|
if err < 0:
|
|
raise Exception(Pm_GetErrorText(err))
|
|
|