Hello.
I would like to point out that in programming I have encountered many difficulties in managing video modes especially with the "MODE = ASK" tag activated because 2 of the possible choices (there are 3) 2 lead to the same mode and since Windows 11 (for example), when it switches to a different screen, I don't know why, reduces the size of the HOST screen from 1920x1080 (for example) to 640x480 (I assume it is the minimum resolution that my AMD video card can handle), it creates confusion and you cannot manage both functions well. Specifically 1 excludes the other. This conflicts with the "choose a resolution from a list" mode which is always set to 2.
Could this behavior be changed in the next update and have different values for each button and therefore for each mode?
For example, 0, 1 and 2 ? Or if you prefer, 1, 2 and 3?
It would be very useful.
Thanks!
Emanuele
P.S.: When is the next update?
Hollywood MODE=ASK conflict
Re: Hollywood MODE=ASK conflict
can you explain a bit what are these "difficulties" ?
i ask because i had the impression you (we) have move on during past discussions !?
by the sentence "changes to 640x480 the HOST" give me the impression that you dont specify hollywood display
Hollywwod "display" ( similar to canva like in HTML5) is a diffirent thing than monitor screen
Hollywood open DISPLAY 1, by definition even if you dont set anything, and defaults to 640x480, so i guess thats its the confusing issue
have you try my approach with my custom selector ? You dont really elaborate what really you are trying to do, but my approach is closer to what traditional user have in mind about "display"
also, the fact that is a "custom" requestor gives you full "configuration"
i mean this one note that i intentional i createdisplay(2) not 1 but 2,
i ask because i had the impression you (we) have move on during past discussions !?
by the sentence "changes to 640x480 the HOST" give me the impression that you dont specify hollywood display
Hollywwod "display" ( similar to canva like in HTML5) is a diffirent thing than monitor screen
Hollywood open DISPLAY 1, by definition even if you dont set anything, and defaults to 640x480, so i guess thats its the confusing issue
have you try my approach with my custom selector ? You dont really elaborate what really you are trying to do, but my approach is closer to what traditional user have in mind about "display"
also, the fact that is a "custom" requestor gives you full "configuration"
i mean this one note that i intentional i createdisplay(2) not 1 but 2,
Code: Select all
Function ScreenModeRequest(DisplayModes,CustomTitle$,CustomText$)
Local Screensizes = CreateList()
For Local k = 0 To ListItems(DisplayModes) - 1
InsertItem(ScreenSizes,DisplayModes[k].Width.." x "..DisplayModes[k].Height)
Next
If CustomTitle$=Nil
CustomTitle$="Screen Mode Request"
EndIf
If CustomText$=Nil
CustomText$="Please Select Screen Size"
EndIf
selected = ListRequest(CustomTitle$,CustomText$,ScreenSizes)
If selected=-1
Return(Nil)
Else
Return(DisplayModes[selected].Width,DisplayModes[selected].Height)
EndIf
EndFunction
p_Width, p_Height = ScreenModeRequest(GetDisplayModes(),Nil,"SELECT Resolution")
CreateDisplay(2, {Width=p_Width,Height=p_Height,scrWidth=p_scrWidth,scrHeight=p_scrHeight,Mode="FullScreen", Active=True})
OpenDisplay(2)
SelectDisplay(2)
NPrint(StrStr(p_Width).. " x " ..StrStr(p_Height))
WaitLeftMouse()
Christos
Re: Hollywood MODE=ASK conflict
Hi and thanks for the reply.
I'll try to be as clear as possible.
I'm using Windows 11 in 1920x1080 mode, so the HOST for Hollywood is a 1920x1080 screen (Display with ID 0 ?).
I take its dimensions and they are correct. I open a Display with ID 1 and ask the user to choose what he prefers.
At this point Hollywood opens a "requester" with 4 options.
The first is FULL SCREEN MODE (BEST SIZE) with "MODE=2".
The second is WINDOW MODE with MODE=1.
The third is FULL SCREEN MODE (CHOOSE RESOLUTION) with MODE=2.
The fourth is a simple CANCEL and closes the program. I don't know what "MODE" it corresponds to but I don't think there is a number, it just closes the program and that's it.
Now what happens, when the user makes a choice he presses one of the 3 buttons. If he chooses WINDOW Hollywood opens a window the size of the HOST (right) minus a lateral margin that I give it, so since the HOST is 1920x1080 I tell it to use a margin of 100 pixels per side and it opens a window of 1720x880 centered (correct).
If the user chooses the mode with choice of resolution Hollywood opens a screen of the chosen resolution (correct). So far so good.
Now comes the problem.
If the user chooses the FULL SCREEN mode (BEST SIZE) it should open it at 1920x1080 but in reality, in the meantime the HOST display has automatically shrunk and gone from 1920x1080 to 640x480 (which corresponds to the minimum that my AMD card can handle). At this point, Hollywood rightly opens the screen like the HOST (correct operation) but opens it at 640x480 because in the meantime the HOST has changed itself.
So what do I do, I insert a control where, in the case that the user chooses the FULL SCREEN MODE (BEST SIZE) which corresponds in Hollywood to MODE=2, and I go to see what resolution has been set and in the case of a resolution lower than that of the HOST I automatically change it and put back that of the original HOST, and doing so it works. Unfortunately, however, even the third mode, the one with the choice of resolution, corresponds in Hollywood to MODE=2. And so it happens that even when the user chooses 1024x768 (for example) from the third button, because of my control, Hollywood rightly puts it back to 1920x1080.
So there is no difference between button 1 and button 3 of the requester because both 2 are in Hollywood at MODE=2 and therefore I can't have the functionality of the 2 buttons differentiated. Either I let the HOST become 640x480 inexorably or you have to avoid using the first button by managing only the latter between the first and the third.
I can't understand how I can distinguish in a perfect and precise way the 3 decisions that the user can select without interfering with the first choice with the third. Where am I going wrong? If it's me who's going wrong... it will certainly be like that, however...
Thanks for everything!
Emanuele
P.S.: If it's a topic that has already been discussed, it either means that I didn't understand or it means that the person who explained it to me wasn't clear enough considering that I'm worse than a donkey!!!
I'll try to be as clear as possible.
I'm using Windows 11 in 1920x1080 mode, so the HOST for Hollywood is a 1920x1080 screen (Display with ID 0 ?).
I take its dimensions and they are correct. I open a Display with ID 1 and ask the user to choose what he prefers.
At this point Hollywood opens a "requester" with 4 options.
The first is FULL SCREEN MODE (BEST SIZE) with "MODE=2".
The second is WINDOW MODE with MODE=1.
The third is FULL SCREEN MODE (CHOOSE RESOLUTION) with MODE=2.
The fourth is a simple CANCEL and closes the program. I don't know what "MODE" it corresponds to but I don't think there is a number, it just closes the program and that's it.
Now what happens, when the user makes a choice he presses one of the 3 buttons. If he chooses WINDOW Hollywood opens a window the size of the HOST (right) minus a lateral margin that I give it, so since the HOST is 1920x1080 I tell it to use a margin of 100 pixels per side and it opens a window of 1720x880 centered (correct).
If the user chooses the mode with choice of resolution Hollywood opens a screen of the chosen resolution (correct). So far so good.
Now comes the problem.
If the user chooses the FULL SCREEN mode (BEST SIZE) it should open it at 1920x1080 but in reality, in the meantime the HOST display has automatically shrunk and gone from 1920x1080 to 640x480 (which corresponds to the minimum that my AMD card can handle). At this point, Hollywood rightly opens the screen like the HOST (correct operation) but opens it at 640x480 because in the meantime the HOST has changed itself.
So what do I do, I insert a control where, in the case that the user chooses the FULL SCREEN MODE (BEST SIZE) which corresponds in Hollywood to MODE=2, and I go to see what resolution has been set and in the case of a resolution lower than that of the HOST I automatically change it and put back that of the original HOST, and doing so it works. Unfortunately, however, even the third mode, the one with the choice of resolution, corresponds in Hollywood to MODE=2. And so it happens that even when the user chooses 1024x768 (for example) from the third button, because of my control, Hollywood rightly puts it back to 1920x1080.
So there is no difference between button 1 and button 3 of the requester because both 2 are in Hollywood at MODE=2 and therefore I can't have the functionality of the 2 buttons differentiated. Either I let the HOST become 640x480 inexorably or you have to avoid using the first button by managing only the latter between the first and the third.
I can't understand how I can distinguish in a perfect and precise way the 3 decisions that the user can select without interfering with the first choice with the third. Where am I going wrong? If it's me who's going wrong... it will certainly be like that, however...
Thanks for everything!
Emanuele
P.S.: If it's a topic that has already been discussed, it either means that I didn't understand or it means that the person who explained it to me wasn't clear enough considering that I'm worse than a donkey!!!
Re: Hollywood MODE=ASK conflict
Plouf has already mentioned that the display with ID 1 is the default display. Try it with 2.
But I suggest that you don't explain what you think you've done, just show the code.
But I suggest that you don't explain what you think you've done, just show the code.
Re: Hollywood MODE=ASK conflict
rereading, OP looks like a future wishlist, aka "i want to know the option of mode="ASK" user has selected", in that case post it to wihslist section of forum
also i fully agree with Flinx, that a "MCVE" a small demo showing what you want to do will help
i.e. i mean what are the reason you want to know if user select "bestfit" ?
the only possible reason is that you have select a low resolution display non standard display, for example 787 x 589, in this way 800x600 will be selected
anyway i also think that you are thinking too complex to solve simple problems.
i mean, why doesnt a fixed selection of resolutions (like the example i post above) is not enough ?
also why not dont you adapt your display to whatever resolution a user has selected to have fullscreen display, and draw there ? like example bellow
also i fully agree with Flinx, that a "MCVE" a small demo showing what you want to do will help
i.e. i mean what are the reason you want to know if user select "bestfit" ?
the only possible reason is that you have select a low resolution display non standard display, for example 787 x 589, in this way 800x600 will be selected
anyway i also think that you are thinking too complex to solve simple problems.
i mean, why doesnt a fixed selection of resolutions (like the example i post above) is not enough ?
also why not dont you adapt your display to whatever resolution a user has selected to have fullscreen display, and draw there ? like example bellow
Code: Select all
CreateDisplay(2,{Mode="Ask",color=#RED})
OpenDisplay(2)
If GetAttribute(#DISPLAY, 2,#ATTRMODE)=#DISPMODE_FULLSCREEN
ChangeDisplaySize(GetAttribute(#DISPLAY, 2,#ATTRHOSTWIDTH),GetAttribute(#DISPLAY, 2, #ATTRHOSTHEIGHT))
NPrint("RESIZE")
EndIf
NPrint("Display."..GetAttribute(#DISPLAY, 2, #ATTRWIDTH).. " x " ..GetAttribute(#DISPLAY, 2, #ATTRHEIGHT))
NPrint("HOST...."..GetAttribute(#DISPLAY, 2,#ATTRHOSTWIDTH).. " x " ..GetAttribute(#DISPLAY, 2, #ATTRHOSTHEIGHT))
WaitLeftMouse()
Christos