README-raspberrypi.txt
author Gabriel Jacobo <gabomdq@gmail.com>
Thu, 03 Oct 2013 10:28:10 -0300
changeset 7778 a571a9947869
parent 7753 e4c38f17bfad
child 7806 03e6aaea8347
permissions -rw-r--r--
SDL_TEXTINPUT support for EVDEV
     1 ================================================================================
     2 SDL2 for Raspberry Pi
     3 ================================================================================
     4 
     5 Requirements:
     6 
     7 Raspbian (other Linux distros may work as well).
     8 
     9 ================================================================================
    10  Features
    11 ================================================================================
    12 
    13 * Works without X11
    14 * Hardware accelerated OpenGL ES 2.x
    15 * Sound via ALSA
    16 * Input (mouse/keyboard/joystick) via EVDEV
    17 * Hotplugging of input devices via UDEV
    18 
    19 ================================================================================
    20  Raspbian Build Dependencies
    21 ================================================================================
    22 
    23 sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev
    24 
    25 You also need the VideoCore binary stuff that ships in /opt/vc for EGL and 
    26 OpenGL ES 2.x, it usually comes pre installed, but in any case:
    27     
    28 sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
    29 
    30 ================================================================================
    31  No input
    32 ================================================================================
    33 
    34 Make sure you belong to the "input" group.
    35 
    36     sudo usermod -aG input `whoami`
    37 
    38 ================================================================================
    39  No HDMI Audio
    40 ================================================================================
    41 
    42 If you notice that ALSA works but there's no audio over HDMI, try adding:
    43     
    44     hdmi_drive=2
    45     
    46 to your config.txt file and reboot.
    47 
    48 Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062
    49 
    50 ================================================================================
    51  Text Input API support
    52 ================================================================================
    53 
    54 The Text Input API is supported, with translation of scan codes done via the
    55 kernel symbol tables. For this to work, SDL needs access to a valid console.
    56 If you notice there's no SDL_TEXTINPUT message being emmited, double check that
    57 your app has read access to one of the following:
    58     
    59 * /proc/self/fd/0
    60 * /dev/tty
    61 * /dev/tty[0...6]
    62 * /dev/vc/0
    63 * /dev/console
    64 
    65 This is usually not a problem if you run from the physical terminal (as opposed
    66 to running from a pseudo terminal, such as via SSH). If running from a PTS, a 
    67 quick workaround is to run your app as root or add yourself to the tty group,
    68 then re login to the system.
    69 
    70    sudo usermod -aG tty `whoami`
    71     
    72 The keyboard layout used by SDL is the same as the one the kernel uses.
    73 To configure the layout on Raspbian:
    74     
    75     sudo dpkg-reconfigure keyboard-configuration
    76     
    77 To configure the locale, which controls which keys are interpreted as letters,
    78 this determining the CAPS LOCK behavior:
    79 
    80     sudo dpkg-reconfigure locales
    81 
    82 ================================================================================
    83  Notes
    84 ================================================================================
    85 
    86 * Building has only been tested natively (i.e. not cross compiled). Cross
    87   compilation might work though, feedback is welcome!