Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Removed graphics device reset when display event enum is not orientation. #501

Conversation

DoubleBullet
Copy link

@DoubleBullet DoubleBullet commented Nov 18, 2024

  • SDL2_FNAPlatform.cs: Removed graphics device reset when display event enum is not orientation.

This change no longer resets the viewport to 8x8 when the display is connected or disconnected for a full screen window.

The reason why the viewport is specifically reset to 8x8 is because the FNA3D.FNA3D_GetMaxMultiSampleCount returns 8.

Resetting might make sense if the monitor was swapped entirely with another one. I'm not sure how I can track for when that happens.

This has been tested on Windows, but not linux and mac.

Fixes #500

… enum is not orientation.

SDL2_FNAPlatform.cs: Removed graphics device reset when display event enum is not orientation.

This change no longer resets the viewport to 8x8 when the display is connected or disconnected.

The reason why the viewport is specifically reset to 8x8 is because the FNA3D.FNA3D_GetMaxMultiSampleCount returns 8.

Resetting might make sense if the monitor was swapped entirely with another one.
I'm not sure how I can track for when that happens.

This has been tested on Windows, but not linux and mac.
@flibitijibibo
Copy link
Member

Looking at the git history this was added because the GraphicsDevice.Adapter property becomes out-of-date when this happens. After this event happens, are you able to find the GraphicsDevice.Adapter instance in GraphicsAdapter.Adapters?

Either way we could probably just manually reassign the adapter without doing a whole reset... and for all I know the instance is outdated on XNA too, I'd have to add a second monitor to my VM somehow.

@flibitijibibo
Copy link
Member

Dug around a bit and I think this was for Axiom Verge 1/2 and it might have been for something unrelated, so yeah let's just update the Adapter manually - if doing that still fixes the issue we can get this in!

@DoubleBullet DoubleBullet deleted the DoubleBullet-viewport-blur-graphicsdevice-reset-fix branch November 18, 2024 17:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Game Window blurs completely when monitor is disconnected.
2 participants