opendisplay and 68k

Find quick help here to get you started with Hollywood
Post Reply
zylesea
Posts: 227
Joined: Tue Feb 16, 2010 12:50 am
Location: Westfalen/Germany
Contact:

opendisplay and 68k

Post by zylesea »

Hi, I wonder what a 68k binary does different with opendisplay() than MorphOS or Windows.

Code: Select all

@DISPLAY 1, { X=#CENTER, Y=#CENTER, borderless=True, width=800, height=300, noclose=True, Color = #WHITE }
@DISPLAY 2, { Title = "Window 2", X=10, Y=10, width=560, height=540, hidden=True, Color= #WHITE }
@DISPLAY 3, { Title = "Window 3",X=600, Y=200,width=1000, height=400,noclose=True, hidden=True, Color= #WHITE }
@DISPLAY 4, { Title = "Window 4",X=400, Y=1,width=1024, height=580, noclose=True,hidden=True, Color= #WHITE }

 ///snip --  doing something on Display 1          

OpenDisplay (4)
OpenDisplay (3)
OpenDisplay (2) 
This code runs nicely on MorphOS (native) and Windows, but if I run that as 68k binary it fails. The System complains it would fail to change display size to 1024x580 (or whatever display I want to open).
IMHO interestingly not only on an all 68k system (WinUAE), but also when run by trance under MorphOS. Hence it seems to me the issue is not caused by the host OS itself but within the 68k binary. What to do to make it run? i played a bit with the opendisplay options, but no luck yet.
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: opendisplay and 68k

Post by airsoftsoftwair »

Is the screen large enough to accommodate the display? Remember that on OS3 windows cannot be moved outside of the screen's boundaries. MorphOS and OS4 support this feature, but on OS3 it's not possible. So on OS3 your screen needs to be at least 1424x581 pixels in order to accommodate such a window:

Code: Select all

@DISPLAY 4, { Title = "Window 4",X=400, Y=1,width=1024, height=580, noclose=True,hidden=True, Color= #WHITE }
zylesea
Posts: 227
Joined: Tue Feb 16, 2010 12:50 am
Location: Westfalen/Germany
Contact:

Re: opendisplay and 68k

Post by zylesea »

airsoftsoftwair wrote:Is the screen large enough to accommodate the display? Remember that on OS3 windows cannot be moved outside of the screen's boundaries. MorphOS and OS4 support this feature, but on OS3 it's not possible. So on OS3 your screen needs to be at least 1424x581 pixels in order to accommodate such a window:

Code: Select all

@DISPLAY 4, { Title = "Window 4",X=400, Y=1,width=1024, height=580, noclose=True,hidden=True, Color= #WHITE }
Thanks Andreas. Had totally forgotten that screen borders are a limitation on "non hacked" OS3 and was just looking to the size of the window, but not the position. Am adjusting the position offsets now dynamically according to the actual screen resolution with GetAttribute() and SetDisplayAttributes(). Works nicely now.
Post Reply