mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 12:17:46 +08:00
Merge pull request #1966 from UselessToucan/MulticoreJit
Use Multicore JIT
This commit is contained in:
commit
1a85186b6f
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.IPC;
|
using osu.Game.IPC;
|
||||||
@ -15,6 +16,9 @@ namespace osu.Desktop
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
{
|
{
|
||||||
|
if (!RuntimeInfo.IsMono)
|
||||||
|
useMulticoreJit();
|
||||||
|
|
||||||
// Back up the cwd before DesktopGameHost changes it
|
// Back up the cwd before DesktopGameHost changes it
|
||||||
var cwd = Environment.CurrentDirectory;
|
var cwd = Environment.CurrentDirectory;
|
||||||
|
|
||||||
@ -44,8 +48,16 @@ namespace osu.Desktop
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void useMulticoreJit()
|
||||||
|
{
|
||||||
|
var directory = Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Profiles"));
|
||||||
|
ProfileOptimization.SetProfileRoot(directory.FullName);
|
||||||
|
ProfileOptimization.StartProfile("Startup.Profile");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user