Mercurial > sdl-ios-xcode
comparison src/video/dga/SDL_dgavideo.c @ 462:1be0cdaf8092
Fixed offset bug in hardware accelerated fills and blits
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 20 Aug 2002 16:58:49 +0000 |
parents | f6ffac90895c |
children | 4bcfb93e0dfe |
comparison
equal
deleted
inserted
replaced
461:1d36f593078a | 462:1be0cdaf8092 |
---|---|
791 | 791 |
792 static __inline__ void DGA_dst_to_xy(_THIS, SDL_Surface *dst, int *x, int *y) | 792 static __inline__ void DGA_dst_to_xy(_THIS, SDL_Surface *dst, int *x, int *y) |
793 { | 793 { |
794 *x = (long)((Uint8 *)dst->pixels - memory_base)%memory_pitch; | 794 *x = (long)((Uint8 *)dst->pixels - memory_base)%memory_pitch; |
795 *y = (long)((Uint8 *)dst->pixels - memory_base)/memory_pitch; | 795 *y = (long)((Uint8 *)dst->pixels - memory_base)/memory_pitch; |
796 if ( dst == this->screen ) { | |
797 *x += this->offset_x; | |
798 *y += this->offset_y; | |
799 } | |
800 } | 796 } |
801 | 797 |
802 static int DGA_FillHWRect(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color) | 798 static int DGA_FillHWRect(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color) |
803 { | 799 { |
804 int x, y; | 800 int x, y; |