-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix No Camera bug, Port to Python3, Update to Sugargame v1.3 #11
Conversation
Please review @quozl @chimosky @walterbender @Hrishi1999 @Aniket21mathur |
Make toolbar buttons insensitive when camera isn't found Signed-off-by: Ibiam Chihurumnaya <[email protected]>
Tested, made some changes and sent a PR to your repo.
|
Tested with a camera. The camera live image is on display, but the buttons are insensitive. I did not diagnose. Are you sure about not calling pygame.camera.init()? Are you sure about hfilp spelling? |
|
@chimosky I suspected that, hfilp is my mistake, I hadn't tested your changes. I will make those changes if something gone wrong. |
When self.game is initialized, |
@chimosky did you compare the test between f9a02f4 and 942ad61? We have |
Tested as at 942ad61;
|
Closes #9. |
@quozl can you please check if you tested my branch on the VM? It seems like that error should not be created because it checks for !=0. If there is no camera, that block should not have been executed in the first place. Tested on Sugar Debian Live 0.116. No errors |
I agree, it must have been a mistake. Tested 942ad6. Still the PyGIWarning for Gtk. Does say Camera not found, over on the right side of the display. Does consume all CPU cycles. Does mark buttons insensitive. Could you fix the CPU issue? Add a pygame.clock. |
@quozl the camera not found appearing too outside the screen is because the screen sizes were hardcoded to match the olpc infinity screen sizes. I will try to add the pygame.clock. |
Thanks. I can't find where the screen size is coded to any OLPC product. Where is this in the code? |
I mean the standard olpc screen resolution, I don't remember maybe 1280*768, I am not sure, previewing it on a higher resolution makes it look correct, we have to change the hardcoded screen resolution numbers to Gdk. Screen. width() /some value to make it look the same |
OLPC XO was 1200x900 pixels. I've looked again and can't find anything that says that in this repository. My test VM is 1024x768 pixels. |
Yes @quozl the panorama activity is designed to look the best on 1200x900 resolution. If you try running it on a higher resolution, there will be still extra spaces below. I will try my best to use |
... -> PR 😄 |
Tested Coverage - 98%
Known Issues:
The pygame uses hardcoded screen sizes. However, it would be working on all screens above
800x600
which was already an issue which existed on the master branch too. See #12Self-reviewed according to Review Guidelines. All tests passed