INNER CODE UNIT · C#

DeProfiler

Blecki/dwarfcorp · DwarfCorp/DeProfiler.cs:35

    public class DeProfiler
    {
        public static void Run()
        {
            // I think at a lower level this call uses the one below so may not be necessary
            MethodBase checkMethod = typeof(GraphicsAdapter).GetMethod("IsProfileSupported", BindingFlags.Instance | BindingFlags.Public);
            MethodBase replaceCheckMethod = typeof(GraphicsAdapterReplacement).GetMethod("IsProfileSupported", BindingFlags.Instance | BindingFlags.Public);
            MethodUtil.ReplaceMethod(replaceCheckMethod, checkMethod);

            // Disable the profile capabilities check
            MethodBase profileMethod = typeof(GraphicsAdapter).GetMethod("IsProfileSupported", BindingFlags.Instance | BindingFlags.NonPublic);
            MethodBase replaceProfileMethod = typeof(GraphicsAdapterReplacement).GetMethod("IsProfileSupported", BindingFlags.Instance | BindingFlags.NonPublic);
            MethodUtil.ReplaceMethod(replaceProfileMethod, profileMethod);
        }

        public static void Load()
        {
            //StorageDevice device = StorageDevice.EndShowSelector(StorageDevice.BeginShowSelector(PlayerIndex.One, null, null));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…