Skip to content
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

Two fixes for debug-device #830

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions tools/debug-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,31 @@ handle_device(WacomDeviceDatabase *db, const char *path)
func(libwacom_get_bustype, "%s", busstr);
}

{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
WacomClass cls = libwacom_get_class(device);
#pragma GCC diagnostic pop
const char *str = NULL;

switch (cls) {
case WCLASS_UNKNOWN: str = "UNKNOWN"; break;
case WCLASS_INTUOS3: str = "INTUOS3"; break;
case WCLASS_INTUOS4: str = "INTUOS4"; break;
case WCLASS_INTUOS5: str = "INTUOS5"; break;
case WCLASS_CINTIQ: str = "CINTIQ"; break;
case WCLASS_BAMBOO: str = "BAMBOO"; break;
case WCLASS_GRAPHIRE: str = "GRAPHIRE"; break;
case WCLASS_ISDV4: str = "ISDV4"; break;
case WCLASS_INTUOS: str = "INTUOS"; break;
case WCLASS_INTUOS2: str = "INTUOS2"; break;
case WCLASS_PEN_DISPLAYS: str = "PEN_DISPLAYS"; break;
case WCLASS_REMOTE: str = "REMOTE"; break;
break;
}
func(libwacom_get_class, "%s", str);
}

intfunc(libwacom_get_width, device);
intfunc(libwacom_get_height, device);

Expand Down Expand Up @@ -168,10 +193,11 @@ handle_device(WacomDeviceDatabase *db, const char *path)

{
WacomIntegrationFlags flags = libwacom_get_integration_flags(device);
func(libwacom_get_integration_flags, "%s%s %s",
func(libwacom_get_integration_flags, "%s%s %s %s",
flags == WACOM_DEVICE_INTEGRATED_NONE ? "NONE" : "",
flags == WACOM_DEVICE_INTEGRATED_DISPLAY ? "DISPLAY" : "",
flags == WACOM_DEVICE_INTEGRATED_SYSTEM ? "SYSTEM" : ""
flags == WACOM_DEVICE_INTEGRATED_SYSTEM ? "SYSTEM" : "",
flags == WACOM_DEVICE_INTEGRATED_REMOTE ? "REMOTE" : ""
);
}

Expand Down
Loading