log GPU info to simplify troubleshooting

This commit is contained in:
Jesse Plamondon-Willard 2020-07-25 15:50:36 -04:00
parent 6f9a1f1525
commit ee4c88f601
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 5 additions and 0 deletions

View File

@ -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.

View File

@ -197,8 +197,12 @@ namespace StardewModdingAPI.Framework
/// <summary>Load content when the game is launched.</summary>
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 ?? "<unknown>"}");
}
/// <summary>Initialize just before the game's first update tick.</summary>