Skip to content

Commit

Permalink
core: fixup client pointer types
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Sep 19, 2024
1 parent 9df6311 commit eebf1cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,18 @@ std::string WPTypeToCType(const SRequestArgument& arg, bool event /* events pass
return "uint32_t";

// enum
if (!arg.enumName.empty())
if (!arg.enumName.empty()) {
for (auto& e : XMLDATA.enums) {
if (e.nameOriginal == arg.enumName)
return e.name;
}
}

if (!event && clientCode)
return "wl_proxy*";

// iface
if (!arg.interface.empty() && (event || clientCode)) {
if (!arg.interface.empty() && event) {
for (auto& i : XMLDATA.ifaces) {
if (i.name == arg.interface)
return camelize((clientCode ? "CC_" : "C_") + arg.interface + "*");
Expand Down

0 comments on commit eebf1cb

Please sign in to comment.