early-access version 1667
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_displayevents.c
vendored
2
externals/SDL/src/events/SDL_displayevents.c
vendored
@@ -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
|
||||
|
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_dropevents.c
vendored
2
externals/SDL/src/events/SDL_dropevents.c
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_dropevents_c.h
vendored
2
externals/SDL/src/events/SDL_dropevents_c.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_events.c
vendored
2
externals/SDL/src/events/SDL_events.c
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_events_c.h
vendored
2
externals/SDL/src/events/SDL_events_c.h
vendored
@@ -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
|
||||
|
6
externals/SDL/src/events/SDL_gesture.c
vendored
6
externals/SDL/src/events/SDL_gesture.c
vendored
@@ -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
|
||||
@@ -487,7 +487,9 @@ int SDL_GestureDelTouch(SDL_TouchID touchId)
|
||||
SDL_zero(SDL_gestureTouch[i]);
|
||||
|
||||
SDL_numGestureTouches--;
|
||||
SDL_memcpy(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches], sizeof(SDL_gestureTouch[i]));
|
||||
if (i != SDL_numGestureTouches) {
|
||||
SDL_memcpy(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches], sizeof(SDL_gestureTouch[i]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
2
externals/SDL/src/events/SDL_gesture_c.h
vendored
2
externals/SDL/src/events/SDL_gesture_c.h
vendored
@@ -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
externals/SDL/src/events/SDL_keyboard.c
vendored
36
externals/SDL/src/events/SDL_keyboard.c
vendored
@@ -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
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
/* General keyboard handling code for SDL */
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_events_c.h"
|
||||
@@ -536,27 +537,12 @@ SDL_UCS4ToUTF8(Uint32 ch, char *dst)
|
||||
p[1] = 0x80 | (Uint8) ((ch >> 6) & 0x3F);
|
||||
p[2] = 0x80 | (Uint8) (ch & 0x3F);
|
||||
dst += 3;
|
||||
} else if (ch <= 0x1FFFFF) {
|
||||
} else {
|
||||
p[0] = 0xF0 | (Uint8) ((ch >> 18) & 0x07);
|
||||
p[1] = 0x80 | (Uint8) ((ch >> 12) & 0x3F);
|
||||
p[2] = 0x80 | (Uint8) ((ch >> 6) & 0x3F);
|
||||
p[3] = 0x80 | (Uint8) (ch & 0x3F);
|
||||
dst += 4;
|
||||
} else if (ch <= 0x3FFFFFF) {
|
||||
p[0] = 0xF8 | (Uint8) ((ch >> 24) & 0x03);
|
||||
p[1] = 0x80 | (Uint8) ((ch >> 18) & 0x3F);
|
||||
p[2] = 0x80 | (Uint8) ((ch >> 12) & 0x3F);
|
||||
p[3] = 0x80 | (Uint8) ((ch >> 6) & 0x3F);
|
||||
p[4] = 0x80 | (Uint8) (ch & 0x3F);
|
||||
dst += 5;
|
||||
} else {
|
||||
p[0] = 0xFC | (Uint8) ((ch >> 30) & 0x01);
|
||||
p[1] = 0x80 | (Uint8) ((ch >> 24) & 0x3F);
|
||||
p[2] = 0x80 | (Uint8) ((ch >> 18) & 0x3F);
|
||||
p[3] = 0x80 | (Uint8) ((ch >> 12) & 0x3F);
|
||||
p[4] = 0x80 | (Uint8) ((ch >> 6) & 0x3F);
|
||||
p[5] = 0x80 | (Uint8) (ch & 0x3F);
|
||||
dst += 6;
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
@@ -799,6 +785,22 @@ SDL_SendKeyboardKeyInternal(Uint8 source, Uint8 state, SDL_Scancode scancode)
|
||||
event.key.windowID = keyboard->focus ? keyboard->focus->id : 0;
|
||||
posted = (SDL_PushEvent(&event) > 0);
|
||||
}
|
||||
|
||||
/* If the keyboard is grabbed and the grabbed window is in full-screen,
|
||||
minimize the window when we receive Alt+Tab, unless the application
|
||||
has explicitly opted out of this behavior. */
|
||||
if (keycode == SDLK_TAB &&
|
||||
state == SDL_PRESSED &&
|
||||
(keyboard->modstate & KMOD_ALT) &&
|
||||
keyboard->focus &&
|
||||
(keyboard->focus->flags & SDL_WINDOW_KEYBOARD_GRABBED) &&
|
||||
(keyboard->focus->flags & SDL_WINDOW_FULLSCREEN) &&
|
||||
SDL_GetHintBoolean(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, SDL_TRUE)) {
|
||||
/* We will temporarily forfeit our grab by minimizing our window,
|
||||
allowing the user to escape the application */
|
||||
SDL_MinimizeWindow(keyboard->focus);
|
||||
}
|
||||
|
||||
return (posted);
|
||||
}
|
||||
|
||||
|
2
externals/SDL/src/events/SDL_keyboard_c.h
vendored
2
externals/SDL/src/events/SDL_keyboard_c.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_mouse.c
vendored
2
externals/SDL/src/events/SDL_mouse.c
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_mouse_c.h
vendored
2
externals/SDL/src/events/SDL_mouse_c.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_quit.c
vendored
2
externals/SDL/src/events/SDL_quit.c
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_sysevents.h
vendored
2
externals/SDL/src/events/SDL_sysevents.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_touch.c
vendored
2
externals/SDL/src/events/SDL_touch.c
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_touch_c.h
vendored
2
externals/SDL/src/events/SDL_touch_c.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/SDL_windowevents.c
vendored
2
externals/SDL/src/events/SDL_windowevents.c
vendored
@@ -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
|
||||
|
@@ -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
|
||||
|
2
externals/SDL/src/events/blank_cursor.h
vendored
2
externals/SDL/src/events/blank_cursor.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/default_cursor.h
vendored
2
externals/SDL/src/events/default_cursor.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/scancodes_darwin.h
vendored
2
externals/SDL/src/events/scancodes_darwin.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/scancodes_linux.h
vendored
2
externals/SDL/src/events/scancodes_linux.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/scancodes_windows.h
vendored
2
externals/SDL/src/events/scancodes_windows.h
vendored
@@ -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
|
||||
|
2
externals/SDL/src/events/scancodes_xfree86.h
vendored
2
externals/SDL/src/events/scancodes_xfree86.h
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user