diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-07 21:32:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 21:32:32 +0100 |
commit | 3b63a46ca4dd515ccbf376e9fb4a4afed077b616 (patch) | |
tree | 7acf0bc56ada3e429be14df66c1a5742f31f2d5d | |
parent | Merge pull request #2202 from lioncash/port-priv (diff) | |
parent | web_browser: Add shortcut to Enter key to exit applet (diff) | |
download | yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.tar yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.tar.gz yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.tar.bz2 yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.tar.lz yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.tar.xz yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.tar.zst yuzu-3b63a46ca4dd515ccbf376e9fb4a4afed077b616.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/applets/web_browser.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/yuzu/applets/web_browser.cpp b/src/yuzu/applets/web_browser.cpp index 6a9138d53..979b9ec14 100644 --- a/src/yuzu/applets/web_browser.cpp +++ b/src/yuzu/applets/web_browser.cpp @@ -56,6 +56,8 @@ constexpr char NX_SHIM_INJECT_SCRIPT[] = R"( window.nx.endApplet = function() { applet_done = true; }; + + window.onkeypress = function(e) { if (e.keyCode === 13) { applet_done = true; } }; )"; QString GetNXShimInjectionScript() { diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c6f3ab4e4..41ba3c4c6 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -340,6 +340,11 @@ void GMainWindow::WebBrowserOpenPage(std::string_view filename, std::string_view .arg(QString::fromStdString(std::to_string(key_code)))); }; + QMessageBox::information( + this, tr("Exit"), + tr("To exit the web application, use the game provided controls to select exit, select the " + "'Exit Web Applet' option in the menu bar, or press the 'Enter' key.")); + bool running_exit_check = false; while (!finished) { QApplication::processEvents(); |