early-access version 1667

This commit is contained in:
pineappleEA
2021-05-09 11:30:38 +02:00
parent 5e268d25d7
commit 5dbb928ff2
1069 changed files with 38272 additions and 14437 deletions

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -36,6 +36,11 @@
#include "SDL_waylanddyn.h"
/* FIXME: This is arbitrary, but we want this to be less than a frame because
* any longer can potentially spin an infinite loop of PumpEvents (!)
*/
#define PIPE_MS_TIMEOUT 10
static ssize_t
write_pipe(int fd, const void* buffer, size_t total_length, size_t *pos)
{
@@ -47,7 +52,7 @@ write_pipe(int fd, const void* buffer, size_t total_length, size_t *pos)
sigset_t old_sig_set;
struct timespec zerotime = {0};
ready = SDL_IOReady(fd, SDL_TRUE, 1 * 1000);
ready = SDL_IOReady(fd, SDL_TRUE, PIPE_MS_TIMEOUT);
sigemptyset(&sig_set);
sigaddset(&sig_set, SIGPIPE);
@@ -93,7 +98,7 @@ read_pipe(int fd, void** buffer, size_t* total_length, SDL_bool null_terminate)
ssize_t bytes_read = 0;
size_t pos = 0;
ready = SDL_IOReady(fd, SDL_FALSE, 1 * 1000);
ready = SDL_IOReady(fd, SDL_FALSE, PIPE_MS_TIMEOUT);
if (ready == 0) {
bytes_read = SDL_SetError("Pipe timeout");
@@ -204,7 +209,7 @@ mime_data_list_add(struct wl_list* list,
} else {
WAYLAND_wl_list_insert(list, &(mime_data->link));
mime_type_length = strlen(mime_type) + 1;
mime_type_length = SDL_strlen(mime_type) + 1;
mime_data->mime_type = SDL_malloc(mime_type_length);
if (mime_data->mime_type == NULL) {
status = SDL_OutOfMemory();