mirror of
https://github.com/zhigang1992/redpotion.git
synced 2026-04-30 05:15:38 +08:00
Implements fix for pointers on 32 bit devices
* mirrors: https://github.com/infinitered/rmq/pull/209
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
class UIColor
|
||||
def with(options)
|
||||
r, g, b, a = Pointer.new('d'), Pointer.new('d'), Pointer.new('d'), Pointer.new('d')
|
||||
self.getRed(r, green: g, blue: b, alpha: a)
|
||||
begin
|
||||
r, g, b, a = Pointer.new('d'), Pointer.new('d'), Pointer.new('d'), Pointer.new('d')
|
||||
self.getRed(r, green: g, blue: b, alpha: a)
|
||||
rescue
|
||||
r, g, b, a = Pointer.new('f'), Pointer.new('f'), Pointer.new('f'), Pointer.new('f')
|
||||
self.getRed(r, green: g, blue: b, alpha: a)
|
||||
end
|
||||
|
||||
r = options[:r] || options[:red] || r.value
|
||||
g = options[:g] || options[:green] || g.value
|
||||
|
||||
Reference in New Issue
Block a user