CreateDisplay mode="moderequester" hardcoded height

Report any Hollywood bugs here
Post Reply
plouf
Posts: 584
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

CreateDisplay mode="moderequester" hardcoded height

Post by plouf »

following this thread -> https://forums.hollywood-mal.com/viewtopic.php?t=4077

during testing, myriad of ways . i think that height is hardcoded in Mode="moderequesteder" and mode="Ask" if user chooses to to select.

this MCVE shows that HEIGHT do not change neither to smaller, neither to higher HEIGHT, no matter what you choose, however WIDTH changes accordingly

Code: Select all

CreateDisplay(2, {width=800,height=600,Mode = "fullscreen", Active=True})
OpenDisplay(2)
  	
NPrint("Current"..GetAttribute(#DISPLAY, 2, #ATTRRAWWIDTH ).. " x " ..GetAttribute(#DISPLAY, 2, #ATTRRAWHEIGHT))
NPrint("MAX ..."..GetAttribute(#DISPLAY, 2,#ATTRMAXWIDTH ).. " x " ..GetAttribute(#DISPLAY, 2, #ATTRRAWHEIGHT))
WaitLeftMouse()
CloseDisplay(2)

CreateDisplay(3, {width=800,height=600,ScrWidth=#NATIVE, ScrHeight=#NATIVE,Mode = "ModeRequester", Active=True})
OpenDisplay(3)
  	
DebugPrint("Current"..GetAttribute(#DISPLAY, 3, #ATTRRAWWIDTH ).. " x " ..GetAttribute(#DISPLAY, 3, #ATTRRAWHEIGHT))
DebugPrint("MAX ..."..GetAttribute(#DISPLAY, 3,#ATTRMAXWIDTH ).. " x " ..GetAttribute(#DISPLAY, 3, #ATTRRAWHEIGHT))
WaitLeftMouse()
Christos
User avatar
airsoftsoftwair
Posts: 5626
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateDisplay mode="moderequester" hardcoded height

Post by airsoftsoftwair »

What if you remove the "ScrWidth" and "ScrHeight" tags? Doesn't make sense to me to use these together with "ModeRequester"...
plouf
Posts: 584
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: CreateDisplay mode="moderequester" hardcoded height

Post by plouf »

removing them creates a 640x480 screen in the center of screen, and "maxed" at 480...
can see it in debugprint

Code: Select all

CreateDisplay(2, {width=800,height=600,Mode = "fullscreen", Active=True})
OpenDisplay(2)
  	
NPrint("Current"..GetAttribute(#DISPLAY, 2, #ATTRRAWWIDTH ).. " x " ..GetAttribute(#DISPLAY, 2, #ATTRRAWHEIGHT))
NPrint("MAX ..."..GetAttribute(#DISPLAY, 2,#ATTRMAXWIDTH ).. " x " ..GetAttribute(#DISPLAY, 2, #ATTRRAWHEIGHT))
WaitLeftMouse()
CloseDisplay(2)

CreateDisplay(3, {Mode = "ModeRequester", Active=True})
OpenDisplay(3)
  	
DebugPrint("Current"..GetAttribute(#DISPLAY, 3, #ATTRRAWWIDTH ).. " x " ..GetAttribute(#DISPLAY, 3, #ATTRRAWHEIGHT))
DebugPrint("MAX ..."..GetAttribute(#DISPLAY, 3,#ATTRMAXWIDTH ).. " x " ..GetAttribute(#DISPLAY, 3, #ATTRRAWHEIGHT))
WaitLeftMouse()
Christos
User avatar
airsoftsoftwair
Posts: 5626
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateDisplay mode="moderequester" hardcoded height

Post by airsoftsoftwair »

plouf wrote: Sat Nov 23, 2024 8:37 am removing them creates a 640x480 screen in the center of screen, and "maxed" at 480...
Makes sense to me. Hollywood is probably switching the monitor's resolution to 640x480 and then of course #ATTRMAXWIDTH and #ATTRMAXHEIGHT need to return 640x480 as well because that's the monitor's current physical resolution now and thus the maximum display size.
plouf
Posts: 584
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: CreateDisplay mode="moderequester" hardcoded height

Post by plouf »

ok,

thats started out as "wanted to open screen without knowing what user will select, and want to draw full screen knowing its dimension"

can this achieved with mode="ask", or need specifically to ask user before opening screen , with a custom requester ?
Christos
User avatar
jPV
Posts: 675
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: CreateDisplay mode="moderequester" hardcoded height

Post by jPV »

Try this:

Code: Select all

CreateDisplay(3, {Mode = "ModeRequester", Active=True})
OpenDisplay(3)
ChangeDisplaySize(GetAttribute(#DISPLAY, 3, #ATTRHOSTWIDTH), GetAttribute(#DISPLAY, 3, #ATTRHOSTHEIGHT))
"ModeRequester" doesn't ask for a mode at the CreateDisplay() line, but only at OpenDisplay(), so you'll have to do ChangeDisplaySize() after OpenDisplay() and there will be some glitch seen when the resolution changes, but should work otherwise.
plouf
Posts: 584
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: CreateDisplay mode="moderequester" hardcoded height

Post by plouf »

its just seems that requester, chooses actual monitor display, and NOT hollywood "display"

hollywood display is hardcoded in width /height attributes, and you must use a custom requestor before opening screen
OR use ChangeDisplaySize() as suggested
Christos
User avatar
airsoftsoftwair
Posts: 5626
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateDisplay mode="moderequester" hardcoded height

Post by airsoftsoftwair »

plouf wrote: Mon Dec 02, 2024 6:38 pm its just seems that requester, chooses actual monitor display, and NOT hollywood "display"
What do you mean by that? Please explain ;)
plouf
Posts: 584
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: CreateDisplay mode="moderequester" hardcoded height

Post by plouf »

airsoftsoftwair wrote: Mon Dec 09, 2024 6:29 pm
plouf wrote: Mon Dec 02, 2024 6:38 pm its just seems that requester, chooses actual monitor display, and NOT hollywood "display"
What do you mean by that? Please explain ;)
Means that i have misunderstood the usage of "display"
Works ok

Btw original MCVE has a typo :-)
Christos
Post Reply