Still need to run SDL 1.2 with PyGame ? 2019?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Still need to run SDL 1.2 with PyGame ? 2019?

by goose2000 on Mon Jan 07, 2019 5:46 pm

Hi, been working hard with the info on this page:
https://learn.adafruit.com/adafruit-2-8 ... ygame-tips

I am running a stretch lite image on my Pi Zero W , I've been able to install and get some of the examples and get pigameui demos to run. My trouble is still with getting the mouse/touch to go the right way, it is still all reversed x and y axis when I touch, drag around. Why is this so difficult ? Any tips on flipping these right? I have configured my config.txt to run :


This helped on some scripts, but not the pigameui stuff - it is guided by some other God. And as the title asked, is it still needed to downgrade to SDL 1.2 ? See, I am trying to build a more up-to-date install; the working images you provide are really just too old (2016), no python3, I need a TFT touchscreen platform that is a little more future proof.

Thanks for ideas (little screen is very cool)
Posts: 5
Joined: Thu Aug 30, 2012 11:06 am

Re: Still need to run SDL 1.2 with PyGame ? 2019?

by BroMarduk on Fri Feb 01, 2019 10:43 am

(FYI, @goose2000, I know you already know this since you have been posting in GitHub, but wanted to capture some points in this thread)

The latest Stretch is no longer compatible with the Capacitive touch screen and pygame, even with the SDL downgrade. (at least that is what I found)

I believe the online documentation has been updated to reflect this.

Here are the recommendations with some notes

You need to install evdev for python pip install evdev or pip3 install evdev depending on your Python version

You need something to handle EVDEV events yourself or use one of the working EVDEV event queues which handle much of the logic for you


Then you need code that converts the EVDEV queue to pygame events. Here is one such library.


Full disclosure, I've been contributing to all of these libraries over the past few weeks. An effort is going on to add resistive support in the pigamedrv forks as well so that it will no longer need the SDL downgrades.

Posts: 26
Joined: Sun Jun 12, 2016 10:19 pm

Please be positive and constructive with your questions and comments.