[25 Feb 2012] Display cannot be opened in Fullscreen on AOS4

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
nexus
Posts: 133
Joined: Sun Mar 07, 2010 11:54 am

[25 Feb 2012] Display cannot be opened in Fullscreen on AOS4

Post by nexus »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 25 Feb 2012 08:47:39 -0000

Hi, I have a problem, when wanting to change the display dimentions dynamically and starting my program in fullscreen.

I don't use 'mode=ask' in the @DISPLAY preprocessor command because I want to remember the chosen dimensions in a table. So here is my code:

Code: Select all

@DISPLAY 1,{ Color = #BLACK, Title = #DEFAPPTITLE, hidden=True /*, mode = "ask"*/ } 

Local screenmodesT=GetDisplayModes()
Local modesT={}
modesT[0]=screenmodesT[0].width.."x"..screenmodesT[0].height
Local midx=-1

For Local i=1 To ListItems(screenmodesT)-1
  modesT[i]=screenmodesT[i].width.."x"..screenmodesT[i].height
  If (screenmodesT[i].width=SETTINGST["width"] and screenmodesT[i].height=SETTINGST["height"]) Then midx=i
Next

Local res=ListRequest("Chose Screenmode","Available Screenmodes:",modesT,midx)
If (res>=0)
  Local chosenT,count=SplitStr(modesT[res],"x")
  SETTINGST["width"]=Val(chosenT[0])
  SETTINGST["height"]=Val(chosenT[1])
EndIf

SetDisplayAttributes({width=SETTINGST["width"],height=SETTINGST["height"],Titel=SETTINGST["apptitle"]})
OpenDisplay(1)   
My workbench on my X1000 is running in 1920x1200 and starting the above works up to 1600x1200 in window mode. However, it refuses to start windows of size 1920x1200.

When starting my program in fullscreen mode on the comandline with the option "-fullscreen" (or by the excellent hw4c plugin for Cubic IDE), the display cannot be opend in fullscreen mode for any resolution. The following error message appears:

"Kann die Displaygröße nicht auf 800x600 wechseln" (engl.: cannot change display size to 800x600).

When running in windows mode and using the RAMIGA-Return-shortcut, I *can* switch to fullscreen, up to a resolution 1280x1024 but not in 1600x1200.

So, i did not found any way to open a resolution 1920x1200. On Linux, by the way, it works up to 1400x900 (-- the max resolution of my laptop).

So, is this a bug or do I something wrong in my code?

Is there a better way to change the display resolution and to get the display dimension? By the way, "Getattribute(#DISPLAY,1,#ATTRWIDTH") gives me the default width "640" after the OpenDisplay(1) command. Seems wrong, isn't it?

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

[25 Feb 2012] Re: Display cannot be opened in Fullscreen on AOS4

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 25 Feb 2012 12:28:29 +0100
So, is this a bug or do I something wrong in my code?
Let's make this a little less complicated :) What happens when you run the following script on your X1000?

Code: Select all

WaitLeftMouse
ChangeDisplayMode(#DISPMODE_FULLSCREEN, 1920, 1200)
WaitLeftMouse
End
Is there a better way to change the display resolution and to get the display dimension? By the way, "Getattribute(#DISPLAY,1,#ATTRWIDTH") gives me the default width "640" after the OpenDisplay(1) command. Seems wrong, isn't it?
Not necessarily :) If it returns 640, then Hollywood has just opened a display of width 640, maybe because there was some problem with higher resolutions.
nexus
Posts: 133
Joined: Sun Mar 07, 2010 11:54 am

[27 Feb 2012] Re: Display cannot be opened in Fullscreen on AOS4

Post by nexus »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 27 Feb 2012 06:08:00 -0000
Let's make this a little less complicated :) What happens when you run the following script on your X1000?

Code: Select all

WaitLeftMouse
ChangeDisplayMode(#DISPMODE_FULLSCREEN, 1920, 1200)
WaitLeftMouse
End
Yes, that works! :) So what is the difference between "ChangeDisplayMode()" and "SetDisplayAttributes()" with respect to changing width and height :) (-- by the way, as you can see above, "Titel" is mistyped and the reason for my former email that changing a title does not work with this method ;) ).

Another interesting thing is, when I call "OpenDisplay(1)" after ChangeDisplayMode(), then on AOS4, a Screen of 1900x1200 is opened and a window of size 1900x1200 is used on that screen. If I change the order, OpenDisplay(1) then ChangeDisplayMode(), my Program is opened correctly in fullscreen.

Thanks, for you support!

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

[02 Mar 2012] Re: Re: Display cannot be opened in Fullscreen on AOS4

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 02 Mar 2012 14:16:32 +0100
Yes, that works! :) So what is the difference between "ChangeDisplayMode()" and "SetDisplayAttributes()" with respect to changing width and height :)
Hmm, not sure. Can you post your call to SetDisplayAttributes() that should do the same as the call to ChangeDisplayMode() above? Just one line please :)
Another interesting thing is, when I call "OpenDisplay(1)" after ChangeDisplayMode(), then on AOS4, a Screen of 1900x1200 is opened and a window of size 1900x1200 is used on that screen. If I change the order, OpenDisplay(1) then ChangeDisplayMode(), my Program is opened correctly in fullscreen.
Well, a window is always opened, it's just that you normally don't see this :) Not sure if the behaviour you described above is intended or not. I'd need to see a code snippet to tell you more. But make it as short as possible please :) Just a few lines :)
Locked