Page 1 of 1

CreateDisplay mode="moderequester" hardcoded height

Posted: Mon Nov 18, 2024 7:02 pm
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()

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Sat Nov 23, 2024 12:25 am
by airsoftsoftwair
What if you remove the "ScrWidth" and "ScrHeight" tags? Doesn't make sense to me to use these together with "ModeRequester"...

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Sat Nov 23, 2024 8:37 am
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()

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Sat Nov 30, 2024 10:37 pm
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.

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Sun Dec 01, 2024 7:56 am
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 ?

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Mon Dec 02, 2024 1:24 pm
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.

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Mon Dec 02, 2024 6:38 pm
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

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Mon Dec 09, 2024 6:29 pm
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 ;)

Re: CreateDisplay mode="moderequester" hardcoded height

Posted: Mon Dec 09, 2024 7:25 pm
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 :-)