You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Merge pull request #105799 from Repiteo/scons/enum-conversion-warnings
SCons: Add enum conversion warning
This commit is contained in:
@@ -1829,7 +1829,7 @@ Color DisplayServerMacOS::screen_get_pixel(const Point2i &p_position) const {
|
||||
CGColorSpaceRef color_space = CGColorSpaceCreateDeviceRGB();
|
||||
if (color_space) {
|
||||
uint8_t img_data[4];
|
||||
CGContextRef context = CGBitmapContextCreate(img_data, 1, 1, 8, 4, color_space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
CGContextRef context = CGBitmapContextCreate(img_data, 1, 1, 8, 4, color_space, (uint32_t)kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
if (context) {
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, 1, 1), image);
|
||||
color = Color(img_data[0] / 255.0f, img_data[1] / 255.0f, img_data[2] / 255.0f, img_data[3] / 255.0f);
|
||||
@@ -1878,7 +1878,7 @@ Ref<Image> DisplayServerMacOS::screen_get_image(int p_screen) const {
|
||||
|
||||
Vector<uint8_t> img_data;
|
||||
img_data.resize(height * width * 4);
|
||||
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, (uint32_t)kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
if (context) {
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, width, height), image);
|
||||
img = Image::create_from_data(width, height, false, Image::FORMAT_RGBA8, img_data);
|
||||
@@ -1926,7 +1926,7 @@ Ref<Image> DisplayServerMacOS::screen_get_image_rect(const Rect2i &p_rect) const
|
||||
|
||||
Vector<uint8_t> img_data;
|
||||
img_data.resize_zeroed(height * width * 4);
|
||||
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, (uint32_t)kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
if (context) {
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, width, height), image);
|
||||
img = Image::create_from_data(width, height, false, Image::FORMAT_RGBA8, img_data);
|
||||
|
||||
Reference in New Issue
Block a user