mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[vkgen] Name-shorten extension enum flag bits
The prefix was being stripped, but not the _BIT_EXT suffix. This makes extension flags a little easier to use.
This commit is contained in:
parent
1efeac6d60
commit
c9508f7261
1 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,8 @@ typedef enum VkBool32 {
|
|||
|
||||
if (str_mid([self name], -8) == "FlagBits") {
|
||||
end = "_FLAG_BITS_MAX_ENUM";
|
||||
} else if (str_mid([self name], -11) == "FlagBitsEXT") {
|
||||
end = "_FLAG_BITS_MAX_ENUM_EXT";
|
||||
}
|
||||
len = -strlen (end);
|
||||
for (int i = 0; i < type.strct.num_fields; i++) {
|
||||
|
@ -82,7 +84,8 @@ skip_value(string name)
|
|||
-(void) writeTable
|
||||
{
|
||||
int strip_bit = 0;
|
||||
if (str_mid([self name], -8) == "FlagBits") {
|
||||
if (str_mid([self name], -8) == "FlagBits"
|
||||
|| str_mid([self name], -11) == "FlagBitsEXT") {
|
||||
strip_bit = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue