Removed SDL_AndroidOpenURL, added SDL_OpenURL.

Still needs to be wired into Xcode and Visual Studio projects.
This commit is contained in:
Ryan C. Gordon
2020-10-05 11:30:33 -04:00
parent a70bb58d4b
commit 77c9d73b63
22 changed files with 517 additions and 22 deletions

View File

@@ -37,6 +37,8 @@ extern "C" {
#include "SDL_bframebuffer.h"
#include "SDL_bevents.h"
#include <Url.h>
/* FIXME: Undefined functions */
// #define HAIKU_PumpEvents NULL
#define HAIKU_StartTextInput NULL
@@ -193,6 +195,15 @@ void HAIKU_VideoQuit(_THIS)
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