mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
sandbox: Fix quiting when the LCD window is closed
With recent changes to how sandbox handles reset, closing the window currently just restarts sandbox. Use the correct sysreset type to tell it to shut down. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
def898c458
commit
06d3414ac7
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
#include <sysreset.h>
|
||||
#include <linux/input.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <asm/state.h>
|
||||
|
@ -81,7 +82,7 @@ static void sandbox_sdl_poll_events(void)
|
|||
switch (event.type) {
|
||||
case SDL_QUIT:
|
||||
puts("LCD window closed - quitting\n");
|
||||
reset_cpu();
|
||||
sysreset_walk(SYSRESET_POWER_OFF);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue