-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate the class given in class if not explicitly given #792
Conversation
583ec69
to
a82ee8d
Compare
a82ee8d
to
a3c0b1e
Compare
This is still a part of the API, and thus have required even new .tablet files to fill this out even though it's superseded by IntegratedIn. So let's generate them programmatically. This turns devices that are IntegratedIn=Display to the Cintiq class, IntegratedIn=Display;System into the ISDV4 class, and everything else into the Bamboo class.
a3c0b1e
to
d308d65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor style nitpick but this LGTM.
For the test cases - remove it from the .tablet
files for the few other devices we hand-check in test-load
and I think we'll be good there?
if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY && | ||
device->integration_flags & WACOM_DEVICE_INTEGRATED_SYSTEM) { | ||
return WCLASS_ISDV4; | ||
} | ||
if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY) { | ||
return WCLASS_CINTIQ; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY && | |
device->integration_flags & WACOM_DEVICE_INTEGRATED_SYSTEM) { | |
return WCLASS_ISDV4; | |
} | |
if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY) { | |
return WCLASS_CINTIQ; | |
} | |
unsigned int flags = device->integration_flags & (WACOM_DEVICE_INTEGRATED_DISPLAY|WACOM_DEVICE_INTEGRATED_SYSTEM); | |
if (flags == (WACOM_DEVICE_INTEGRATED_DISPLAY|WACOM_DEVICE_INTEGRATED_SYSTEM)) { | |
return WCLASS_ISDV4; | |
} | |
if (flags == WACOM_DEVICE_INTEGRATED_DISPLAY) { | |
return WCLASS_CINTIQ; | |
} |
is i think a bit more readable.
(oh, and I always like to have ()
around any bitwise operations, it makes the code a bit more readable)
if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY) { | ||
return WCLASS_CINTIQ; | ||
} | ||
return WCLASS_BAMBOO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Remote
class is missing here, that will need handling, could go together with #779.
Then again there's so few of them that we can mark those in the .tablet
file...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, come to think of it: this is better as WCLASS_INTUOS5
- that's the most recent class and most devices are more like that than whatever the latest bamboo was like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the archives: WCLASS_BAMBOO
is better here because bamboos arent' expected to have stylus ids/serials.
@redstrate ok if I take this one and push it over the line? |
Yes go ahead, I don’t have access to a computer right now and would appreciate it :)On Oct 27, 2024, at 23:09, Peter Hutterer ***@***.***> wrote:
@redstrate ok if I take this one and push it over the line?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks, closing in favour of #814 now |
This is still a part of the API, and thus have required even new .tablet files to fill this out even though it's superseded by
IntegratedIn
. So let's generate them programmatically.This turns devices that are
IntegratedIn=Display
to theCintiq
class,IntegratedIn=Display;System
into theISDV4
class, and everything else into theBamboo
class.(This definitely needs more test cases)