This commit is contained in:
Sasha Szpakowski
2024-10-17 23:10:10 -03:00
parent 8c52dce565
commit 7ca40027e0
224 changed files with 8872 additions and 6448 deletions
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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();
}
+1
View File
@@ -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,
+1 -2
View File
@@ -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";
-47
View File
@@ -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;
}
-37
View File
@@ -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
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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"