PySDL2, directfb on /dev/fb1

Issue #96 wontfix
Yann MORERE
created an issue

Hi,

I'm trying to use PySDL2 on a tft DPI screen (on a raspberry pi) with directfb. The screen is located on /dev/fb1. SDL2 was compiled with directfb enabled. a SDL2 program written in C works and display on /dev/fb1 with the following line

./testSDL2 --dfb:fbdev=/dev/fb1 --dfb:system=sdl

or

FRAMEBUFFER=/dev/fb1 ./testSDL2

when I try to use a a PySDL2 program in the same way I got this error :

FRAMEBUFFER=/dev/fb1 python testSDL2.py

Traceback (most recent call last): File "testSDL2.py", line 6, in <module> sdl2.ext.init() File "/usr/local/lib/python2.7/dist-packages/sdl2/ext/common.py", line 44, in init raise SDLError() sdl2.ext.common.SDLError: 'No available video device'

python testSDL2.py --dfb:fbdev=/dev/fb1 --dfb:system=sdl

Traceback (most recent call last): File "testSDL2.py", line 6, in <module> sdl2.ext.init() File "/usr/local/lib/python2.7/dist-packages/sdl2/ext/common.py", line 44, in init raise SDLError() sdl2.ext.common.SDLError: 'No available video device'

here is my program :

import sys import sdl2.ext

RESOURCES = sdl2.ext.Resources(file, "resources")

sdl2.ext.init()

window = sdl2.ext.Window("Hello World!", size=(480, 320)) window.show()

factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE) sprite = factory.from_image(RESOURCES.get_path("hello.bmp"))

spriterenderer = factory.create_sprite_render_system(window) spriterenderer.render(sprite) processor = sdl2.ext.TestEventProcessor() processor.run(window) sdl2.ext.quit()

Comments (4)

  1. Log in to comment