atari:xbios: still need to set UpdateRects after video mode set. SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Thu, 31 Jul 2014 12:34:49 +0200
branchSDL-1.2
changeset 9038 21cf92e5a796
parent 9036 e05157cbe85b
child 9039 5655b275e9d4
atari:xbios: still need to set UpdateRects after video mode set.
src/video/xbios/SDL_xbios.c
src/video/xbios/SDL_xbios.h
src/video/xbios/SDL_xbios_ctpci.c
--- a/src/video/xbios/SDL_xbios.c	Wed Jul 30 21:10:06 2014 +0200
+++ b/src/video/xbios/SDL_xbios.c	Thu Jul 31 12:34:49 2014 +0200
@@ -181,7 +181,7 @@
 	device->ListModes = XBIOS_ListModes;
 	device->SetVideoMode = XBIOS_SetVideoMode;
 	device->SetColors = NULL;	/* Defined by each device specific backend */
-	device->UpdateRects = XBIOS_UpdateRects;
+	device->UpdateRects = NULL;	/* Defined once video mode set */
 	device->VideoQuit = XBIOS_VideoQuit;
 	device->AllocHWSurface = XBIOS_AllocHWSurface;
 	device->LockHWSurface = XBIOS_LockHWSurface;
@@ -209,6 +209,7 @@
 		cookie_cvdo = VDO_ST << 16;
 	}
 	SDL_XBIOS_VideoInit_ST(device, cookie_cvdo);
+	device->hidden->updRects = XBIOS_UpdateRects;
 
 	switch (cookie_cvdo>>16) {
 		case VDO_ST:
@@ -523,6 +524,7 @@
 	Vsync();
 #endif
 
+	this->UpdateRects = XBIOS_updRects;
 	return (current);
 }
 
--- a/src/video/xbios/SDL_xbios.h	Wed Jul 30 21:10:06 2014 +0200
+++ b/src/video/xbios/SDL_xbios.h	Thu Jul 31 12:34:49 2014 +0200
@@ -74,6 +74,8 @@
 	void (*swapVbuffers)(_THIS);	/* Swap video buffers */
 	int (*allocVbuffers)(_THIS, int num_buffers, int bufsize);	/* Allocate video buffers */
 	void (*freeVbuffers)(_THIS);	/* Free video buffers */
+
+	void (*updRects)(_THIS, int numrects, SDL_Rect *rects);	/* updateRects to use when video ready */
 };
 
 /* _VDO cookie values */
@@ -122,6 +124,8 @@
 #define XBIOS_allocVbuffers	(this->hidden->allocVbuffers)
 #define XBIOS_freeVbuffers	(this->hidden->freeVbuffers)
 
+#define XBIOS_updRects		(this->hidden->updRects)
+
 /*--- Functions prototypes ---*/
 
 void SDL_XBIOS_AddMode(_THIS, int actually_add, const xbiosmode_t *modeinfo);
--- a/src/video/xbios/SDL_xbios_ctpci.c	Wed Jul 30 21:10:06 2014 +0200
+++ b/src/video/xbios/SDL_xbios_ctpci.c	Thu Jul 31 12:34:49 2014 +0200
@@ -89,7 +89,7 @@
 	XBIOS_allocVbuffers = allocVbuffers;
 	XBIOS_freeVbuffers = freeVbuffers;
 
-	this->UpdateRects = updateRects;
+	XBIOS_updRects = updateRects;
 	this->FlipHWSurface = flipHWSurface;
 }