GZDoom appears to open on a non-existent monitor

Thu Jun 03, 2021 5:00 pm

Hi all. I wanted to report a weird bug. I'm running GZDoom on a Macbook Air on Mac OS X. Recently I played on a setup with a second monitor (you need a CRT to recapture that old 90s spirit). And it worked perfectly.

But today I tried to run GZDoom again without the external monitor attached and for some reason I'm no longer getting an image. The program opens, it initializes correctly, I hear the music and I can even control the menu, but I can't see anything. It's like the actual rendering is taking place on a secondary monitor, except of course there isn't one. As far as I can tell everything else just works except there's no image. It's not on another virtual desktop either, it's just nowhere.

I'm posting this in the OpenGL forum, but I'm thinking this is maybe a problem with whatever code interfaces with the Mac OS X system APIs. It's possible it saved the monitor number to render on somewhere and on startup it's not rechecking to make sure this monitor is still there.

Then again this is just my speculation, maybe something else entirely is going on. But this only started since I connected that external monitor that one time and I've changed nothing about my setup since then, so my guess is it's something to do with this.

Here's my gzdoom.ini: https://gist.github.com/msikma/890542ea ... f17a0fe788
The console window disappears a bit too quickly for me to copy everything, but here's a partial log: https://gist.github.com/msikma/e734b18a ... cf71e02828

Mac OS X 10.14.6
Macbook Air 11" Early 2015
2,2 GHz Intel Core i7
8 GB 1600 MHz DDR3
Intel HD Graphics 6000 1536 MB

Originally noticed this on 4.2.2, updated to 4.6.0 but it's still there. Thanks for any help. =:) Maybe there's a quick workaround, something in the ini I can change? I'm sure I can work around this by reconnecting the monitor later and fiddling with the settings, but it would be nice to have a check that fixes this automatically if it occurs.

Re: GZDoom appears to open on a non-existent monitor

Thu Jun 03, 2021 10:06 pm

There is no handling of multi-monitor setup in macOS version of GZDoom. It always uses the main display. I have no idea why disconnected monitor is treated as such. Maybe, it’s because of screen coordinate system origin. Anyway, reconfiguration of monitor setup is the way to go.

Re: GZDoom appears to open on a non-existent monitor

Fri Jun 04, 2021 7:36 am

That's strange. I definitely was able to get it working on either monitor. I'll try to test this again later. As I recall I was able to get it on the other monitor by dragging the startup window to that monitor before picking which game to run.

I did find a workaround, though. I actually managed to find a setting in the ini file that switches whether native fullscreen is used (for those not using the system, Mac OS X has two fullscreen types - one of which is "native" and integrates with the system's multiple desktop handling), "vid_nativefullscreen". By toggling that to "true" I was able to get the video to show up in its own separate virtual desktop. Setting it back to false caused it to back to normal on next boot even with non-native mode, too. I was originally running on 4.2.2 which did not have this setting, but 4.6.0 does, so in my original test with the external monitor I was not using native mode.

I actually think that having vid_nativefullscreen to "true" by default on new user ini files might be an idea? That way, even if you disconnect the monitor that GZDoom is running on, it will revert to being on its own separate virtual desktop.