shithub: npe

Download patch

ref: 42afe9c1c3c65fe1e1be697f4dd8f512a0b2b8b5
parent: 01554ffb5ab1f016a2c1c9a97245c80cd584b90b
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Mar 17 07:15:02 EDT 2021

sdl2: work around SDL_Init(0) and make SDL_Quit nop for now

--- a/libnpe_sdl2/sdl2.c
+++ b/libnpe_sdl2/sdl2.c
@@ -227,6 +227,9 @@
 	if(getwd(basepath, sizeof(basepath)) == nil)
 		strcpy(basepath, "/");
 
+	if(mask == 0)
+		return 0;
+
 	if(memimageinit() < 0)
 		goto err;
 	if(initdraw(nil, nil, argv0) < 0)
@@ -607,7 +610,7 @@
 void
 SDL_Quit(void)
 {
-	threadexitsall(nil);
+	/* FIXME deinitialize */
 }
 
 void