Tell user how many bytes are needed
authorPatrice Mandin
Wed, 27 Jul 2005 19:46:59 +0000
changeset 1104bf145eaf76ef
parent 1103 18e5babe266e
child 1105 1c9988e47824
Tell user how many bytes are needed
src/video/gem/SDL_gemvideo.c
src/video/xbios/SDL_xbios.c
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Wed Jul 27 19:18:10 2005 +0000
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Wed Jul 27 19:46:59 2005 +0000
     1.3 @@ -674,7 +674,7 @@
     1.4  	if (use_shadow1) {
     1.5  		GEM_buffer1 = Atari_SysMalloc(screensize, MX_PREFTTRAM);
     1.6  		if (GEM_buffer1==NULL) {
     1.7 -			SDL_SetError("Unable to allocate shadow buffer");
     1.8 +			SDL_SetError("Can not allocate %d KB for frame buffer", screensize>>10);
     1.9  			return NULL;
    1.10  		}
    1.11  		memset(GEM_buffer1, 0, screensize);
    1.12 @@ -686,7 +686,7 @@
    1.13  	if (use_shadow2) {
    1.14  		GEM_buffer2 = Atari_SysMalloc(screensize, MX_PREFTTRAM);
    1.15  		if (GEM_buffer2==NULL) {
    1.16 -			SDL_SetError("Unable to allocate shadow buffer");
    1.17 +			SDL_SetError("Can not allocate %d KB for shadow buffer", screensize>>10);
    1.18  			return NULL;
    1.19  		}
    1.20  		memset(GEM_buffer2, 0, screensize);
     2.1 --- a/src/video/xbios/SDL_xbios.c	Wed Jul 27 19:18:10 2005 +0000
     2.2 +++ b/src/video/xbios/SDL_xbios.c	Wed Jul 27 19:46:59 2005 +0000
     2.3 @@ -552,7 +552,7 @@
     2.4  		XBIOS_shadowscreen = Atari_SysMalloc(new_screen_size, MX_PREFTTRAM);
     2.5  
     2.6  		if (XBIOS_shadowscreen == NULL) {
     2.7 -			SDL_SetError("XBIOS_SetVideoMode: Not enough memory for shadow surface");
     2.8 +			SDL_SetError("Can not allocate %d KB for shadow buffer", new_screen_size>>10);
     2.9  			return (NULL);
    2.10  		}
    2.11  		memset(XBIOS_shadowscreen, 0, new_screen_size);
    2.12 @@ -569,7 +569,7 @@
    2.13  
    2.14  	if (XBIOS_screensmem[0]==NULL) {
    2.15  		XBIOS_FreeBuffers(this);
    2.16 -		SDL_SetError("XBIOS_SetVideoMode: Not enough memory for video buffer");
    2.17 +		SDL_SetError("Can not allocate %d KB for frame buffer", new_screen_size>>10);
    2.18  		return (NULL);
    2.19  	}
    2.20  	memset(XBIOS_screensmem[0], 0, new_screen_size);
    2.21 @@ -590,7 +590,7 @@
    2.22  
    2.23  		if (XBIOS_screensmem[1]==NULL) {
    2.24  			XBIOS_FreeBuffers(this);
    2.25 -			SDL_SetError("XBIOS_SetVideoMode: Not enough memory for double buffer");
    2.26 +			SDL_SetError("Can not allocate %d KB for double buffer", new_screen_size>>10);
    2.27  			return (NULL);
    2.28  		}
    2.29  		memset(XBIOS_screensmem[1], 0, new_screen_size);