English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 13 July 2024, 18:18   #1
jabbadude
Registered User
 
Join Date: Sep 2022
Location: Fjellhamar/Norway
Posts: 10
ReAction RequestScreenMode

I'm trying to read the result of Reaction's RequestScreenMode

Reaction_Guide.pdf suggest (get file example) I should use the GetAttrs function, which I found defined in the file clib/reaction_lib_protos.h
But the linker doesn't know what GetAttrs is.

Code:
if(RequestScreenMode(obj[WIN_GSM], window))
{
  ULONG display_id = 0L;
  GetAttrs(obj[WIN_GSM],
    GETSCREENMODE_DisplayID, &display_id,
    TAG_DONE);
Anyone knows how I can read the result of RequestScreenMode
jabbadude is offline  
Old 13 July 2024, 22:03   #2
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,695
To use any of the reaction.lib functions, you have to link reaction.lib, the same way as you would link amiga.lib or small.lib. Something like:

slink FROM LIB:c.o foo.o LIBRARY LIB:small.lib LIB:reaction.lib TO foo

Or you can use the GetAttr() function instead which is just an intuition.library function.
Minuous is offline  
Old 14 July 2024, 13:18   #3
jabbadude
Registered User
 
Join Date: Sep 2022
Location: Fjellhamar/Norway
Posts: 10
Thanks a lot!

I could not find reaction.lib anywhere, but your second suggestion works out just fine.

For the curious, in case somebody else comes across this problem, here's my code with an extra check to make sure it works as expected.

Code:
if(RequestScreenMode(obj[WIN_GSM], window))
{
	ULONG display_id = 0L;
	struct NameInfo name_info;

	GetAttr(GETSCREENMODE_DisplayID, obj[WIN_GSM],
			&display_id);

	GetDisplayInfoData(
		NULL,
		&name_info,
		sizeof(struct NameInfo),
		DTAG_NAME,
		display_id);

	printf("Selected display: %s\n", name_info.Name);
}
The output says "Selected display: PAL:High Res Laced", which was expected since that is what I chose in the screen mode requester.
jabbadude is offline  
Old 14 July 2024, 13:28   #4
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,695
reaction.lib is in the OS3.9 NDK at https://os.amigaworld.de/index.php?lang=en&page=12
Works fine on OS3.2 etc.
Minuous 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
[ReAction] How to change content of LIST_BROWSER gadget. mateusz_s Coders. System 5 17 November 2023 17:14
Converting to Reaction: Shared UserPort? Warty Coders. C/C++ 12 10 July 2021 07:38
installing Classact and Reaction on 3.1.4 dschallock support.Other 8 06 February 2020 19:19
Update ReAction classes mritter0 Coders. General 2 30 July 2014 01:55
Proper ReAction coding mritter0 Coders. C/C++ 3 24 April 2014 07:34

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 12:43.

Top

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