Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: chriskuta on May 07, 2017, 09:47:05 PM

Title: Detecting Aspect Ratio
Post by: chriskuta on May 07, 2017, 09:47:05 PM
New to Attract Mode (on Pi) quick question. :)  I did search 1st promise..  :-X

Can Attractmode determine which layout to use based on the displays aspect ratio (assuming you have both 16:9 and 4:3 / 5:4 layouts available in AttractMode). I want to be able to plug my bartop into external TVs (on occasion) since the bartop has a 5:4 monitor I get a stretched layout.  I don't mind telling the Pi the native resolution when swapping displays, but I'm a bit lost on how to tell AttractMode to globally switch layouts?

 
Title: Re: Detecting Aspect Ratio
Post by: keilmillerjr on May 08, 2017, 01:24:23 PM
Use a layout that scales well. Layouts should aspire to work at multiple aspects. Or create a plugin to switch layouts. Can look at my helpers module for determining screen aspect. Good place to start. https://github.com/keilmillerjr/helpers-module/blob/master/readme.md
Title: Re: Detecting Aspect Ratio
Post by: chriskuta on May 08, 2017, 10:45:20 PM
Cheers thanks for the reply.