| Ligne 28 : |
Ligne 28 : |
| | '''Assurez-vous de bien utiliser la SDL 1.2''' | | '''Assurez-vous de bien utiliser la SDL 1.2''' |
| | | | |
| − | xxx
| + | SDL 2.x et SDL 1.2.15-10 ont quelques sérieuses incompatibilités avec l'écran tactile. Vous pouvez forcer l'utilisation de la SDL 1.2 en exécutant le script suivant. ([https://forums.adafruit.com/viewtopic.php?f=47&t=76169&p=439894#p435225 Merci à heine, dans le Forums Adafruit]!) |
| | | | |
| | + | Editer un nouveau fichier avec {{fname|sudo nano installsdl.sh}} |
| | + | |
| | + | et copier le texte suivant à l'intérieur: |
| | + | |
| | + | <syntaxhighlight lang="bash"> |
| | + | #!/bin/bash |
| | + | |
| | + | #enable wheezy package sources |
| | + | echo "deb http://archive.raspbian.org/raspbian wheezy main |
| | + | " > /etc/apt/sources.list.d/wheezy.list |
| | + | |
| | + | #set stable as default package source (currently jessie) |
| | + | echo "APT::Default-release \"stable\"; |
| | + | " > /etc/apt/apt.conf.d/10defaultRelease |
| | + | |
| | + | #set the priority for libsdl from wheezy higher then the jessie package |
| | + | echo "Package: libsdl1.2debian |
| | + | Pin: release n=jessie |
| | + | Pin-Priority: -10 |
| | + | Package: libsdl1.2debian |
| | + | Pin: release n=wheezy |
| | + | Pin-Priority: 900 |
| | + | " > /etc/apt/preferences.d/libsdl |
| | + | |
| | + | #install |
| | + | apt-get update |
| | + | apt-get -y --force-yes install libsdl1.2debian/wheezy |
| | + | </syntaxhighlight> |
| | + | |
| | + | Ensuite, exécutez les commandes suivantes: |
| | + | |
| | + | sudo chmod +x installsdl.sh |
| | + | sudo ./installsdl.sh |
| | + | |
| | + | {{ADFImage|RASP-PiTFT-Pygame-20.jpg}} |
| | + | |
| | + | Ce qui force l'installation de la SDL 1.2 |
| | + | |
| | + | {{ADFImage|RASP-PiTFT-Pygame-21.jpg}} |
| | + | |
| | + | OK '''maintenant''' vous pouvez continuer à utiliser pygame |
| | | | |
| | {{RASP-PiTFT-TRAILER}} | | {{RASP-PiTFT-TRAILER}} |