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

Wrapper function around Screen('OpenWindow') and Screen('CloseWindow') #36

Closed
shippy opened this issue Mar 17, 2017 · 0 comments
Closed

Comments

@shippy
Copy link
Contributor

shippy commented Mar 17, 2017

There are a couple of tasks that are always necessary to do with Screen('OpenWindow'); most prominently, it sets the windowPtr and screenDims in settings.device. This should be factored out for general ease of usage, and for preventing some simple errors.

What simple errors? For example, almost all scripts use screen.device.screenDims(3:4) as width and height. But this is only correct as long as the top-left pixel of PTB's screen is (0, 0)! The actual width and height are [dims(3) - dims(1), dims(4) - dims(2)].

Screen('CloseWindow') doesn't present many problems, but having a shutdown script that unsets relevant settings.device values would be a good complement.

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

No branches or pull requests

1 participant