private static bool GetCap(Caps cap) { if (version >= OVRP_0_1_3.version) { return(OVRP_0_1_3.ovrp_GetCaps2((uint)(1 << (int)cap)) != 0); } else { return(((int)OVRP_0_1_0.ovrp_GetCaps() & (1 << (int)cap)) != 0); } }
private static void SetCap(Caps cap, bool value) { if (GetCap(cap) == value) { return; } int caps = (int)OVRP_0_1_0.ovrp_GetCaps(); if (value) { caps |= (1 << (int)cap); } else { caps &= ~(1 << (int)cap); } OVRP_0_1_0.ovrp_SetCaps((Caps)caps); }