comparison src/video/xbios/SDL_xbios.c @ 287:e4bd0cf95506

From: Patrice Mandin <pmandin@caramail.com> Subject: [SDL] [PATCH] Little cleanups for Atari port
author Sam Lantinga <slouken@libsdl.org>
date Wed, 27 Feb 2002 16:15:34 +0000
parents c5010ab8ba35
children f6ffac90895c
comparison
equal deleted inserted replaced
286:3ea69fd0b095 287:e4bd0cf95506
488 488
489 if (XBIOS_shadowscreen == NULL) { 489 if (XBIOS_shadowscreen == NULL) {
490 SDL_SetError("XBIOS_SetVideoMode: Not enough memory for shadow surface"); 490 SDL_SetError("XBIOS_SetVideoMode: Not enough memory for shadow surface");
491 return (NULL); 491 return (NULL);
492 } 492 }
493 memset(XBIOS_shadowscreen, 0, new_screen_size);
493 } 494 }
494 495
495 /* Output buffer needs to be twice in size for the software double-line mode */ 496 /* Output buffer needs to be twice in size for the software double-line mode */
496 XBIOS_doubleline = SDL_FALSE; 497 XBIOS_doubleline = SDL_FALSE;
497 if (new_video_mode->doubleline) { 498 if (new_video_mode->doubleline) {
504 if (XBIOS_screensmem[0]==NULL) { 505 if (XBIOS_screensmem[0]==NULL) {
505 XBIOS_FreeBuffers(this); 506 XBIOS_FreeBuffers(this);
506 SDL_SetError("XBIOS_SetVideoMode: Not enough memory for video buffer"); 507 SDL_SetError("XBIOS_SetVideoMode: Not enough memory for video buffer");
507 return (NULL); 508 return (NULL);
508 } 509 }
510 memset(XBIOS_screensmem[0], 0, new_screen_size);
509 511
510 XBIOS_screens[0]=(void *) (( (long) XBIOS_screensmem[0]+256) & 0xFFFFFF00UL); 512 XBIOS_screens[0]=(void *) (( (long) XBIOS_screensmem[0]+256) & 0xFFFFFF00UL);
511 513
512 /* Double buffer ? */ 514 /* Double buffer ? */
513 if (flags & SDL_DOUBLEBUF) { 515 if (flags & SDL_DOUBLEBUF) {
516 if (XBIOS_screensmem[1]==NULL) { 518 if (XBIOS_screensmem[1]==NULL) {
517 XBIOS_FreeBuffers(this); 519 XBIOS_FreeBuffers(this);
518 SDL_SetError("XBIOS_SetVideoMode: Not enough memory for double buffer"); 520 SDL_SetError("XBIOS_SetVideoMode: Not enough memory for double buffer");
519 return (NULL); 521 return (NULL);
520 } 522 }
523 memset(XBIOS_screensmem[1], 0, new_screen_size);
521 524
522 XBIOS_screens[1]=(void *) (( (long) XBIOS_screensmem[1]+256) & 0xFFFFFF00UL); 525 XBIOS_screens[1]=(void *) (( (long) XBIOS_screensmem[1]+256) & 0xFFFFFF00UL);
523 modeflags |= SDL_DOUBLEBUF; 526 modeflags |= SDL_DOUBLEBUF;
524 } 527 }
525 528