diff options
| author | 2019-03-04 18:24:16 -0500 | |
|---|---|---|
| committer | 2019-03-04 18:26:28 -0500 | |
| commit | 4130b07f88a2c23118503dbdad28fa8ef1fb8ccb (patch) | |
| tree | fbaead4c77255ae13879820bd79cc12a62e056d9 | |
| parent | Merge pull request #2165 from ReinUsesLisp/unbind-tex (diff) | |
| download | yuzu-4130b07f88a2c23118503dbdad28fa8ef1fb8ccb.tar.gz yuzu-4130b07f88a2c23118503dbdad28fa8ef1fb8ccb.tar.xz yuzu-4130b07f88a2c23118503dbdad28fa8ef1fb8ccb.zip | |
web_browser: Add shortcut to Enter key to exit applet
Addresses issues where a user in fullscreen could not exit some web applets without leaving fullscreen.
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"( | |||
| 56 | window.nx.endApplet = function() { | 56 | window.nx.endApplet = function() { |
| 57 | applet_done = true; | 57 | applet_done = true; |
| 58 | }; | 58 | }; |
| 59 | |||
| 60 | window.onkeypress = function(e) { if (e.keyCode === 13) { applet_done = true; } }; | ||
| 59 | )"; | 61 | )"; |
| 60 | 62 | ||
| 61 | QString GetNXShimInjectionScript() { | 63 | QString GetNXShimInjectionScript() { |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 5ab7896d4..619cbd2c2 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -339,6 +339,11 @@ void GMainWindow::WebBrowserOpenPage(std::string_view filename, std::string_view | |||
| 339 | .arg(QString::fromStdString(std::to_string(key_code)))); | 339 | .arg(QString::fromStdString(std::to_string(key_code)))); |
| 340 | }; | 340 | }; |
| 341 | 341 | ||
| 342 | QMessageBox::information( | ||
| 343 | this, tr("Exit"), | ||
| 344 | tr("To exit the web application, use the game provided controls to select exit, select the " | ||
| 345 | "'Exit Web Applet' option in the menu bar, or press the 'Enter' key.")); | ||
| 346 | |||
| 342 | bool running_exit_check = false; | 347 | bool running_exit_check = false; |
| 343 | while (!finished) { | 348 | while (!finished) { |
| 344 | QApplication::processEvents(); | 349 | QApplication::processEvents(); |