Fix touch force for Apple Pencil
This commit is contained in:
parent
dc973883c9
commit
778d70c001
2 changed files with 4 additions and 1 deletions
|
|
@ -201,7 +201,9 @@ impl WinitView {
|
|||
let trait_collection = unsafe { self.traitCollection() };
|
||||
let touch_capability = trait_collection.forceTouchCapability();
|
||||
// Both the OS _and_ the device need to be checked for force touch support.
|
||||
if touch_capability == UIForceTouchCapability::Available {
|
||||
if touch_capability == UIForceTouchCapability::Available
|
||||
|| touch_type == UITouchType::Pencil
|
||||
{
|
||||
let force = touch.force();
|
||||
let max_possible_force = touch.maximumPossibleForce();
|
||||
let altitude_angle: Option<f64> = if touch_type == UITouchType::Pencil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue