You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-25 15:37:42 +00:00
Fix byte to float color conversion in DisplayServerWindows::screen_get_pixel
(cherry picked from commit 9d45dd812f)
This commit is contained in:
@@ -618,7 +618,7 @@ Color DisplayServerWindows::screen_get_pixel(const Point2i &p_position) const {
|
||||
COLORREF col = GetPixel(dc, p.x, p.y);
|
||||
if (col != CLR_INVALID) {
|
||||
ReleaseDC(NULL, dc);
|
||||
return Color(float(col & 0x000000FF) / 256.0, float((col & 0x0000FF00) >> 8) / 256.0, float((col & 0x00FF0000) >> 16) / 256.0, 1.0);
|
||||
return Color(float(col & 0x000000FF) / 255.0f, float((col & 0x0000FF00) >> 8) / 255.0f, float((col & 0x00FF0000) >> 16) / 255.0f, 1.0f);
|
||||
}
|
||||
ReleaseDC(NULL, dc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user