Kaynağa Gözat

haiku: Always assume that the URL is encoded (required on nightly) (#15305)

nilFinx 5 gün önce
ebeveyn
işleme
f3a3b4b95a

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

@@ -25,7 +25,11 @@
 
 
 bool SDL_SYS_OpenURL(const char *url)
 bool SDL_SYS_OpenURL(const char *url)
 {
 {
+#if B_BEOS_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);
     if (rc != B_NO_ERROR) {
     if (rc != B_NO_ERROR) {
         return SDL_SetError("URL open failed (err=%d)", (int)rc);
         return SDL_SetError("URL open failed (err=%d)", (int)rc);

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

@@ -316,7 +316,11 @@ void HAIKU_VideoQuit(SDL_VideoDevice *_this)
 extern "C"
 extern "C"
 bool HAIKU_OpenURL(const char *url)
 bool 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);
     if (rc != B_NO_ERROR) {
     if (rc != B_NO_ERROR) {
         return SDL_SetError("URL open failed (err=%d)", (int)rc);
         return SDL_SetError("URL open failed (err=%d)", (int)rc);