diff --git a/native/include/lua/runtime.h b/native/include/lua/runtime.h index b9bafd1..b914495 100644 --- a/native/include/lua/runtime.h +++ b/native/include/lua/runtime.h @@ -70,6 +70,9 @@ class Runtime { void requestLaunch(const std::string& path, const std::string& arg, bool replace); void requestBack(); bool hasPendingNavigation() const { return pending_.kind != Pending::None; } + // Whether sys.back() would return somewhere rather than land on the launcher, which is what + // firmware chrome needs to decide whether to offer a back control. + bool canGoBack() const { return !history_.empty(); } // Loads whatever was requested. False means the app failed to start or history ran out at the // launcher, in which case no app is running. bool applyPendingNavigation();