flibitijibibo / FNA-MGHistory

FNA - Accuracy-focused XNA4 reimplementation for open platforms
http://fna-xna.github.io/
246 stars 37 forks source link

Starting game in full screen bug #325

Closed CantStraferight closed 9 years ago

CantStraferight commented 9 years ago

The "Reset the backbuffer on fullscreen toggle" commit fixed the bug with if the game is changed to fullscreen while running, but the issue still remains if the game is launched in fullscreen mode and does not match the windows resolution.

Just as a reminder this issue is when the windows resolution does not match the windows resolution the game appears in the corner of the screen at it's own resolution.

thanks

flibitijibibo commented 9 years ago

We do a check when initializing the GLDevice, so it should be okay - I'll need a quick test case for this one.

On Sep 20, 2015, at 10:12, CantStraferight notifications@github.com wrote:

The "Reset the backbuffer on fullscreen toggle" commit fixed the bug with if the game is changed to fullscreen while running, but the issue still remains if the game is launched in fullscreen mode and does not match the windows resolution.

Just as a reminder this issue is when the windows resolution does not match the windows resolution the game appears in the corner of the screen at it's own resolution.

thanks

— Reply to this email directly or view it on GitHub.

CantStraferight commented 9 years ago

test case?

Do you want me me to throw together a quick program to show off this bug? Just checking what your needing.

flibitijibibo commented 9 years ago

Thinking about it, I do have a really small Program.cs as a part of this other thing I'm working on...

https://github.com/flibitijibibo/XNAFileDialog

So I really just need the part where you initialize with fullscreen, then I should be able to debug from there.

CantStraferight commented 9 years ago

I just made a quick program that uses the same code for setting the games resolution and going fullscreen and it doesn't have the issue.

My game must being doing some combination of things that is causing this.

I'm taking the game to an expo in a few days so I'm just going to roll back to an older version of FNA and I'll look into this when I get back a week from now.

Thanks

flibitijibibo commented 9 years ago

I would place breakpoints in these three spots:

https://github.com/flibitijibibo/FNA/blob/master/src/SDL2/SDL2_GameWindow.cs#L247 https://github.com/flibitijibibo/FNA/blob/master/src/Graphics/OpenGLDevice.cs#L640 https://github.com/flibitijibibo/FNA/blob/master/src/Graphics/OpenGLDevice.cs#L762

Basically what we're looking for is when the SDL window changes and when the device isn't getting reset. The expected issue is that you'll set the window to fullscreen, but for whatever reason the device will not get reset, so the backbuffer will not be reset accordingly. From there we'll be able to find out why it's getting skipped.

flibitijibibo commented 9 years ago

Maybe this will fix it? I ripped this off from our SDL2_GameWindow.ClientBounds:

https://github.com/flibitijibibo/FNA/commit/1cbe84ae121c54e0198027c5e94768ef0fa6f5d2

flibitijibibo commented 9 years ago

Just checking up on this since it's hit the 7-day mark.

CantStraferight commented 9 years ago

Hey.

Sorry as I said I've been showing the game at a 4 day expo and just got back today.

It seems like it has been fixed now. Thanks.

Every time someone asked what I used to make the game over the past 4 days, I've been singing the praises of FNA. Also I ran across a few issues that I'll post tomorrow, once I've had a chance to relax a little and confirm there is an issue.