From a58beade0a4f5342f5dcd3b3a597f9183de92260 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Thu, 27 Sep 2012 09:49:29 -0400 Subject: Port reboot functions to C++ --- gui/action.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'gui') diff --git a/gui/action.cpp b/gui/action.cpp index d63693440..7d6686121 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -27,7 +27,6 @@ extern "C" { #include "../common.h" -#include "../tw_reboot.h" #include "../minuitwrp/minui.h" #include "../recovery_ui.h" #include "../extra-functions.h" @@ -314,16 +313,16 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) sync(); - if (arg == "recovery") - tw_reboot(rb_recovery); - else if (arg == "poweroff") - tw_reboot(rb_poweroff); - else if (arg == "bootloader") - tw_reboot(rb_bootloader); - else if (arg == "download") - tw_reboot(rb_download); - else - tw_reboot(rb_system); + if (arg == "recovery") + TWFunc::tw_reboot(rb_recovery); + else if (arg == "poweroff") + TWFunc::tw_reboot(rb_poweroff); + else if (arg == "bootloader") + TWFunc::tw_reboot(rb_bootloader); + else if (arg == "download") + TWFunc::tw_reboot(rb_download); + else + TWFunc::tw_reboot(rb_system); // This should never occur return -1; @@ -1051,7 +1050,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) ui_print("Processing OpenRecoveryScript file...\n"); if (OpenRecoveryScript::run_script_file() == 0) { usleep(2000000); // Sleep for 2 seconds before rebooting - tw_reboot(rb_system); + TWFunc::tw_reboot(rb_system); load_theme = 0; } } -- cgit v1.2.3