14 November 2022, 10:27 | #1 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Size Detectors
I want a way to detect two sizes, although a presume the methods for each of them will be quite different.
If the first one already exists, point me to it. But I'm pretty sure there's no function for the second one. And by the way, I'm working with intuition V36, DOS V36 etc. Thanks in advance! |
14 November 2022, 10:48 | #2 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
The Amiga has no way of communicating with the display, so it cannot know its size.
For Workbench size, I suppose you could do LockPubScreen(null) and then interrogate the screen structure to get the horz/vert size (or something similar). |
14 November 2022, 12:03 | #3 | |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Quote:
Edit: Thanks for your suggestion about the workbench size, it works perfectly! I'll share the macro I made: Code:
macro Call xref _LVO\1 jsr _LVO\1(A6) endm macro ClrA suba.l \1,\1 endm macro GetWBSize ClrA A0 Call LockPubScreen move.l D0,A1 move.w sc_Width(A1),WBWidth move.w sc_Height(A1),WBHeight Call UnlockPubScreen endm ... WBWidth dc.w 0 WBHeight dc.w 0 Last edited by Steam Ranger; 14 November 2022 at 12:36. |
|
14 November 2022, 13:48 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
To put it simply, the monitor will stretch the time period of vertical and horizontal sync to fit the size of the display.
You're welcome! Last edited by hooverphonique; 14 November 2022 at 16:40. |
14 November 2022, 16:21 | #5 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
The monitor does not dictate its size. It's the Amiga that does.
To know maximum sizes you can have a look at intuition.library's QueryOverscan function. |
14 November 2022, 21:21 | #6 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
Quote:
Or do you mean resolution as in "how large are the pixels" in arbitrary units? If so, the display info database also contains information on pixel sizes. This can be used to scale graphics (such that circles appear as circles and not as ellipses). If you mean "absolute size in a length scale", then that information is not available to the Amiga as it does not provide a backwards channel which would allow the Amiga to read the monitor EDID data. |
|
15 November 2022, 05:37 | #7 |
Registered User
Join Date: May 2021
Location: Melbourne, Australia
Posts: 40
|
As an addition, calling LockPubScreen(NULL) returns the default public screen, which may not necessarily be the Workbench, though it usually is and may be what you want.
If you want to specifically know the Workbench's dimensions regardless of whether it is the default public screen, call LockPubScreen("Workbench"). |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
horiz. size & vert. size greyed out in some configurations | honx | support.WinUAE | 3 | 15 August 2020 21:14 |
Get Icon size? | volvo_0ne | Coders. AMOS | 2 | 13 November 2018 19:56 |
Window size 2X | aszu | support.Amiga Forever | 2 | 20 February 2015 23:31 |
Icon size | mritter0 | support.Other | 1 | 23 May 2014 08:46 |
HD size limitation? | gizmomelb | support.WinUAE | 8 | 07 August 2006 16:40 |
|
|