mirror of
https://github.com/love2d/megasource.git
synced 2026-08-20 20:50:52 +02:00
update SDL3 to libsdl-org/SDL@186c6e5
This commit is contained in:
@@ -146,8 +146,8 @@ const char *SDL_GetAndroidInternalStoragePath(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void *SDLCALL SDL_GetAndroidJNIEnv(void);
|
||||
void *SDL_GetAndroidJNIEnv(void)
|
||||
SDL_DECLSPEC JNIEnv *SDLCALL SDL_GetAndroidJNIEnv(void);
|
||||
JNIEnv *SDL_GetAndroidJNIEnv(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
|
||||
@@ -2177,7 +2177,7 @@ bool Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *b
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
void *SDL_GetAndroidJNIEnv(void)
|
||||
JNIEnv *SDL_GetAndroidJNIEnv(void)
|
||||
{
|
||||
return Android_JNI_GetEnv();
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ bool Android_JNI_OpenURL(const char *url);
|
||||
int SDL_GetAndroidSDKVersion(void);
|
||||
|
||||
bool SDL_IsAndroidTablet(void);
|
||||
bool SDL_IsAndroidTV(void);
|
||||
|
||||
// File Dialogs
|
||||
bool Android_JNI_OpenFileDialog(SDL_DialogFileCallback callback, void* userdata,
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
#include "SDL_dbus.h"
|
||||
#include "SDL_sandbox.h"
|
||||
#include "../../stdlib/SDL_vacopy.h"
|
||||
|
||||
#ifdef SDL_USE_LIBDBUS
|
||||
@@ -443,7 +442,7 @@ bool SDL_DBus_ScreensaverInhibit(bool inhibit)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SDL_DetectSandbox() != SDL_SANDBOX_NONE) {
|
||||
if (SDL_GetSandbox() != SDL_SANDBOX_NONE) {
|
||||
const char *bus_name = "org.freedesktop.portal.Desktop";
|
||||
const char *path = "/org/freedesktop/portal/desktop";
|
||||
const char *interface = "org.freedesktop.portal.Inhibit";
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 2022 Collabora Ltd.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#include "SDL_sandbox.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
SDL_Sandbox SDL_DetectSandbox(void)
|
||||
{
|
||||
if (access("/.flatpak-info", F_OK) == 0) {
|
||||
return SDL_SANDBOX_FLATPAK;
|
||||
}
|
||||
|
||||
/* For Snap, we check multiple variables because they might be set for
|
||||
* unrelated reasons. This is the same thing WebKitGTK does. */
|
||||
if (SDL_getenv("SNAP") != NULL &&
|
||||
SDL_getenv("SNAP_NAME") != NULL &&
|
||||
SDL_getenv("SNAP_REVISION") != NULL) {
|
||||
return SDL_SANDBOX_SNAP;
|
||||
}
|
||||
|
||||
if (access("/run/host/container-manager", F_OK) == 0) {
|
||||
return SDL_SANDBOX_UNKNOWN_CONTAINER;
|
||||
}
|
||||
|
||||
return SDL_SANDBOX_NONE;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 2022 Collabora Ltd.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_SANDBOX_H
|
||||
#define SDL_SANDBOX_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_SANDBOX_NONE = 0,
|
||||
SDL_SANDBOX_UNKNOWN_CONTAINER,
|
||||
SDL_SANDBOX_FLATPAK,
|
||||
SDL_SANDBOX_SNAP,
|
||||
} SDL_Sandbox;
|
||||
|
||||
// Return the sandbox type currently in use, if any
|
||||
SDL_Sandbox SDL_DetectSandbox(void);
|
||||
|
||||
#endif // SDL_SANDBOX_H
|
||||
@@ -119,7 +119,7 @@ extern "C" {
|
||||
// Sets an error message based on a given HRESULT
|
||||
extern bool WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr);
|
||||
|
||||
// Sets an error message based on GetLastError(). Always return -1.
|
||||
// Sets an error message based on GetLastError(). Always returns false.
|
||||
extern bool WIN_SetError(const char *prefix);
|
||||
|
||||
// Load a function from combase.dll
|
||||
|
||||
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,1,3,0
|
||||
PRODUCTVERSION 3,1,3,0
|
||||
FILEVERSION 3,1,5,0
|
||||
PRODUCTVERSION 3,1,5,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS 0x40004L
|
||||
@@ -23,12 +23,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "SDL\0"
|
||||
VALUE "FileVersion", "3, 1, 3, 0\0"
|
||||
VALUE "FileVersion", "3, 1, 5, 0\0"
|
||||
VALUE "InternalName", "SDL\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2024 Sam Lantinga\0"
|
||||
VALUE "OriginalFilename", "SDL3.dll\0"
|
||||
VALUE "ProductName", "Simple DirectMedia Layer\0"
|
||||
VALUE "ProductVersion", "3, 1, 3, 0\0"
|
||||
VALUE "ProductVersion", "3, 1, 5, 0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Reference in New Issue
Block a user