File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1212#include < emscripten/key_codes.h>
1313#include " include/osd.h"
1414#include " common/inet.h"
15- #include " common/smbas .h"
15+ #include " common/device .h"
1616#include " lib/maapi.h"
1717#include " ui/audio.h"
1818#include " ui/theme.h"
@@ -110,8 +110,9 @@ void Runtime::alert(const char *title, const char *message) {
110110}
111111
112112int Runtime::ask (const char *title, const char *prompt, bool cancel) {
113- int result = 0 ;
114- return result;
113+ return EM_ASM_INT ({
114+ return !window.confirm (UTF8ToString ($0 ) + " \n " + UTF8ToString ($1 ));
115+ }, title, prompt);
115116}
116117
117118void Runtime::browseFile (const char *url) {
@@ -333,6 +334,13 @@ void Runtime::processEvent(MAEvent &event) {
333334 case EVENT_TYPE_DN:
334335 _output->scroll (false , false );
335336 break ;
337+ case EVENT_TYPE_KEY_PRESSED:
338+ handleEvent (event);
339+ if (event.key != -1 && isRunning ()) {
340+ dev_pushkey (event.key );
341+ }
342+ break ;
343+
336344 default :
337345 handleEvent (event);
338346 break ;
@@ -343,6 +351,7 @@ void Runtime::runShell() {
343351 logEntered ();
344352 audio_open ();
345353 net_init ();
354+ chdir (" /basic" );
346355 while (1 ) {
347356 runMain (MAIN_BAS);
348357 }
You can’t perform that action at this time.
0 commit comments