24.8 fixed to float64/double three ways

2023-01-17 Thread 程安絮
In main.go are three ways to convert 24.8 fixed value to float64/double type. The 3d one is my way which is not efficient but is useful to illustrate how to convert 24.8 fixed value to float64/double type.程安絮package main import ( . "fmt" "unsafe" ) func main()

Re: wl_fixed_to_double() function only correct when fixed value is greater than zero

2023-01-17 Thread Jasper St. Pierre
Hi, The trick is a variant of the well-known integer-to-float conversion trick you do if you don't have dedicated hardware for it [0]. 64-bit floats have a 52-bit significand and a floating exponent. Wayland's 24.8 fixed point format can be thought of as a 32-bit significand and a fixed exponent

Re: wl_fixed_to_double() function only correct when fixed value is greater than zero

2023-01-17 Thread Pekka Paalanen
On Mon, 16 Jan 2023 14:43:43 +0800 "程安絮" wrote: > In file main.go is my implementation of FixedToFloat64 vs > wl_fixed_to_double, the comments can help you to understand my codes. > Since event wl_touch::orientation's orientation arg is fixed value > and can be negative, I think this bug is not

Re: Wayland/weston, Qt and RDP connection...

2023-01-17 Thread Pekka Paalanen
On Mon, 16 Jan 2023 14:25:25 + Matti Ristimäki wrote: > Hi, > > > > Ok, this might be the reason… > > Your Qt app segfaults in the stand-alone RDP Weston instance case. We > have no idea why that would be, when weston-smoke works. If it is > because the app requires hardware accelerated

Re: Wayland/weston, Qt and RDP connection...

2023-01-17 Thread Marius Vlad
On Mon, Jan 16, 2023 at 02:25:25PM +, Matti Ristimäki wrote: > Hi, Hi, > > > > Ok, this might be the reason… > > Your Qt app segfaults in the stand-alone RDP Weston instance case. We > have no idea why that would be, when weston-smoke works. If it is > because the app requires hardware