- unsigned char *fb = framebuffer + (rect.x + screen_rect.width * rect.y) * 4;
- for(int i=0; i<rect.height; i++) {
- for(int j=0; j<rect.width; j++) {
+ unsigned char *fb = framebuffer + (drect.x + screen_rect.width * drect.y) * 4;
+ for(int i=0; i<drect.height; i++) {
+ for(int j=0; j<drect.width; j++) {