From b08df42f95b2ac3ad38006c24ffc947c5f5409d9 Mon Sep 17 00:00:00 2001 From: pmp-p Date: Thu, 4 Jan 2024 20:55:11 +0100 Subject: [PATCH] bump sdk, add gthread.native_id --- packages.d/pygame/pygame.sh | 17 +++++++++++++++++ pygbag/support/cross/aio/gthread.py | 6 +++--- scripts/build-loader.sh | 3 ++- scripts/vendoring.sh | 2 +- test/main.py | 10 +++++++--- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/packages.d/pygame/pygame.sh b/packages.d/pygame/pygame.sh index ace2520..257efa3 100755 --- a/packages.d/pygame/pygame.sh +++ b/packages.d/pygame/pygame.sh @@ -73,6 +73,23 @@ then #unsure wget -O- https://patch-diff.githubusercontent.com/raw/pmp-p/pygame-ce-wasm/pull/3.diff | patch -p1 + patch -p1 << END +diff --git a/buildconfig/Setup.Emscripten.SDL2.in b/buildconfig/Setup.Emscripten.SDL2.in +index 0bd60a30..e74effe9 100644 +--- a/buildconfig/Setup.Emscripten.SDL2.in ++++ b/buildconfig/Setup.Emscripten.SDL2.in +@@ -6,7 +6,8 @@ + #MIXER = -lSDL2_mixer + #SCRAP = + #FREETYPE = -lfreetype -lharfbuzz +- ++PNG= -lpng ++JPEG= -ljpeg + DEBUG = + + # these can build alone and object files merged with ar +END + patch -p1 << END diff --git a/src_c/static.c b/src_c/static.c index 03cc7c61..a00a51a7 100644 diff --git a/pygbag/support/cross/aio/gthread.py b/pygbag/support/cross/aio/gthread.py index 3820050..9e368bb 100644 --- a/pygbag/support/cross/aio/gthread.py +++ b/pygbag/support/cross/aio/gthread.py @@ -101,7 +101,7 @@ def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, *, da self.name = name self.slice = 0 self.last = aio.rtclock() - + self.native_id = id(self) if target: if hasattr(target, "run"): if name is None: @@ -112,14 +112,14 @@ def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, *, da if name is None: try: - self.name = "%s-%s" % (self.run.__name__, id(self)) + self.name = "%s-%s" % (self.run.__name__, self.native_id) except: pass else: target = self if self.name is None: - self.name = "%s-%s" % (self.__class__.__name__, id(self)) + self.name = "%s-%s" % (self.__class__.__name__, self.native_id) self.status = None async def wrap(self): diff --git a/scripts/build-loader.sh b/scripts/build-loader.sh index b0846b2..e4cec71 100755 --- a/scripts/build-loader.sh +++ b/scripts/build-loader.sh @@ -255,6 +255,7 @@ then " 1>&2 # -std=gnu99 -std=c++23 +# EXTRA_EXPORTED_RUNTIME_METHODS => EXPORTED_RUNTIME_METHODS after 3.1.52 cat > final_link.sh <= 0: