1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-04 21:18:28 +03:00

lvgui: Add basic assets path support

Still needed: actually providing a useful path
This commit is contained in:
Samuel Dionne-Riel 2021-06-10 20:54:09 -04:00
parent 61205f5e55
commit 6017552e1d

View File

@ -12,7 +12,7 @@ module LVGL::FFI
[:uint8_t, :once],
] # }}}
extern "void hal_init()"
extern "void hal_init(const char*)"
# TODO: begin/rescue DLError and assume failing is we're not in simulator.
if lv_introspection_is_simulator
@ -49,7 +49,7 @@ end
module LVGL::Hacks
def self.init()
LVGL::FFI.hal_init()
LVGL::FFI.hal_init(assets_path(""))
LVGL::FFI.lv_nanosvg_init()
end
@ -72,6 +72,10 @@ module LVGL::Hacks
)
end
def self.assets_path(asset_path)
File.join(".", asset_path)
end
module LVTask
# Temp hack...
# I need to figure out how to use Fiddle's #to_value to rehydrate an mruby