Skip to content

Commit

Permalink
Tell user how many bytes are needed
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed Jul 27, 2005
1 parent 4bb0138 commit e9d9266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/video/gem/SDL_gemvideo.c
Expand Up @@ -674,7 +674,7 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
if (use_shadow1) {
GEM_buffer1 = Atari_SysMalloc(screensize, MX_PREFTTRAM);
if (GEM_buffer1==NULL) {
SDL_SetError("Unable to allocate shadow buffer");
SDL_SetError("Can not allocate %d KB for frame buffer", screensize>>10);
return NULL;
}
memset(GEM_buffer1, 0, screensize);
Expand All @@ -686,7 +686,7 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
if (use_shadow2) {
GEM_buffer2 = Atari_SysMalloc(screensize, MX_PREFTTRAM);
if (GEM_buffer2==NULL) {
SDL_SetError("Unable to allocate shadow buffer");
SDL_SetError("Can not allocate %d KB for shadow buffer", screensize>>10);
return NULL;
}
memset(GEM_buffer2, 0, screensize);
Expand Down
6 changes: 3 additions & 3 deletions src/video/xbios/SDL_xbios.c
Expand Up @@ -552,7 +552,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,
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);
Expand All @@ -569,7 +569,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,

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);
Expand All @@ -590,7 +590,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current,

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);
Expand Down

0 comments on commit e9d9266

Please sign in to comment.