Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 741eba11acc1
Choose a base ref
...
head repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 49facfc05cce
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 8, 2020

  1. Copy the full SHA
    9c8e1f7 View commit details
  2. boot/gui: Use mruby that will splice

    Using `loader.mruby` will not splice :(
    samueldr committed Mar 8, 2020
    Copy the full SHA
    8fad3b2 View commit details
  3. Merge pull request #92 from samueldr-wip/feature/boot-gui/vt-restore

    boot/gui: Fix console restoring on exit
    samueldr authored Mar 8, 2020
    Copy the full SHA
    49facfc View commit details
Showing with 14 additions and 14 deletions.
  1. +12 −13 boot/gui/main.rb
  2. +2 −1 boot/gui/simulator.nix
25 changes: 12 additions & 13 deletions boot/gui/main.rb
Original file line number Diff line number Diff line change
@@ -289,24 +289,23 @@ def run(*cmd)

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

# Main loop
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)
3 changes: 2 additions & 1 deletion boot/gui/simulator.nix
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
, lib
, callPackage
, mrbgems
, mruby
}:

let
@@ -20,7 +21,7 @@ stdenv.mkDerivation {
src = lib.cleanSource ./.;

nativeBuildInputs = [
loader.mruby
mruby
];

buildPhase = ''