English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 14 November 2022, 10:27   #1
Steam Ranger
Registered User
 
Steam Ranger's Avatar
 
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.
  1. A function that can give me the size of the workbench screen
  2. The size of the monitor, assuming low resolution.

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!
Steam Ranger is offline  
Old 14 November 2022, 10:48   #2
hooverphonique
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).
hooverphonique is offline  
Old 14 November 2022, 12:03   #3
Steam Ranger
Registered User
 
Steam Ranger's Avatar
 
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
Post

Quote:
Originally Posted by hooverphonique View Post
The Amiga has no way of communicating with the display, so it cannot know its size.
Then how does workbench run as fullscreen?

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.
Steam Ranger is offline  
Old 14 November 2022, 13:48   #4
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by Steam Ranger View Post
Then how does workbench run as fullscreen?
To put it simply, the monitor will stretch the time period of vertical and horizontal sync to fit the size of the display.


Quote:
Originally Posted by Steam Ranger View Post
Edit: Thanks for your suggestion about the workbench size, it works perfectly!
You're welcome!

Last edited by hooverphonique; 14 November 2022 at 16:40.
hooverphonique is offline  
Old 14 November 2022, 16:21   #5
meynaf
son of 68k
 
meynaf's Avatar
 
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.
meynaf is offline  
Old 14 November 2022, 21:21   #6
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,214
Quote:
Originally Posted by Steam Ranger View Post
I want a way to detect two sizes, although a presume the methods for each of them will be quite different.
It would be necessary to explain more precisely what you mean by "size". Is that "resolution in pixels"? If so, this depends on the display mode, and the graphics display info database contains such information.



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.
Thomas Richter is offline  
Old 15 November 2022, 05:37   #7
Steady
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").
Steady is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:39.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07268 seconds with 13 queries