SDL-1.2: atari:video:xbios: Fix vsync_NOVA()

From 7ee5e2fb89c0c6412ad55b345875e3f2be5cb19e Mon Sep 17 00:00:00 2001
From: Miro Kropacek <[EMAIL REDACTED]>
Date: Mon, 2 Oct 2023 21:59:42 +0200
Subject: [PATCH] atari:video:xbios: Fix vsync_NOVA()

Now SDL_VIDEODRIVER=xbios seems to be working but the screensaver still interferes.
---
 src/video/xbios/SDL_xbios_nova.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/video/xbios/SDL_xbios_nova.c b/src/video/xbios/SDL_xbios_nova.c
index 8e91d8b6..a3a5eaf3 100644
--- a/src/video/xbios/SDL_xbios_nova.c
+++ b/src/video/xbios/SDL_xbios_nova.c
@@ -187,7 +187,21 @@ static void restoreMode(_THIS)
 
 static void vsync_NOVA(_THIS)
 {
-	NOVA_xcb->p_vsync();
+	void *oldstack;
+
+	oldstack = (void *)Super(NULL);
+
+	__asm__ __volatile__ (
+		"movel	%0,%%a0\n\t"
+		"jsr	%%a0@"
+		: /* no return value */
+		: /* input */
+		  "g"(NOVA_xcb->p_vsync)
+		: /* clobbered registers */
+		  "d0", "d1", "d2", "a0", "a1", "cc", "memory"
+		);
+
+	SuperToUser(oldstack);
 }
 
 static void getScreenFormat(_THIS, int bpp, Uint32 *rmask, Uint32 *gmask, Uint32 *bmask, Uint32 *amask)