Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read overscan from configuration file and compensate. #140

Open
MustacheMerlin opened this issue May 20, 2013 · 2 comments
Open

Read overscan from configuration file and compensate. #140

MustacheMerlin opened this issue May 20, 2013 · 2 comments
Milestone

Comments

@MustacheMerlin
Copy link

When using pi3d on a raspi that uses overscan the code is rendered outside of the window. Is it possible to read the .config file and account for the overscan so it renders in the right place?

@paddywwoof
Copy link
Collaborator

I would have thought it was possible to read and parse the config file.
Can you get the pi3d image in the 'right' place by hand tweaking the
values of x,y,w,h in the Display.create method? If so then you will be
able to write a python program to do the same. I will have a look at
this tomorrow (though I don't know if I can make my monitors need an
overscan adjustment)

Paddy

On 20/05/2013 02:30, Sdd18 wrote:

When using pi3d on a raspi that uses overscan the code is rendered
outside of the window. Is it possible to read the .config file and
account for the overscan so it renders in the right place?


Reply to this email directly or view it on GitHub
#140.

@paddywwoof
Copy link
Collaborator

Sdd18, Presuming you mean 'graphical display' rather than 'code'; It does seem to be easy enough to parse the /boot/config.txt file and find the overscan_left etc values. There is bit of a quirk in that the DISPLAY.max_width and DISPLAY.may_height values can only be accessed after you have created the display so you would have to do that, check the overscan values then DISPLAY.resize(x, y, w, h) with the values you calculate. If you can manage with the same overscan values for opposite edges then you can just use x and y values for the original DISPLAY.create and it will put equal margins on opposite edges - I'm not sure whether we should build this code into the Display class or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants