mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 19:23:01 +03:00
Merge pull request #92 from samueldr-wip/feature/boot-gui/vt-restore
boot/gui: Fix console restoring on exit
This commit is contained in:
commit
49facfc05c
@ -289,15 +289,18 @@ end
|
||||
|
||||
if File.exist?(SELECTIONS)
|
||||
JSON.parse(File.read(SELECTIONS)).each do |selection|
|
||||
ui.button(selection["name"], page: :generations).tap do |btn|
|
||||
btn.event_handler = ->(event) do
|
||||
case event
|
||||
when LVGL::EVENT::CLICKED
|
||||
File.write("/run/boot/choice", selection["id"])
|
||||
exit 0
|
||||
end
|
||||
end
|
||||
end
|
||||
ui.button(selection["name"], page: :generations).tap do |btn|
|
||||
btn.event_handler = ->(event) do
|
||||
case event
|
||||
when LVGL::EVENT::CLICKED
|
||||
File.write("/run/boot/choice", selection["id"])
|
||||
|
||||
# Put back the console on the framebuffer
|
||||
VTConsole.map_console(1)
|
||||
exit 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -305,8 +308,4 @@ end
|
||||
while true
|
||||
LVGL::Hacks::LVTask.handle_tasks
|
||||
sleep(1.0/REFRESH_RATE)
|
||||
# TODO : Allow exiting!
|
||||
end
|
||||
|
||||
# Put back the console on the framebuffer
|
||||
VTConsole.map_console(1)
|
||||
|
@ -2,6 +2,7 @@
|
||||
, lib
|
||||
, callPackage
|
||||
, mrbgems
|
||||
, mruby
|
||||
}:
|
||||
|
||||
let
|
||||
@ -20,7 +21,7 @@ stdenv.mkDerivation {
|
||||
src = lib.cleanSource ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
loader.mruby
|
||||
mruby
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
|
Loading…
Reference in New Issue
Block a user