mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 10:57:58 +08:00
Fix for STR#3308 - MacOS X-specific part.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12009 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+2
-1
@@ -3606,6 +3606,7 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
|
|||||||
// Alpha needs to be premultiplied for this format
|
// Alpha needs to be premultiplied for this format
|
||||||
|
|
||||||
const uchar *i = (const uchar*)*image->data();
|
const uchar *i = (const uchar*)*image->data();
|
||||||
|
const int extra_data = image->ld() ? (image->ld() - image->w() * image->d()) : 0;
|
||||||
unsigned char *o = [bitmap bitmapData];
|
unsigned char *o = [bitmap bitmapData];
|
||||||
for (int y = 0;y < image->h();y++) {
|
for (int y = 0;y < image->h();y++) {
|
||||||
if (!(image->d() & 1)) {
|
if (!(image->d() & 1)) {
|
||||||
@@ -3629,7 +3630,7 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
|
|||||||
o += len;
|
o += len;
|
||||||
i += len;
|
i += len;
|
||||||
}
|
}
|
||||||
i += image->ld();
|
i += extra_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSImage *nsimage = [[NSImage alloc]
|
NSImage *nsimage = [[NSImage alloc]
|
||||||
|
|||||||
Reference in New Issue
Block a user