dominus

Untitled

Oct 13th, 2020
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. diff --git a/exultmenu.cc b/exultmenu.cc
  2. index d9e2292c..633a1d2d 100644
  3. --- a/exultmenu.cc
  4. +++ b/exultmenu.cc
  5. @@ -394,7 +394,11 @@ BaseGameInfo *ExultMenu::run() {
  6. throw quit_exception(1);
  7. #else
  8. // Never quits because Apple doesn't allow you to.
  9. +#if SDL_VERSION_ATLEAST(2,0,13)
  10. + SDL_OpenURL("http://exult.sourceforge.net/docs.php#ios_games");
  11. +#else
  12. ios_open_url("http://exult.sourceforge.net/docs.php#ios_games");
  13. +#endif
  14. while (1) {
  15. wait_delay(1000);
  16. }
  17. @@ -486,7 +490,11 @@ BaseGameInfo *ExultMenu::run() {
  18. break;
  19. case -1: // Exit
  20. #ifdef __IPHONEOS__
  21. +#if SDL_VERSION_ATLEAST(2,0,13)
  22. + SDL_OpenURL("http://exult.sourceforge.net/docs.php#iOS%20Guide");
  23. +#else
  24. ios_open_url("http://exult.sourceforge.net/docs.php#iOS%20Guide");
  25. +#endif
  26. break;
  27. #else
  28. gpal->fade_out(c_fade_out_time);
  29. diff --git a/ios/ios_utils.mm b/ios/ios_utils.mm
  30. index f6e7457d..3bc87141 100644
  31. --- a/ios/ios_utils.mm
  32. +++ b/ios/ios_utils.mm
  33. @@ -257,8 +257,11 @@ const char* ios_get_documents_dir()
  34. return docs_dir;
  35. }
  36.  
  37. +/* not needed for SDL 2.0.13 because of SDL_OpenURL()*/
  38. +#if !SDL_VERSION_ATLEAST(2,0,13)
  39. void ios_open_url(const char *sUrl)
  40. {
  41. NSURL *url = [NSURL URLWithString:[NSString stringWithUTF8String:sUrl]];
  42. [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
  43. }
  44. +#endif
  45.  
Add Comment
Please, Sign In to add comment