Skip to content
forked from Ryzee119/lvgl-sdl

A crossplatform SDL wrapper for the Light and Versatile Graphics Library https://lvgl.io/.

License

Notifications You must be signed in to change notification settings

MakeMHz/lvgl-sdl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lvgl-sdl

Linux Windows Xbox

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, and dirent.h for Linux.
  • Cross platform. Currently supports Windows, Linux and Original Xbox!

Include in your project

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 from example/ folder next to the lvgl-sdl directory in your project.
  • See the example for usage and required initialisation functions etc.

Or build the examples

  • 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.

Build (Linux)

apt install libsdl2-dev
cd example/
mkdir build
cd build
cmake ..
make
./lvgl_example

Build (Windows)

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

Build (Original Xbox)

Setup and install nxdk.

cd example/
make -f Makefile.nxdk NXDK_DIR=/path/to/nxdk

Images

example1

example2

example3

About

A crossplatform SDL wrapper for the Light and Versatile Graphics Library https://lvgl.io/.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.8%
  • CMake 10.2%