diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -333,7 +333,9 @@ static const char *dataDir_App_(void) { | |||
333 | 333 | ||
334 | static const char *downloadDir_App_(void) { | 334 | static const char *downloadDir_App_(void) { |
335 | #if defined (iPlatformAndroidMobile) | 335 | #if defined (iPlatformAndroidMobile) |
336 | return concatPath_CStr(SDL_AndroidGetInternalStoragePath(), "Downloads"); | 336 | const char *dir = concatPath_CStr(SDL_AndroidGetExternalStoragePath(), "Downloads"); |
337 | makeDirs_Path(collectNewCStr_String(dir)); | ||
338 | return dir; | ||
337 | #endif | 339 | #endif |
338 | #if defined (iPlatformLinux) || defined (iPlatformOther) | 340 | #if defined (iPlatformLinux) || defined (iPlatformOther) |
339 | /* Parse user-dirs.dirs using the `xdg-user-dir` tool. */ | 341 | /* Parse user-dirs.dirs using the `xdg-user-dir` tool. */ |
@@ -1391,6 +1393,16 @@ void processEvents_App(enum iAppEventMode eventMode) { | |||
1391 | ev.key.keysym.mod = mapMods_Keys(ev.key.keysym.mod & ~KMOD_CAPS); | 1393 | ev.key.keysym.mod = mapMods_Keys(ev.key.keysym.mod & ~KMOD_CAPS); |
1392 | } | 1394 | } |
1393 | #if defined (iPlatformAndroidMobile) | 1395 | #if defined (iPlatformAndroidMobile) |
1396 | /* Use the system Back button to close panels, if they're open. */ | ||
1397 | if (ev.type == SDL_KEYDOWN && ev.key.keysym.sym == SDLK_AC_BACK) { | ||
1398 | SDL_UserEvent panelBackCmd = { .type = SDL_USEREVENT, | ||
1399 | .code = command_UserEventCode, | ||
1400 | .data1 = iDupStr("panel.close"), | ||
1401 | .data2 = d->window->base.keyRoot }; | ||
1402 | if (dispatchEvent_Window(&d->window->base, (SDL_Event *) &panelBackCmd)) { | ||
1403 | continue; /* Was handled by someone. */ | ||
1404 | } | ||
1405 | } | ||
1394 | /* Ignore all mouse events; just use touch. */ | 1406 | /* Ignore all mouse events; just use touch. */ |
1395 | if (ev.type == SDL_MOUSEBUTTONDOWN || | 1407 | if (ev.type == SDL_MOUSEBUTTONDOWN || |
1396 | ev.type == SDL_MOUSEBUTTONUP || | 1408 | ev.type == SDL_MOUSEBUTTONUP || |