English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 11 January 2016, 19:36   #1
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 662
Question Detecting screen mode

Is there a system function that would detect current screen depth and color order (RGB/BGR) ?
arti is offline  
Old 11 January 2016, 20:18   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,002
You can use GetVPModeID to get the mode ID of the current screen and then for example p96GetModeIDAttr to find out the pixel format. CGX should have a similar function, I just don't remember it right now.
thomas is offline  
Old 11 January 2016, 20:19   #3
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,311
OS screen I assume? RGB/BGR implies a graphics card.

Look at cybergraphics.library/LockBitMapTags()
(p96 should emulate this?)

Code:
int pixelFormat; 
int handle = LockBitMapTags(screen, LBMI_PIXFMT, &pixelFormat); 
if( handle != 0 ) 
{ 
   switch(pixelFormat) 
   { 
      case PIXMFT_RGB: 
         ...
   }
}
nogginthenog is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Full screen mode WinUAE 0.8.22 Erik support.WinUAE 4 19 March 2011 19:35
ECS screen mode colours. redblade support.Hardware 10 28 June 2010 05:30
screen mode cli? xc8 request.Apps 5 21 April 2009 23:02
Screen Mode problem! Fugitif.fa support.WinUAE 2 14 February 2006 21:53
screen mode Jherek Carnelia support.WinUAE 1 03 July 2003 09:36

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 11:14.

Top

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