Bläddra i källkod

Make BUrl not 'ambiguous'

Peppersawce 1 vecka sedan
förälder
incheckning
bacfd3c252
2 ändrade filer med 8 tillägg och 0 borttagningar
  1. 4 0
      src/misc/haiku/SDL_sysurl.cc
  2. 4 0
      src/video/haiku/SDL_bvideo.cc

+ 4 - 0
src/misc/haiku/SDL_sysurl.cc

@@ -24,7 +24,11 @@
 
 
 int SDL_SYS_OpenURL(const char *url)
 int SDL_SYS_OpenURL(const char *url)
 {
 {
+#if B_HAIKU_VERSION <= B_HAIKU_VERSION_1_BETA_5
     BUrl burl(url);
     BUrl burl(url);
+#else
+    BUrl burl(url, true);
+#endif
     const status_t rc = burl.OpenWithPreferredApplication(false);
     const status_t rc = burl.OpenWithPreferredApplication(false);
     return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int) rc);
     return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int) rc);
 }
 }

+ 4 - 0
src/video/haiku/SDL_bvideo.cc

@@ -305,7 +305,11 @@ void HAIKU_VideoQuit(_THIS)
 extern "C" { int HAIKU_OpenURL(const char *url); }
 extern "C" { int HAIKU_OpenURL(const char *url); }
 int HAIKU_OpenURL(const char *url)
 int HAIKU_OpenURL(const char *url)
 {
 {
+#if B_HAIKU_VERSION <= B_HAIKU_VERSION_1_BETA_5
     BUrl burl(url);
     BUrl burl(url);
+#else
+    BUrl burl(url, true);
+#endif
     const status_t rc = burl.OpenWithPreferredApplication(false);
     const status_t rc = burl.OpenWithPreferredApplication(false);
     return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int)rc);
     return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int)rc);
 }
 }