Bug with ChangeDisplaySize
- Juan Carlos
- Posts: 888
- Joined: Mon Sep 06, 2010 1:02 pm
Bug with ChangeDisplaySize
I am using ChangeDisplaySize in my program it start with a screen size of 800x600 and with a button the program change to 1280x1024 using the instruction ChangeDisplaySize under Windows the instruction works fine changing the screen program between two but under MorphOS and AmigaOS not, only it did little jumps but no change as under Windows.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Bug with ChangeDisplaySize
As always, you need to provide a very small code snippet.
- Juan Carlos
- Posts: 888
- Joined: Mon Sep 06, 2010 1:02 pm
Re: Bug with ChangeDisplaySize
My code:
Code: Select all
Function p_FullScreen()
If Pantalla=0
desktop_brush = GrabDesktop(75)
Ancho1=GetAttribute(#BRUSH, 75, #ATTRWIDTH)
Alto1=GetAttribute(#BRUSH, 75, #ATTRHEIGHT)
Alto1=Sub(Alto1, 20) ;NOTA: -20 Para mostrar la barra en Windows.
ChangeDisplaySize(Ancho1, Alto1, Smooth=True)
Pantalla=1 ;Activamos la bandera de Pantalla Completa con 1.
Else Pantalla=1
Ancho1=800
Alto1=600
ChangeDisplaySize(Ancho1, Alto1, Smooth=True)
Pantalla=0 ;Desactivamos la bandera de Pantalla Completa con un 0.
EndIf
EndFunction
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Bug with ChangeDisplaySize
This isn't a ready-to-run code snippet. Look how others do it: http://forums.hollywood-mal.com/viewtop ... f=4&t=1227
If you do it like that, you'll get an immediate response from me whether this is a bug or not. And if it is a bug, it will also be fixed. But you first need to break things down into as few lines as possible and it needs to be a complete program and not just an extract from your code because extracts are much too unspecific as all kinds of things could've happened before. Proper bug reports take some time and effort but if you want a fix, you have to invest this time like others do as well.
If you do it like that, you'll get an immediate response from me whether this is a bug or not. And if it is a bug, it will also be fixed. But you first need to break things down into as few lines as possible and it needs to be a complete program and not just an extract from your code because extracts are much too unspecific as all kinds of things could've happened before. Proper bug reports take some time and effort but if you want a fix, you have to invest this time like others do as well.
- Juan Carlos
- Posts: 888
- Joined: Mon Sep 06, 2010 1:02 pm
Re: Bug with ChangeDisplaySize
A single code that works under Windows but no under Amiga:
Code: Select all
@DISPLAY {Title="Example Full Or Window mode", Width=800, Height=600}
Function p_EventFunc(msg)
Switch(msg.action)
Case "OnKeyDown":
If msg.key = "LEFT"
desktop_brush = GrabDesktop(75)
Ancho1=GetAttribute(#BRUSH, 75, #ATTRWIDTH)
Alto1=GetAttribute(#BRUSH, 75, #ATTRHEIGHT)
Alto1=Sub(Alto1, 20) ;NOTA: -20 Para mostrar la barra en Windows.
ChangeDisplaySize(Ancho1, Alto1, Smooth=True)
EndIf
If msg.key = "RIGHT"
Ancho1=800
Alto1=600
ChangeDisplaySize(Ancho1, Alto1, Smooth=True)
EndIf
EndSwitch
EndFunction
SetFont(#SANS, 25)
SetFontColor(#WHITE)
TextOut(#CENTER, 130, "Use Keys LEFT OR RIGHT ARROW")
TextOut(#CENTER, 160, "LEFT:Full Screen. RIGHT:Window screen")
InstallEventHandler({OnKeyDown = p_EventFunc})
EscapeQuit(True)
Repeat
WaitEvent
Forever
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Bug with ChangeDisplaySize
Yes, that's finally a proper bug report I can reproduce and confirm this bug. It will be fixed for the next update. By the way, there's also a bug in your code:
is wrong! It should be:
Options have to be passed inside a table.
Code: Select all
ChangeDisplaySize(Ancho1, Alto1, Smooth=True)
Code: Select all
ChangeDisplaySize(Ancho1, Alto1, {Smooth=True})
- Juan Carlos
- Posts: 888
- Joined: Mon Sep 06, 2010 1:02 pm
Re: Bug with ChangeDisplaySize
Aleluya por fin. These type bugs I am speak during two years.
Thanks for the reporting the smooth parameter I though that it was working in tools, I have correcto it.
Thanks for the reporting the smooth parameter I though that it was working in tools, I have correcto it.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Bug with ChangeDisplaySize
Actually, I don't see a bug here. The only difference in behaviour between Windows and AmigaOS that I see with your example is that on AmigaOS Hollywood will switch the window to borderless mode, but this is defined behaviour. because AmigaOS doesn't allow windows greater than the screen. So either I already fixed this bug or there is no bug here...