Amiga-Development

Please login or register.

Login with username, password and session length
Advanced search  

News:

Created for developers of all Amiga camps

Author Topic: Screen mode list  (Read 115 times)

0 Members and 1 Guest are viewing this topic.

asrael22

  • Newbie
  • *
  • Posts: 31
    • View Profile
Screen mode list
« on: August 06, 2017, 08:47:24 PM »

Hi.

Can someone guide me to some docs on how to present a screen mode requester?
I'd like the user to choose from the available screen modes and finally open a new screen.


Manfred
Logged

ALB42

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Screen mode list
« Reply #1 on: August 06, 2017, 10:42:18 PM »

http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node027B.html

and follow links
also you could look into the source codes:

https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/amunits/src/coreunits/asl.pas?revision=33225&view=markup

search for TScreenModeRequester

and look into the structure and behind it.

I hope Pascal is ok  ;)

Code: [Select]
program screenmodetest;
uses
  exec, utility, ASL;
var
  Rq: PScreenModeRequester;
begin
  Rq := PScreenModeRequester(AllocAslRequestTags(ASL_ScreenModeRequest, [ASLSM_DoDepth, AsTag(True), TAG_DONE]));
  if AslRequestTags(Rq, [TAG_DONE])then
    Writeln('Selected mode: ', Rq^.sm_DisplayID, ' Width ', Rq^.sm_DisplayWidth, 'x', Rq^.sm_DisplayHeight, 'x', Rq^.sm_DisplayDepth);
  FreeAslRequest(Rq);
end.
« Last Edit: August 06, 2017, 10:49:15 PM by ALB42 »
Logged

asrael22

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Screen mode list
« Reply #2 on: August 07, 2017, 08:29:36 AM »

Sure, that's OK. I wanted to do that using Pascal.
Thanks.

In fact I had a look at the ASL stuff (in RKRM libraries) but only found File and Font requester types.
Was that Screen requester added later?


Manfred
Logged

magorium

  • Full Member
  • ***
  • Posts: 221
  • Programming is an art form that fights back
    • View Profile
Re: Screen mode list
« Reply #3 on: August 08, 2017, 06:27:17 PM »

Was that Screen requester added later?
Yups, you noted that correctly.

This is old AllocAslRequest(), and this is new AllocAslRequest().

Note the differences in supported requester types for the first parameter.
Logged