Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[OS X] Toggling animation in the options menu while paused makes things go black #5889

Closed
DorpsGek opened this issue Jan 31, 2014 · 12 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Simons_Mith opened the ticket and wrote:

I was mucking about with visibility settings for town names, station names, animations and detail settings in the Options menu. (While paused) Toggling animation while paused seemed OK, but when I tried to put things back all the game windows and many game graphics just went black!

Not quite sure which order I turned things on and off in, but you're left clicking in the dark to restore normality.

Low priority, because who mucks about with those settings? And it seems there's an easy workaround - unpause.

However, /why are those settings even on the menu bar in the first place/? Shouldn't they have a control window like the transparency window? It's quite a big UI inconsistency to have these settings displayed and controlled from there; nothing remotely similar is done for any other game control!

Attachments

Reported version: 1.4.0-beta3
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/5889
@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2014

Rubidium wrote:

I can't reproduce this under Linux; it might be an OS X specific bug.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13042

@DorpsGek
Copy link
Member Author

fonsinchen wrote:

MJP writes in #5867 that adding a GfxInitPalettes to CheckBlitter fixes it:

And what about that?

void CheckBlitter()
{
if (!SwitchNewGRFBlitter()) return;
ClearFontCache();
GfxClearSpriteCache();
GfxInitPalettes(); // fix #5889
UpdateCursorSize(); // fix #5867
}


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13108

@DorpsGek
Copy link
Member Author

fonsinchen wrote:

I can reproduce part of this on Mac OS 10.4. There is an additional precondition: You must use zBase or possibly something else 32bit. And simply adding GfxInitPalettes() doesn't help.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13109

@DorpsGek
Copy link
Member Author

Simons_Mith wrote:

GfxInitPalettes() successfully fixes the problem I initially saw, but you're right about 32bit graphics. I see that problem even on build 26368, and what's more unpausing does NOT make it clear up. I'm on MacOS 10.5.8.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13110

@DorpsGek
Copy link
Member Author

fonsinchen wrote:

If I add that GfxInitPalettes() the effect actually changes in that the windows I click on become normal again. Without it they stay black. A MarkWholeScreenDirty() after the new GfxInitPalettes() does not help with that.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13111

@DorpsGek
Copy link
Member Author

fonsinchen wrote:

The fact that the Mac OS video driver doesn't do threaded drawing and skips QZ_CheckPaletteAnim when paused has nothing to do with it. Moving that code around to be also run when the game is paused, doesn't change anything.

The effect only occurs when switching full animation on, not when switching it off.

When the game is not paused, all windows go black, too, but they recover bit by bit, as they are triggered to be redrawn. Also, pausing the game recovers all windows at once, but starting a game that was paused when the blitter was switched, only starts the bit by bit recovery.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13112

@DorpsGek
Copy link
Member Author

Transportman wrote:

I can reproduce this with the latest nightly (r26585) on Windows 8.1 64 bits, with OpenGFX, NightGFX and zBase. It happens when turning full animation ON. I haven't set a specific blitter in my openttd.cfg-file, but when I set one, the black screen does not happen.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment13326

@DorpsGek
Copy link
Member Author

andythenorth wrote:

I can reproduce this in OS X 10.9 and 10.10 using 8 bit or 32 bit blitters.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment14061

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 8, 2017

JGR wrote:

The attached patch fixes this bug, which is caused by the animated blitter's palette not being initialised until the first call to PaletteAnimate, such that the first screen refresh is drawn with an uninitialised palette.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment14355

@DorpsGek
Copy link
Member Author

frosch wrote:

When checking which video drivers call PaletteAnimate:
sdl_v is the only one which calls PaletteAnimate in VideoDriver_SDL::CreateMainSurface. None of the other video backends have comparable code.

This code was added in r23978.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment14356

@DorpsGek
Copy link
Member Author

frosch wrote:

Reverting r23978 also makes this issue reproducible with SDL. JGR's fix then fixes it again,

So, I reverted r23978 and committed JGR's new fix, so that backends work the same now.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889#comment14357

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r27774. Thanks JGR


This comment was imported from FlySpray: https://bugs.openttd.org/task/5889

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant