[10 Jan 2010] RightAmiga+Return switch mode problem...

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

[10 Jan 2010] RightAmiga+Return switch mode problem...

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 10 Jan 2010 22:08:06 -0000

Hi ALL! I noticed that when I will switch from fullscreen(same size of wb) back to windowed mode using the hotkey: RightAmiga + Return it wasnt possible, I got the error:

Code: Select all

Cannot use this function while display is closed!
(............................................ - In function: WaitEvent)
I think becasue the fullscreen display cant be contained in the Wb screen since it have the windwo borders... Any idea? I tryed also to put borderless argument when got on FullScreen but don't work neither in this way...

Thanks!

Simone
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[11 Jan 2010] Re: RightAmiga+Return switch mode problem...

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 11 Jan 2010 12:09:48 +0100
Hi ALL! I noticed that when I will switch from fullscreen(same size of wb) back to windowed mode using the hotkey: RightAmiga + Return it wasnt possible, I got the error:

Cannot use this function while display is closed! (............................................ - In function: WaitEvent)

I think becasue the fullscreen display cant be contained in the Wb screen since it have the windwo borders... Any idea? I tryed also to put borderless argument when got on FullScreen but don't work neither in this way...
That is strange, it works here so please provide an example script but make it as small as possible! Delete all unnecessary code! I just want a few lines of code :)
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

[11 Jan 2010] Re: RightAmiga+Return switch mode problem...

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 11 Jan 2010 13:30:46 -0000
That is strange, it works here so please provide an example script but make it as small as possible! Delete all unnecessary code! I just want a few lines of code :)
That's my SwitchScreen code:

Code: Select all

Function p_SwitchFullScreen()       ; called by button...

WbL				=	GetAttribute(#DISPLAY, 1, #ATTRHOSTWIDTH)   ;\to get host screen dimensions
WbH				=	GetAttribute(#DISPLAY, 1, #ATTRHOSTHEIGHT) ;/

Switch TuttoSchermo

	Case 0:
		WinLOLD			=	GetAttribute(#DISPLAY, 1, #ATTRWIDTH)     ;\
		WinHOLD			=	GetAttribute(#DISPLAY, 1, #ATTRHEIGHT)    ;\   here save my old window dimensions...
		WinXOLD			=	GetAttribute(#DISPLAY, 1, #ATTRXPOS)        ;/
		WinYOLD			=	GetAttribute(#DISPLAY, 1, #ATTRYPOS)       ;/

		SetDisplayAttributes({ Width = WbL, Height = WbH, Borderless = True})
		ChangeDisplayMode(#DISPMODE_FULLSCREEN, WbL, WbH)	; vado in FullScreen...
		TuttoSchermo = 1
	Case 1:
		SetDisplayAttributes({ Width = WinLOLD, Height = WinHOLD, Sizeable = TRUE, ScaleMode = #SCALEMODE_NONE})
		ChangeDisplayMode(#DISPMODE_WINDOWED) ; vado in finestra sul wb...
		TuttoSchermo = 0
EndSwitch
Using only the routine above with the provided button all works as expected... But using the hotkey dont work since the window border create a display bigger that wb screen so hollywood cant make the display window(that's what I think).

The problem exists, as described above, only when using hotkey from fullscreen to window mode... If use hotkey to go fullscreen the only problem was that the screen created was only of the dimensions of the current display window but that's easly adjustable checcking the switched screen(with InstallEventHandler({ModeSwitch.....}), and maybe adjust that... But since The event "ModeSwitch" dont block the hotkey function I cant "control" that with it and to switch froim FullScreen to window I get the error...

Hope that now was all clear, sorruy again for my bed english...

PS I cant reopen my old window at the same position that have before Siwtch to FullScreen... I tryed with pass the X,Y value to SetDisplayAttributes but dont worked...maybe I've done some mistake...

Thanks!

Simone
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[13 Jan 2010] Re: Re: RightAmiga+Return switch mode problem...

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 13 Jan 2010 11:57:22 +0100
Using only the routine above with the provided button all works as expected... But using the hotkey dont work since the window border create a display bigger that wb screen so hollywood cant make the display window(that's what I think).

The problem exists, as described above, only when using hotkey from fullscreen to window mode... If use hotkey to go fullscreen the only problem was that the screen created was only of the dimensions of the current display window but that's easly adjustable checcking the switched screen(with InstallEventHandler({ModeSwitch.....}), and maybe adjust that... But since The event "ModeSwitch" dont block the hotkey function I cant "control" that with it and to switch froim FullScreen to window I get the error...
Well, you could set "NoModeSwitch" to TRUE and then catch the hotkey and do a manual switching :)

The code above doesn't help me because it's just an excerpt from a larger project. I need something that I can try & run immediately here. But it must be very very very small. Try to remove as much from your code as possible, try to isolate the error. Then you will also discover whether it is an error in your script or in Hollywood. If you have a script that is only 20 lines of code or so and shows the error, then send me the script and I'll look into it. You need to do this work for me because I don't have the time to debug through huge scripts which I didn't write. You know your scripts, because you have written them, so you can easily cut them down and isolate the error :)
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

[13 Jan 2010] Re: RightAmiga+Return switch mode problem...

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 13 Jan 2010 14:04:05 -0000
Well, you could set "NoModeSwitch" to TRUE and then catch the hotkey and do a manual switching :)

The code above doesn't help me because it's just an excerpt from a larger project. I need something that I can try & run immediately here. But it must be very very very small. Try to remove as much from your code as possible, try to isolate the error. Then you will also discover whether it is an error in your script or in Hollywood. If you have a script that is only 20 lines of code or so and shows the error, then send me the script and I'll look into it. You need to do this work for me because I don't have the time to debug through huge scripts which I didn't write. You know your scripts, because you have written them, so you can easily cut them down and isolate the error :)
mmm... That's all the code of my script that was called when I press the FullScreen Button...only it for switch to FullSCree and come back...

The var "TuttoSchermo" state (1 or 0) tell to the routine how operate on the button press...only that...

If 1 come back windowed or if 0 go fullscreen...

After it only I reinitialize the button(removing and than replacing and redesign the separators fro toolbar and texoutput...

You can try what I mean if you download it from OS4Depot and try to switch form fullscreen from windowed with the hotkey...

However I disabled it(I miss it when read the guide :P ) since I like to control my script so if I need an hotkey I will define one myself and than get it with the event handler :)

Probably the entire problem was due RighAmiga + Return works itslef with a simple mode switch wothout check anything else than the curent mode...since my fullscreen was an exact copy of the WB screen when it come back and try to add the window borders it get that error...So I think was wrong my way of use that hotkey...better define one own!

PS Have you got my mail regarding IsPicture() slowness ?

Sorry for bothering!

Simone.
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[17 Jan 2010] Re: Re: RightAmiga+Return switch mode problem...

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 17 Jan 2010 11:57:46 +0100
mmm... That's all the code of my script that was called when I press the FullScreen Button...only it for switch to FullSCree and come back...

The var "TuttoSchermo" state (1 or 0) tell to the routine how operate on the button press...only that...

If 1 come back windowed or if 0 go fullscreen...

After it only I reinitialize the button(removing and than replacing and redesign the separators fro toolbar and texoutput...

You can try what I mean if you download it from OS4Depot and try to switch form fullscreen from windowed with the hotkey...

However I disabled it(I miss it when read the guide :P ) since I like to control my script so if I need an hotkey I will define one myself and than get it with the event handler :)

Probably the entire problem was due RighAmiga + Return works itslef with a simple mode switch wothout check anything else than the curent mode...since my fullscreen was an exact copy of the WB screen when it come back and try to add the window borders it get that error...So I think was wrong my way of use that hotkey...better define one own!
Well, I can't tell unless you provide a very brief example script that shows the misbehaviour :)
PS Have you got my mail regarding IsPicture() slowness ?
Yes, I got that and the issue is fixed now. Thanks for the test JPEG files.
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

[17 Jan 2010] Re: RightAmiga+Return switch mode problem...

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 17 Jan 2010 11:08:32 -0000
Well, I can't tell unless you provide a very brief example script that shows the misbehaviour :)
Thinking on that, I'm really convincing that wasnt a real problem... Since initially I missed the NoSwitch option(now I use that to prevent Hot-Key activation), the behaviour of the hotkey use was strange to me, but now I think that was usefull to use with fixed Hollywood windows and not with the resizable with NoScale rendering engine...better to use a self-made hotkey for that... The only prob that remains was when/if someone will start its presentaion/game/utilitiy in full-res with same dimensions of the wb screen... But something rare I think... However when I got some spare time I'll try to send you a piece of coe with that...sorry but now I'm really busy... Finishing to configure the update, solving one stupid/ugly bug on LoView, low sapre time... I see what I can do...
Yes, I got that and the issue is fixed now. Thanks for the test JPEG files.
Very Good! :) Since that prob can be VERY boring(scannig the same dir was about 10 secs instead of 1...) for the daily LoView use... there's any ETA to obtain an Hollywood compiler with that fix?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Locked