Author Topic: Macos - Shrunken display, maybe due to Retina  (Read 1566 times)

Offline ReddyKilowattz

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Macos - Shrunken display, maybe due to Retina
« on: July 14, 2022, 11:05:06 pm »
I'm running MacOS Monterey on an iMac with a 21.5" retina display. It has a second display which is a typical 1980x1080 PC monitor. I'm running a copy of OpenXcom that I compiled myself from the current master branch.

When I launch OpenXcom, the game opens a window the expected size, but sometimes the graphics are squashed into the bottom left corner of the window. It seems to happen when the game window opens on the retina display rather than the external display, but it's not 100% - sometimes the graphics are correctly sized when opening on the retina display. If I go into the video options and change settings, sometimes the problem corrects itself, but I haven't found a specific change that reliably does that.

I set "useOpenGL" to "true" in options.cfg to work around an issue where SDL 1.2 doesn't work quite right on MacOS (see https://openxcom.org/forum/index.php/topic,7972.0.html).

Any idea where I'd start start troubleshooting this? I'm a software developer by trade, but I don't normally do native development on MacOS.

Offline ReddyKilowattz

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Re: Macos - Shrunken display, maybe due to Retina
« Reply #1 on: July 15, 2022, 12:29:23 am »
Oops, I see this is already reported as https://github.com/OpenXcom/OpenXcom/issues/1320.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8626
    • View Profile
Re: Macos - Shrunken display, maybe due to Retina
« Reply #2 on: July 15, 2022, 11:42:24 am »

Offline ReddyKilowattz

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Re: Macos - Shrunken display, maybe due to Retina
« Reply #3 on: July 15, 2022, 11:47:56 pm »
I tried that build once before. I downloaded it and tried it again.

Launching it on the retina display with "useOpenGL" set to "true" had the same problem--the game window opened at the expected size, but the game graphics only take upthe lower left part of the window. If I set opengl to false, or launch the game on the non-retina display, the game graphics fill the window as expected. This is less than ideal because the game runs quicker when opengl is set to true--specifically, battlescape animations like walking characters runs faster.

I also noted that in the battlescape, when an xcom agent can see an alien, the little number button is a different color. I'm used to the number button having a red background, but it's green. That may be a deliberate change.

Offline ReddyKilowattz

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Re: Macos - Shrunken display, maybe due to Retina
« Reply #4 on: July 16, 2022, 12:12:16 am »
I'm having trouble deciding how to proceed here.

  • The game runs faster using OpenGL than without. I played through a whole campaign with "useOpenGL" set to false, and the battlescape sort of crawls at times.
  • The SDL 1.2 codebase contains a change which supposedly fixes the problem of the graphics not taking up the whole window. But they haven't done a new version release since 2012, and neither homebrew nor macports distributes a version of libSDL containing the fix.
  • I did a brief test of running the game using libSDL-compat and it had the same graphics issue. I might try this again.
  • I found a port of the game to SDL2 (https://github.com/sfalexrog/OpenXcom) but I couldn't get it to build using a current copy of xcode.
  • I'm a software developer, so I could imagine tackling one of these issues on my own. But I don't normally do native development on MacOS, so it's a bit of climb.