Git Product home page Git Product logo

Comments (14)

 avatar commented on August 10, 2024

Resizing/forcing full screen/letting the game set full screen/any other abuse of the windows all works without trouble on 64-bit Linux.

On Jan 16, 2016, at 15:01, Andrew Weber [email protected] wrote:

Confirmed on 64-bit Windows 8 and 10
Not sure about OSX / Linux

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

from ivan.

emlai avatar emlai commented on August 10, 2024

On OS X, entering fullscreen works as expected, but exiting fullscreen doesn't. When the game is launched in fullscreen mode, and then reverted to windowed mode, one of these two things happens (apparently randomly):

  • either the window becomes invisible, with no way to show it again without quitting and relaunching,

  • or the graphics start looking weird, like this:

    screen shot 2016-01-17 at 03 52 24

    The graphics are rendered slightly smaller than usual. Notice especially the width of the settings panel compared to the screenshot below. This shouldn't happen. Also the window title is missing. Normally it would look like this:

    screen shot 2016-01-17 at 03 52 38

I will try to fix these so we can see whether it fixes the Windows problem as well.

from ivan.

emlai avatar emlai commented on August 10, 2024

This might be a bug in SDL2 because I tested this with SDL 2.0.3 (instead of 2.0.4) and the behavior was different (but still wrong).

from ivan.

ryfactor avatar ryfactor commented on August 10, 2024

It crashes on Windows 7 as well.
I think the error happens once you get to this line: https://github.com/Attnam/ivan/blob/master/FeLib/Source/graphics.cpp#L307

from ivan.

emlai avatar emlai commented on August 10, 2024

For some reason, the OS X problem goes away after adding SDL_SetWindowSize(Window, Res.X, Res.Y); just before graphics.cpp#L307. Does this fix the Windows problem too?

If not, can you check what the return value of SDL_SetWindowFullscreen is? It should return 0 on success.

from ivan.

ryfactor avatar ryfactor commented on August 10, 2024

So I added SDL_SetWindowSize(Window, Res.X, Res.Y); just before graphics.cpp#L307 and it didn't fix the problem.
The return value of SDL_SetWindowFullscreen is 0 when I outputted it using ABORT()

Any other ideas?

from ivan.

ryfactor avatar ryfactor commented on August 10, 2024

If you open the ivan.cgf file you can change the fullscreen configuration no problem. It crashes only when you try to change the config in-game.
I've isolated the problem to the SDL_RenderClear function so far, though I don't yet know why the crash happens at this point.

from ivan.

ryfactor avatar ryfactor commented on August 10, 2024

Does this line ever execute under Linux or Mac?

from ivan.

emlai avatar emlai commented on August 10, 2024

It does on big-endian systems, and then it's a compilation error.

An #error "Big-endian support not implemented in SDL2 mode." would probably be more helpful… πŸ˜„

from ivan.

ryfactor avatar ryfactor commented on August 10, 2024

I wondered whether that was the case. I was just curious. All the same, it's not relevant to the bug at hand.

So basically all the three major platforms use the same code in BlitDBToScreen, and the results are wildly different between Linux (stable) and Windows (crash).
I'm going to try talk to the guys over at the SDL forums, because this bug is looking increasingly opaque.

from ivan.

andrewtweber avatar andrewtweber commented on August 10, 2024

#133 reports that this was working in 504 but broke as of 505. Not sure if that was new information or not.

from ivan.

ryfactor avatar ryfactor commented on August 10, 2024

I just checked and v0504 has the full screen bug too :(

from ivan.

emlai avatar emlai commented on August 10, 2024

There are occasional problems in switching to/from fullscreen on Mac and Linux too, so I'll edit the title to reflect that.

from ivan.

emlai avatar emlai commented on August 10, 2024

The fullscreen toggle bug on Mac is an SDL bug: https://bugzilla.libsdl.org/show_bug.cgi?id=3501

from ivan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.