diff src/video/xbios/SDL_xbios.c @ 1104:bf145eaf76ef

Tell user how many bytes are needed
author Patrice Mandin <patmandin@gmail.com>
date Wed, 27 Jul 2005 19:46:59 +0000
parents 18e5babe266e
children 1901fea5edac
line wrap: on
line diff
--- a/src/video/xbios/SDL_xbios.c	Wed Jul 27 19:18:10 2005 +0000
+++ b/src/video/xbios/SDL_xbios.c	Wed Jul 27 19:46:59 2005 +0000
@@ -552,7 +552,7 @@
 		XBIOS_shadowscreen = Atari_SysMalloc(new_screen_size, MX_PREFTTRAM);
 
 		if (XBIOS_shadowscreen == NULL) {
-			SDL_SetError("XBIOS_SetVideoMode: Not enough memory for shadow surface");
+			SDL_SetError("Can not allocate %d KB for shadow buffer", new_screen_size>>10);
 			return (NULL);
 		}
 		memset(XBIOS_shadowscreen, 0, new_screen_size);
@@ -569,7 +569,7 @@
 
 	if (XBIOS_screensmem[0]==NULL) {
 		XBIOS_FreeBuffers(this);
-		SDL_SetError("XBIOS_SetVideoMode: Not enough memory for video buffer");
+		SDL_SetError("Can not allocate %d KB for frame buffer", new_screen_size>>10);
 		return (NULL);
 	}
 	memset(XBIOS_screensmem[0], 0, new_screen_size);
@@ -590,7 +590,7 @@
 
 		if (XBIOS_screensmem[1]==NULL) {
 			XBIOS_FreeBuffers(this);
-			SDL_SetError("XBIOS_SetVideoMode: Not enough memory for double buffer");
+			SDL_SetError("Can not allocate %d KB for double buffer", new_screen_size>>10);
 			return (NULL);
 		}
 		memset(XBIOS_screensmem[1], 0, new_screen_size);