Skip to content

WinApi/src/Sandbox/DisplayApi/DisplayApi.cs - incorrect [Flags] attribute #4

@mr-intj

Description

@mr-intj

WinApi/src/Sandbox/DisplayApi/DisplayApi.cs:

[Flags]
public enum D3DmdtVideoSignalStandard : uint
{
    Uninitialized = 0,
    VesaDmt = 1,
    VesaGtf = 2,
    VesaCvt = 3,
    Ibm = 4,

The [Flags] attribute says that these enumerands may be OR'd together like bitflags, which is not the case here. The [Flags]
attribute should be removed.

There are several cases of this in the enum types defined in this file. Only some of them are bitflags.

Also, you don't need to include the ForceUint32 = 0xFFFFFFFF enumerands in many of these types. This is something that exists in the C/C++ header file to force the type to compile to a 32-bit unsigned int. The ForceUint32 value should never be referenced in any code, and can be excluded in C#.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions