make DesktopGL build work with "dotnet run"
This commit is contained in:
parent
d86793197e
commit
29463eb834
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
<PublishReadyToRun>false</PublishReadyToRun>
|
<PublishReadyToRun>false</PublishReadyToRun>
|
||||||
<TieredCompilation>false</TieredCompilation>
|
<TieredCompilation>false</TieredCompilation>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace SemiColinGames {
|
namespace SemiColinGames {
|
||||||
|
|
||||||
@ -38,6 +39,10 @@ namespace SemiColinGames {
|
|||||||
public static class DesktopGLProgram {
|
public static class DesktopGLProgram {
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main() {
|
static void Main() {
|
||||||
|
string path = System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||||
|
path = System.IO.Path.GetDirectoryName(path);
|
||||||
|
Directory.SetCurrentDirectory(path);
|
||||||
|
|
||||||
using (var game = new SneakGame()) {
|
using (var game = new SneakGame()) {
|
||||||
game.Services.AddService(typeof(IDisplay), new DesktopGLDisplay());
|
game.Services.AddService(typeof(IDisplay), new DesktopGLDisplay());
|
||||||
game.Run();
|
game.Run();
|
||||||
|
Loading…
Reference in New Issue
Block a user