static void Main() { // enable debug mode so we can get some additional hotkeys, etc // (i.e. hold down ALT + Number) DebugFlags.EnableDebugKeys = true; // change the content directory to whatever custom content location we want string basePath = ConfigurationManager.AppSettings["ContentPath"]; // here is where we spin up a copy of the game to play //using (var game = new Game1Hook()) //{ // game.Content.RootDirectory = Path.Combine(basePath, "Content"); // // note that sometimes the game uses the working path to load things so we will set this just to be sure // Directory.SetCurrentDirectory(basePath); // // yet another content manager we found that might need overrides // Game1.SpriteManager.GeneralContent.RootDirectory = Path.Combine(basePath, "Content"); // game.Run(); //} try { //if (API.RestartAppIfNecessary(233700U)) // return; API.Initialize(); using (var game = new Game1Hook()) { game.Content.RootDirectory = Path.Combine(basePath, "Content"); // note that sometimes the game uses the working path to load things so we will set this just to be sure Directory.SetCurrentDirectory(basePath); // yet another content manager we found that might need overrides Game1.SpriteManager.GeneralContent.RootDirectory = Path.Combine(basePath, "Content"); game.Run(); } } finally { API.Shutdown(); } }
static void Main() { // enable debug mode so we can get some additional hotkeys, etc // (i.e. hold down ALT + Number) DebugFlags.EnableDebugKeys = true; // change the content directory to whatever custom content location we want string basePath = ConfigurationManager.AppSettings["ContentPath"]; // here is where we spin up a copy of the game to play using (var game = new Game1Hook()) { game.Content.RootDirectory = Path.Combine(basePath, "Content"); // note that sometimes the game uses the working path to load things so we will set this just to be sure Directory.SetCurrentDirectory(basePath); // yet another content manager we found that might need overrides Game1.SpriteManager.GeneralContent.RootDirectory = Path.Combine(basePath, "Content"); game.Run(); } }