Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: tonyw on November 23, 2002, 07:33:52 AM
-
I know it's probably a silly question, but I'm trying to update an old prog to use P96. How do I open a screen using a Picaso96 mode? I've tried various modes in struct NewScreen, but I can only get PAL hi/lo res, interlaced or not.
What do I have to do to use the other screen modes?
tony
-
The mode field in NewScreen (16 bits) is not sufficient to take an entire mode id (32 bits). You have to use OpenScreenTags() instead of OpenScreen() and add the tag SA_DisplayID with the correct mode id. You can also use OpenScreen() with the ExtNewScreen structure and NS_EXTENDED flag set and add the Tags to the ExtNewScreen.Extension field.
You should let the user configure the desired mode id either in tooltypes or parameters or some config file. To get the mode id you can use the program GetModeID which is in the Visage archive on Aminet.
There is also a very useful tag SA_LikeWorkbench which clones the Workbench screen's mode and dimensions. Read intuition/screens.h and intuition autodocs for more information.
Bye,
Thomas
-
Thanks, Thomas, that's a great help. Although I haven't got it working yet, I think I understand what's needed--
1) I set the Type flag NS_EXTENDED (only)
2) I make up an array of Tags "Ext_tags[2]"
3) the first one is TAG_USER, SA_LikeWorkbench
4) the second one is TAG_END, 0
5) I put &Ext_tags[0] into the Extended field in ExtNewScreen
I call OpenScreen((struct NewScreen *)ns_ext), having to cast the ExtNewScreen struct to a NewScreen struct.
As I said, I've got that far and it still opens a lo-res screen, not a Workbench clone, but I'll persist for a while yet.
tony
-
3) the first one is TAG_USER,
SA_LikeWorkbench
This must be SA_LikeWorkbench, TRUE
-
Thanks, Georg and Thomas, it works a treat now.
tony