Skip to content
Permalink
Browse files

atari:xbios: Revert add 256 byte, already done before calling the fun…

…ction
  • Loading branch information
pmandin committed Sep 27, 2017
1 parent 21b5d1b commit 4c4e3fbc7a91e5a587b002c92e75c79c458d9244
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/video/xbios/SDL_xbios_f30.c
  2. +2 −2 src/video/xbios/SDL_xbios_st.c
@@ -282,13 +282,13 @@ static int allocVbuffers_SV(_THIS, int num_buffers, int bufsize)
Uint32 tmp;

for (i=0; i<num_buffers; i++) {
XBIOS_screensmem[i] = Atari_SysMalloc(bufsize+256, MX_STRAM);
XBIOS_screensmem[i] = Atari_SysMalloc(bufsize, MX_STRAM);

if (XBIOS_screensmem[i]==NULL) {
SDL_SetError("Can not allocate %d KB for buffer %d", bufsize>>10, i);
return (0);
}
SDL_memset(XBIOS_screensmem[i], 0, bufsize+256);
SDL_memset(XBIOS_screensmem[i], 0, bufsize);

/* Align on 256byte boundary and map to Supervidel memory */
tmp = ( (Uint32) XBIOS_screensmem[i]+256) & 0xFFFFFF00UL;
@@ -157,13 +157,13 @@ static int allocVbuffers(_THIS, int num_buffers, int bufsize)
int i;

for (i=0; i<num_buffers; i++) {
XBIOS_screensmem[i] = Atari_SysMalloc(bufsize+256, MX_STRAM);
XBIOS_screensmem[i] = Atari_SysMalloc(bufsize, MX_STRAM);

if (XBIOS_screensmem[i]==NULL) {
SDL_SetError("Can not allocate %d KB for buffer %d", bufsize>>10, i);
return (0);
}
SDL_memset(XBIOS_screensmem[i], 0, bufsize+256);
SDL_memset(XBIOS_screensmem[i], 0, bufsize);

XBIOS_screens[i]=(void *) (( (long) XBIOS_screensmem[i]+256) & 0xFFFFFF00UL);
}

0 comments on commit 4c4e3fb

Please sign in to comment.