Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemvideo.c @ 918:17822f1f9674
Wrongly test if width multiple of 16
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Tue, 03 Aug 2004 08:50:52 +0000 |
parents | 24852aeb0657 |
children | bbefeed8134d |
comparison
equal
deleted
inserted
replaced
917:24852aeb0657 | 918:17822f1f9674 |
---|---|
561 maxwidth=GEM_desk_w; | 561 maxwidth=GEM_desk_w; |
562 maxheight=GEM_desk_h; | 562 maxheight=GEM_desk_h; |
563 } | 563 } |
564 | 564 |
565 /* width must be multiple of 16, for vro_cpyfm() and c2p_convert() */ | 565 /* width must be multiple of 16, for vro_cpyfm() and c2p_convert() */ |
566 if ((width & -16) != 0) { | 566 if ((width & 15) != 0) { |
567 width = (width | 15) +1; | 567 width = (width | 15) +1; |
568 } | 568 } |
569 | 569 |
570 if ((maxwidth < width) || (maxheight < height) || (VDI_bpp != bpp)) { | 570 if ((maxwidth < width) || (maxheight < height) || (VDI_bpp != bpp)) { |
571 SDL_SetError("Couldn't find requested mode in list"); | 571 SDL_SetError("Couldn't find requested mode in list"); |
747 int i, surf_width; | 747 int i, surf_width; |
748 | 748 |
749 surface = this->screen; | 749 surface = this->screen; |
750 /* Need to be a multiple of 16 pixels */ | 750 /* Need to be a multiple of 16 pixels */ |
751 surf_width=surface->w; | 751 surf_width=surface->w; |
752 if ((surf_width & -16) != 0) { | 752 if ((surf_width & 15) != 0) { |
753 surf_width = (surf_width | 15) + 1; | 753 surf_width = (surf_width | 15) + 1; |
754 } | 754 } |
755 | 755 |
756 if (GEM_bufops & (B2S_C2P_1TO2|B2S_C2P_1TOS)) { | 756 if (GEM_bufops & (B2S_C2P_1TO2|B2S_C2P_1TOS)) { |
757 void *destscr; | 757 void *destscr; |
867 { | 867 { |
868 int surf_width; | 868 int surf_width; |
869 | 869 |
870 /* Need to be a multiple of 16 pixels */ | 870 /* Need to be a multiple of 16 pixels */ |
871 surf_width=surface->w; | 871 surf_width=surface->w; |
872 if ((surf_width & -16) != 0) { | 872 if ((surf_width & 15) != 0) { |
873 surf_width = (surf_width | 15) + 1; | 873 surf_width = (surf_width | 15) + 1; |
874 } | 874 } |
875 | 875 |
876 if (GEM_bufops & (B2S_C2P_1TO2|B2S_C2P_1TOS)) { | 876 if (GEM_bufops & (B2S_C2P_1TO2|B2S_C2P_1TOS)) { |
877 void *destscr; | 877 void *destscr; |
1198 { | 1198 { |
1199 int width; | 1199 int width; |
1200 | 1200 |
1201 /* Need to be a multiple of 16 pixels */ | 1201 /* Need to be a multiple of 16 pixels */ |
1202 width=surface->w; | 1202 width=surface->w; |
1203 if ((width & -16) != 0) { | 1203 if ((width & 15) != 0) { |
1204 width = (width | 15) + 1; | 1204 width = (width | 15) + 1; |
1205 } | 1205 } |
1206 mfdb_src.fd_w=width; | 1206 mfdb_src.fd_w=width; |
1207 } | 1207 } |
1208 mfdb_src.fd_h=surface->h; | 1208 mfdb_src.fd_h=surface->h; |