mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 16:05:29 +00:00
* Structures/Type.cs: Try to translate GLenum even if category is
unknown.
This commit is contained in:
parent
35dc431d4d
commit
165287fdd2
|
@ -294,18 +294,26 @@ namespace Bind.Structures
|
|||
}
|
||||
else if (Bind.Structures.Type.GLTypes.TryGetValue(CurrentType, out s))
|
||||
{
|
||||
// Check if the parameter is a generic GLenum. If yes,
|
||||
// check if a better match exists:
|
||||
if (s.Contains("GLenum") && !String.IsNullOrEmpty(category))
|
||||
// Check if the parameter is a generic GLenum. If it is, search for a better match,
|
||||
// otherwise fallback to Settings.CompleteEnumName (named 'All' by default).
|
||||
if (s.Contains("GLenum") /*&& !String.IsNullOrEmpty(category)*/)
|
||||
{
|
||||
if ((Settings.Compatibility & Settings.Legacy.ConstIntEnums) != Settings.Legacy.None)
|
||||
{
|
||||
CurrentType = "int";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Better match: enum.Name == function.Category (e.g. GL_VERSION_1_1 etc)
|
||||
if (Enum.GLEnums.ContainsKey(category))
|
||||
{
|
||||
CurrentType = String.Format("{0}.{1}", Settings.EnumsOutput, Enum.TranslateName(category));
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentType = String.Format("{0}.{1}", Settings.EnumsOutput, Settings.CompleteEnumName);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue