project-navigation
Personal tools

Author Topic: Geoscape failure on mac: initialization? F8/F9 issue  (Read 5227 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Geoscape failure on mac: initialization? F8/F9 issue
« on: July 13, 2009, 02:31:57 am »
I've managed to track down the failure of the geoscape to display properly on the macintosh.

The symptoms: Graphically the geoscape is a mess. It happens with both 2d and 3d.

The NON-cause, or: How to display the geoscape properly:
1. Put the computer to sleep.
2. Wake the computer up.
3. Start Ufo.
4. Do not switch applications. Do not use F8 (spaces). Do not use F9 (expose).

Game runs just fine, and displays the geoscape just fine. Battle maps still do not display correctly.

Something about the F8/F9/Alt-tab app change causes the graphics to mess up. I have yet to determine exactly what does or does not cause it. In at least two test cases, control was returned to Ufo, and it seemed to continue to work, until the "Display nation boundaries" was turned on; then it broke, and stayed broke even when turned off.

Hardware: iBook G4, 14 inch.
Mobility Radeon 9550
Windowed mode (960 x 720)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #1 on: July 14, 2009, 07:49:03 pm »
Additional note: Revision 22268, the first version that compiles and supports running from the command line properly, does NOT suffer from this. The geoscape is correctly displayed no matter what I do.

This version also forces the color change constantly.

I want to test if this "force the color to be what we think, rather than what the user has told the system" is responsible for keeping the geoscape display correct. To test that, what I think I want is a way to toggle that color change forcing on/off.

Is there a better way to test this?
If not, can people who know what's going on with the graphics put that in?
(For that matter, where in the code is this color change code?)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #2 on: July 14, 2009, 09:00:23 pm »
color forcing? what the heck are you talking about? the nation border overlay is messed on the geoscape, did i got you right? and it can't be switched off after you switched it on the first time?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #3 on: July 15, 2009, 12:57:58 am »
Normally, macs have a very nice color calibration tool that corrects for color cast of the screen, gamma adjustments that are not constant at all brightnesses, etc. This gives a very good, color corrected screen. (It doesn't do a good job of white point correction, and it requires you to use a LAB-style control to adjust, making it hard to get R, G, and B all neutral at the same time).

When UfoAI starts up, it forces a pure single-gamma-only adjustment, and wipes that color correction out. This gives a strong color cast on my system because the monitor doesn't have accurate color reproduction. UfoAI forces a color correction of "Monitor neutral", with gamma (and in 2.3, lightness and contrast) as the only adjustments possible.

In the current (trunk) revision, this color forcing is only done once, at the start up of the game.
In revision 22268, this color forcing is done every time through the main loop of the game.

Now, I can turn the nation borders on or off, no problem.

===

The geoscape problem isn't directly caused by nation borders being on or off. If the setup is bad, then it's bad. In the trunk version, I can start loading Ufo, wait for the colors on my screen to change, start the system preferences -> monitor preferences, and get my corrected colors back, and wait. Eventually, Ufo starts, and things work fine.

However, if I use the F8/F9/Alt-tab controls after starting Ufo, then the geoscape will be messed up:
1: If not yet displayed, then when it is displayed.
2: If currently displayed, then when the nation borders toggle is changed
3: The results after a battle are not tested
4: I just realized that although going into base view, and then back to geoscape view does not fix it, I haven't tested if that causes the problem to display.

The problem basically looks like "Almost random" junk is used as the map picture...except that (1), it's oddly patterned (it looks more like some weird ascii-art dump, like when a printer that should be printing graphics goes into text mode somehow), and (2) the pattern changes slightly, and consistently, as you move closeup/far away on the globe.

I suspect that "spaces" (F8, the multiple desktop manager) is the cause, but haven't yet tested that specifically.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #4 on: July 15, 2009, 06:50:44 am »
please try to use latest trunk revision - i've introduced a cvar called vid_ignoregamma - set this to 1 and try again

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #5 on: July 18, 2009, 08:38:16 am »
Well, it does fix the graphics adjust.

It does nothing for the geoscape.

Offline poppadrake

  • Rookie
  • ***
  • Posts: 29
    • View Profile
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #6 on: January 26, 2010, 08:54:21 pm »
Looks like it is reproducing the sidebar in shifted form...getting graphics map from wrong source?

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Geoscape failure on mac: initialization? F8/F9 issue
« Reply #7 on: January 26, 2010, 11:21:00 pm »
Looks like it is reproducing the sidebar in shifted form...getting graphics map from wrong source?

Not to pick on you, but why are you commenting on something so old (from July of last year)?  Are you personally experiencing this bug recently, with a current build?