Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.71k stars 258 forks source link

SMAPI raises graphics events after sprite batch's render target has been removed (for some users) #151

Closed Pathoschild closed 7 years ago

Pathoschild commented 7 years ago

For a subset of users, SMAPI raises graphics events after drawing to the game's sprite batch will no longer have any effect.

Background

SMAPI draws to the screen in one of two ways:

Importantly, it raises OnPostRenderGuiEvent (e.g. line 1307) and OnPostRenderEvent (e.g. line 1315) before ending the sprite batch and discarding the temporary render target.

The issue

For a subset of users:

Notes based on testing:

I haven't found any way of deliberately causing the issue — it consistently works for some users, consistently breaks for others. However, it's possible to test it.

  1. Install the latest version of SMAPI.
  2. Install this custom mod created specifically to test this issue (see source code).
  3. Load a game with zoom level=100%.
  4. You should see a red overlay with crosshairs:
    overlay
  5. Zoom out.
    • If you're unaffected, you should still see the overlay.
    • If you're affected, the overlay will disappear.

The mod will log relevant metadata to the console.

(Thanks coffeefox for letting me use you as a guinea pig, since I'm not affected. 😄)

Pathoschild commented 7 years ago

None of the SMAPI developers can reproduce this, so we need volunteers affected by this issue. Moving this into the backlog until we can find an affected user.

Pathoschild commented 7 years ago

Tested with an affected user; this seems to be fixed in 1.0. 🎊