Skip to content

Commit

Permalink
Fix fl_draw_image sometimes crashes when window is scaled - cont'd (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
ManoloFLTK committed Nov 20, 2024
1 parent 1f05a0d commit 0952d59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
}

void Fl_Quartz_Graphics_Driver::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){
d &= ~FL_IMAGE_WITH_ALPHA;
innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0,gc_,this);
}
void Fl_Quartz_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data,
Expand Down
2 changes: 1 addition & 1 deletion src/fl_draw_pixmap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
} // for Y
}

fl_draw_image(buffer, x, y, w, h, 4);
fl_draw_image(buffer, x, y, w, h, 4 | FL_IMAGE_WITH_ALPHA);

delete[] buffer;
return 1;
Expand Down

0 comments on commit 0952d59

Please sign in to comment.