A crossplatform SDL wrapper for the Light and Versatile Graphics Library https://lvgl.io/.
- SDL2 video backend.
- SDL gamecontroller and keyboard input driver.
- Filesystem driver uses
stdio.h
for file access. - Supports directory listings with
windows.h
winapi for Windows, anddirent.h
for Linux. - Cross platform. Currently supports Windows, Linux and Original Xbox!
In your git repo:
git submodule add https://github.com/Ryzee119/lvgl-sdl.git
cd lvgl-sdl && git submodule init && git submodule update
- See the example CMakeLists.txt for the required directories to include in your build system.
- Copy
lv_conf.h
fromexample/
folder next to the lvgl-sdl directory in your project. - See the example for usage and required initialisation functions etc.
- Pre-built binaries can be downloaded from the Actions page as artifacts. These just run the default example.
- For manual compiling you can edit
lv_ex_conf.h
to change which demo to run. - Remember to clone this repo recusively i.e
git clone https://github.com/Ryzee119/lvgl-sdl.git --recursive
.
apt install libsdl2-dev
cd example/
mkdir build
cd build
cmake ..
make
./lvgl_example
Install MYSYS2, then from a mingw64 environment:
pacman -S mingw-w64-x86_64-make \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-SDL2
cd example/
mkdir build && cd build
cmake .. -G "MinGW Makefiles"
cmake --build .
./lvgl_example.exe
Setup and install nxdk.
cd example/
make -f Makefile.nxdk NXDK_DIR=/path/to/nxdk