From dec7875a6e23212021e4d9080330a42832dfe02a Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 15 Jun 2021 01:40:19 +0000
Subject: [PATCH] update SDL soruce to 2.0.14
---
source/src/video/haiku/SDL_bvideo.cc | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/source/src/video/haiku/SDL_bvideo.cc b/source/src/video/haiku/SDL_bvideo.cc
index 9071df5..817fccf 100644
--- a/source/src/video/haiku/SDL_bvideo.cc
+++ b/source/src/video/haiku/SDL_bvideo.cc
@@ -37,6 +37,8 @@
#include "SDL_bframebuffer.h"
#include "SDL_bevents.h"
+#include <Url.h>
+
/* FIXME: Undefined functions */
// #define HAIKU_PumpEvents NULL
#define HAIKU_StartTextInput NULL
@@ -124,7 +126,7 @@
VideoBootStrap HAIKU_bootstrap = {
"haiku", "Haiku graphics",
- HAIKU_Available, HAIKU_CreateDevice
+ HAIKU_CreateDevice
};
void HAIKU_DeleteDevice(SDL_VideoDevice * device)
@@ -185,11 +187,6 @@
return (0);
}
-int HAIKU_Available(void)
-{
- return (1);
-}
-
void HAIKU_VideoQuit(_THIS)
{
@@ -198,6 +195,15 @@
SDL_QuitBeApp();
}
+// just sticking this function in here so it's in a C++ source file.
+extern "C" { int HAIKU_OpenURL(const char *url); }
+int HAIKU_OpenURL(const char *url)
+{
+ BUrl burl(url);
+ const status_t rc = burl.OpenWithPreferredApplication(false);
+ return (rc == B_NO_ERROR) ? 0 : SDL_SetError("URL open failed (err=%d)", (int) rc);
+}
+
#ifdef __cplusplus
}
#endif
--
Gitblit v1.9.3