Alt + Enter crashes on dual monitor setup

Find quick help here to get you started with Hollywood
Post Reply
amyren
Posts: 122
Joined: Thu May 02, 2019 11:53 am

Alt + Enter crashes on dual monitor setup

Post by amyren »

I tried my app on a windows laptop with an external sceen attached, set to extended desktop.
The idea was to use a big screen tv as a second monitor to display the app.

The app will alwas open on the laptop screen, and then I drag it to the extended screen. Then I can use alt + enter to get it fullscreen, but it will get black borders all around. (This might be because this monitor have slightly higher resolution than my laptop, even if I did set them both to 1920x1080) If I instead maximize the window first, it will fill the screen. But then, if I press Alt+Enter, the app will crash.
The error message is "errror opening screen", and it points to function waitevent.

Code: Select all

@DISPLAY {Title = "Bingo", ScaleMode = #SCALEMODE_AUTO, Orientation = #ORIENTATION_LANDSCAPE, HideTitleBar = True, Sizeable = True}
If I dont use "sizable = true", I will avoid the crash. But then I must live with those black borders.

First,I wonder if this could be a bug?

Next, I like to know if there is a way to disable the Alt+Enter function for my app, just to avoid accidental crashes?

Edit: forgot to mention this is on a win10/x64 system.

User avatar
airsoftsoftwair
Posts: 4392
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alt + Enter crashes on dual monitor setup

Post by airsoftsoftwair »

Sounds like a bug. But you can easily disable the Alt+Enter hotkey by setting the "NoModeSwitch" tag to TRUE in @DISPLAY or CreateDisplay().

amyren
Posts: 122
Joined: Thu May 02, 2019 11:53 am

Re: Alt + Enter crashes on dual monitor setup

Post by amyren »

Thanks, I will try setting nomodeswitch.

Bugala
Posts: 936
Joined: Sun Feb 14, 2010 7:11 pm

Re: Alt + Enter crashes on dual monitor setup

Post by Bugala »

I am adding to this that there surely is some problem with dual monitor set ups, one who was testing my game had very similar sounding problem.

He however said that pushing "alt" + "enter" helped.

I might send you a link to a video about this through a private message. Just waiting for that guy to give me permission to show that video.

User avatar
airsoftsoftwair
Posts: 4392
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alt + Enter crashes on dual monitor setup

Post by airsoftsoftwair »

I've tested this now and I think the black borders come from your second monitor. The problem is that Hollywood will switch the monitor's resolution when pressing ALT+ENTER but not all monitors support this because it's basically a thing of the past and shouldn't be done any more on modern systems in 2020. That's why I have changed this now to switch between scaled fullscreen mode and windowed mode when pressing ALT+ENTER (but only on systems where GPU-accelerated scaling is available, otherwise it's too slow).

As a workaround, you could simply put the display manually in scaled fullscreen mode by doing something like this:

Code: Select all

@DISPLAY {Monitor = 2, Mode = "FullScreenScale"}
Then the black borders should be gone.

Code: Select all

- Change [Windows/macOS]: On Windows and macOS (Cocoa) pressing the ALT+RETURN hotkey will now switch to
  scaled fullscreen mode instead of changing the monitor's resolution; changing the monitor's resolution
  doesn't make too much sense on modern hardware any more as it leads to a noticable glitch, takes 
  considerable time and not all monitors support it any more (especially laptops often don't support it
  at all); so simply using fullscreen scaling instead solves all those problems but Hollywood only uses
  it by default on systems that support GPU-accelerated scaling because otherwise it's too slow; if you
  want the old behaviour back, you can set the new "ScaleSwitch" tag to FALSE; you can also use this tag
  to enable the new behaviour on systems that don't use it by default (e.g. Amiga); by default, Hollywood
  will use proportional scaling with anti-aliased interpolation; this can be turned off by setting the
  "KeepProportions" and "SmoothScale" tags to FALSE; there are also some new command line arguments that
  allow you to fine-tune the behaviour: SCALESWITCH, NOSCALESWITCH, NOKEEPPROPORTIONS, NOSMOOTHSCALE

Post Reply