From ee4c88f6016b6bc0d72e0d459f6b918bdd7728f3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 25 Jul 2020 15:50:36 -0400 Subject: [PATCH] log GPU info to simplify troubleshooting --- docs/release-notes.md | 1 + src/SMAPI/Framework/SGame.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index ed496848..9c92591e 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -10,6 +10,7 @@ ## Upcoming release * For players: * SMAPI now ignores more content file types when detecting mods (`.doc`, `.docx`, `.rar`, and `.zip`). + * Added trace log for GPU running the game to simplify troubleshooting some issues. * Fixed launcher's fallback logic on Linux when no compatible terminal was found (thanks to jlaw!). * Fixed rare crash when a mod adds/removes an event handler from an event handler. diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 4d310185..4dd73485 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -197,8 +197,12 @@ namespace StardewModdingAPI.Framework /// Load content when the game is launched. protected override void LoadContent() { + // load content base.LoadContent(); Game1.mapDisplayDevice = new SDisplayDevice(Game1.content, this.GraphicsDevice); + + // log GPU info + this.Monitor.Log($"Running on GPU: {this.GraphicsDevice?.Adapter?.Description ?? ""}"); } /// Initialize just before the game's first update tick.