Files
sbox-public/engine/Launcher/SboxBench/BenchmarkLauncher.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

41 lines
659 B
C#

using System;
using System.Threading.Tasks;
namespace Sandbox;
public static class Launcher
{
public static int Main()
{
var appSystem = new GameAppSystem();
appSystem.Run();
return 0;
}
}
public class GameAppSystem : AppSystem
{
public override void Init()
{
LoadSteamDll();
base.Init();
Environment.SetEnvironmentVariable( "SBOX_MODE", "BENCHMARK" );
CreateGame();
CreateMenu();
// Disable asserts for all benchmarks
NativeEngine.EngineGlobal.Plat_SetNoAssert();
var createInfo = new AppSystemCreateInfo()
{
WindowTitle = "s&box benchmark",
Flags = AppSystemFlags.IsGameApp
};
InitGame( createInfo );
}
}