Author Topic: Detecting Aspect Ratio  (Read 4069 times)

chriskuta

  • Newbie
  • *
  • Posts: 3
    • View Profile
Detecting Aspect Ratio
« 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?

 

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Detecting Aspect Ratio
« Reply #1 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

chriskuta

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Detecting Aspect Ratio
« Reply #2 on: May 08, 2017, 10:45:20 PM »
Cheers thanks for the reply.