Fix remaining typos (#7921)

* Fix remaining typos

Found via `codespell -q 3 -S *.hex,*.pdf,./src/libm,./src/hidapi,./src/stdlib/SDL_malloc.c,./src/video/x11/edid.h -L caf,currenty,datas,einstance,fo,hda,lod,mata,parm,parms,pevent,pevents,pixelx,requestor,ser,statics,te,texturers,thid,uscaled,windowz`
This commit is contained in:
luzpaz 2023-07-03 15:46:47 -04:00 committed by GitHub
parent 65e1d568ef
commit 37e567994d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 85 additions and 85 deletions

View File

@ -155,7 +155,7 @@ extern "C" {
* (A-Z, a-z, 0-9) plus underscore (_) and hyphen (-) and must not start
* with a digit. Note that hyphens, while technically allowed, should not be
* used if possible, as they are not supported by all components that use the ID,
* such as D-Bus. For maximum compatability, replace hyphens with an underscore.
* such as D-Bus. For maximum compatibility, replace hyphens with an underscore.
*
* - The empty string is not a valid element (ie: your application ID may not
* start or end with a period and it is not valid to have two periods in a row).
@ -1681,7 +1681,7 @@ extern "C" {
* By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
* context will be automatically saved and restored when pausing the application. Additionally, some
* platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
* behavior, which is desireable when the application manages the graphics context, such as
* behavior, which is desirable when the application manages the graphics context, such as
* an externally managed OpenGL context or attaching a Vulkan surface to the window.
*/
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
@ -2018,7 +2018,7 @@ extern "C" {
/**
* \brief Force SDL to use Critical Sections for mutexes on Windows.
* On Windows 7 and newer, Slim Reader/Writer Locks are available.
* They offer better performance, allocate no kernel ressources and
* They offer better performance, allocate no kernel resources and
* use less memory. SDL will fall back to Critical Sections on older
* OS versions or if forced to by this hint.
*
@ -2315,7 +2315,7 @@ extern "C" {
* This functionality has existed since SDL 2.0.0 (indeed, before that)
* but before 2.0.22 this was an environment variable only. In 2.0.22,
* it was upgraded to a full SDL hint, so you can set the environment
* variable as usual or programatically set the hint with SDL_SetHint,
* variable as usual or programmatically set the hint with SDL_SetHint,
* which won't propagate to child processes.
*
* The default value is unset, in which case SDL will try to figure out
@ -2338,7 +2338,7 @@ extern "C" {
* This functionality has existed since SDL 2.0.0 (indeed, before that)
* but before 2.0.22 this was an environment variable only. In 2.0.22,
* it was upgraded to a full SDL hint, so you can set the environment
* variable as usual or programatically set the hint with SDL_SetHint,
* variable as usual or programmatically set the hint with SDL_SetHint,
* which won't propagate to child processes.
*
* The default value is unset, in which case SDL will try to figure out

View File

@ -285,7 +285,7 @@ extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
#if defined(__WIN32__) || defined(__GDK__) || defined(__IOS__) || defined(__TVOS__) \
|| defined(__3DS__) || defined(__NGAGE__) || defined(__PS2__) || defined(__PSP__)
/* platforms whichs main (-equivalent) can be implemented in plain C */
/* platforms which main (-equivalent) can be implemented in plain C */
#include <SDL3/SDL_main_impl.h>
#elif defined(__WINRT__) /* C++ platforms */

View File

@ -85,7 +85,7 @@ extern __inline int _SDL_xadd_watcom(volatile int *a, int v);
of the function.
To generate the index of the lock we first shift by 3 bits to get
rid on the zero bits that result from 32 and 64 bit allignment of
rid on the zero bits that result from 32 and 64 bit alignment of
data. We then mask off all but 5 bits and use those 5 bits as an
index into the table.

View File

@ -26,7 +26,7 @@
#define SDL_ALSA_NON_BLOCKING 0
#endif
/* without the thread, you will detect devices on startup, but will not get futher hotplug events. But that might be okay. */
/* without the thread, you will detect devices on startup, but will not get further hotplug events. But that might be okay. */
#ifndef SDL_ALSA_HOTPLUG_THREAD
#define SDL_ALSA_HOTPLUG_THREAD 1
#endif

View File

@ -73,7 +73,7 @@ static void NETBSDAUDIO_Status(SDL_AudioDevice *_this)
"sample count : %i\n"
"EOF count : %i\n"
"paused : %s\n"
"error occured : %s\n"
"error occurred : %s\n"
"waiting : %s\n"
"active : %s\n"
"",

View File

@ -655,7 +655,7 @@ static void openslES_PlayDevice(SDL_AudioDevice *_this)
}
/* If Enqueue fails, callback won't be called.
* Post the semphore, not to run out of buffer */
* Post the semaphore, not to run out of buffer */
if (SL_RESULT_SUCCESS != result) {
SDL_PostSemaphore(audiodata->playsem);
}

View File

@ -30,7 +30,7 @@
#include <spa/utils/json.h>
/*
* The following keys are defined for compatability when building against older versions of Pipewire
* The following keys are defined for compatibility when building against older versions of Pipewire
* prior to their introduction and can be removed if the minimum required Pipewire build version is
* increased to or beyond their point of introduction.
*/

View File

@ -57,7 +57,7 @@ static int PSPAUDIO_OpenDevice(SDL_AudioDevice *_this, const char *devname)
_this->spec.format = SDL_AUDIO_S16LSB;
/* PSP has some limitations with the Audio. It fully supports 44.1KHz (Mono & Stereo),
however with frequencies differents than 44.1KHz, it just supports Stereo,
however with frequencies different than 44.1KHz, it just supports Stereo,
so a resampler must be done for these scenarios */
if (isBasicAudioConfig(&_this->spec)) {
/* The sample count must be a multiple of 64. */

View File

@ -112,7 +112,7 @@ static void QSA_WaitDevice(SDL_AudioDevice *_this)
int result;
/* Setup timeout for playing one fragment equal to 2 seconds */
/* If timeout occured than something wrong with hardware or driver */
/* If timeout occurred than something wrong with hardware or driver */
/* For example, Vortex 8820 audio driver stucks on second DAC because */
/* it doesn't exist ! */
result = SDL_IOReady(_this->hidden->audio_fd,
@ -123,7 +123,7 @@ static void QSA_WaitDevice(SDL_AudioDevice *_this)
SDL_SetError("QSA: SDL_IOReady() failed: %s", strerror(errno));
break;
case 0:
SDL_SetError("QSA: timeout on buffer waiting occured");
SDL_SetError("QSA: timeout on buffer waiting occurred");
_this->hidden->timeout_on_wait = 1;
break;
default:

View File

@ -155,7 +155,7 @@ static void kbd_unregister_emerg_cleanup()
continue;
}
/* Check if action installed and not modifed */
/* Check if action installed and not modified */
if (!(cur_action.sa_flags & SA_SIGINFO) || cur_action.sa_sigaction != &kbd_cleanup_signal_action) {
continue;
}

View File

@ -230,7 +230,7 @@ static void kbd_unregister_emerg_cleanup(void)
continue;
}
/* Check if action installed and not modifed */
/* Check if action installed and not modified */
if (!(cur_action.sa_flags & SA_SIGINFO) || cur_action.sa_sigaction != &kbd_cleanup_signal_action) {
continue;
}

View File

@ -504,7 +504,7 @@ void SDL_WinRTApp::OnVisibilityChanged(CoreWindow ^ sender, VisibilityChangedEve
}
// HACK: Prevent SDL's window-hide handling code, which currently
// triggers a fake window resize (possibly erronously), from
// triggers a fake window resize (possibly erroneously), from
// marking the SDL window's surface as invalid.
//
// A better solution to this probably involves figuring out if the

View File

@ -134,7 +134,7 @@ int SDL_WinRTInitXAMLApp(int (*mainFunction)(int, char **), void *backgroundPane
// CoreWindow. WinRT will not allow the app's CoreWindow to be accessed via the
// SDL/WinRT thread.
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
// SDL_InitSubSystem will, on error, set the SDL error. Let that propogate to
// SDL_InitSubSystem will, on error, set the SDL error. Let that propagate to
// the caller to here:
WINRT_XAMLWasEnabled = oldXAMLWasEnabledValue;
return -1;

View File

@ -173,7 +173,7 @@ def main():
func_ret = func_ret.replace('extern', ' ')
func_ret = func_ret.replace('SDLCALL', ' ')
func_ret = func_ret.replace('DECLSPEC', ' ')
# Remove trailling spaces in front of '*'
# Remove trailing spaces in front of '*'
tmp = ""
while func_ret != tmp:
tmp = func_ret
@ -239,7 +239,7 @@ def main():
if param_name == "":
param_name = "param_name_not_specified"
# recontruct a callback name for future parsing
# reconstruct a callback name for future parsing
func_param_type.append(a + " (" + param_type.strip() + " *REWRITE_NAME)" + c)
func_param_name.append(param_name.strip())
@ -265,13 +265,13 @@ def main():
val = param_type.strip() + "*REWRITE_NAME"
# Remove trailling spaces in front of '*'
# Remove trailing spaces in front of '*'
tmp = ""
while val != tmp:
tmp = val
val = val.replace(' ', ' ')
val = val.replace(' *', '*')
# first occurence
# first occurrence
val = val.replace('*', ' *', 1)
val = val.strip()
@ -324,7 +324,7 @@ def main():
# Dump API into a json file
full_API_json()
# Check commment formating
# Check comment formatting
check_comment();
# Dump API into a json file
@ -338,7 +338,7 @@ def full_API_json():
# Dump API into a json file
def check_comment():
if args.check_comment:
print("check comment formating");
print("check comment formatting");
# Check \param
@ -356,7 +356,7 @@ def check_comment():
if count != expected:
# skip SDL_stdinc.h
if header != 'SDL_stdinc.h':
# Warning missmatch \param and function prototype
# Warning mismatch \param and function prototype
print("%s: %s() %d '\\param'' but expected %d" % (header, name, count, expected));
@ -375,7 +375,7 @@ def check_comment():
if count != expected:
# skip SDL_stdinc.h
if header != 'SDL_stdinc.h':
# Warning missmatch \param and function prototype
# Warning mismatch \param and function prototype
print("%s: %s() %d '\\returns'' but expected %d" % (header, name, count, expected));
# Check \since
@ -390,7 +390,7 @@ def check_comment():
if count != expected:
# skip SDL_stdinc.h
if header != 'SDL_stdinc.h':
# Warning missmatch \param and function prototype
# Warning mismatch \param and function prototype
print("%s: %s() %d '\\since'' but expected %d" % (header, name, count, expected));
@ -529,7 +529,7 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--dump', help='output all SDL API into a .json file', action='store_true')
parser.add_argument('--check-comment', help='check comment formating', action='store_true')
parser.add_argument('--check-comment', help='check comment formatting', action='store_true')
parser.add_argument('--debug', help='add debug traces', action='store_true')
args = parser.parse_args()

View File

@ -33,7 +33,7 @@ static FILE *TryOpenInRomfs(const char *file, const char *mode);
/* Nintendo 3DS applications may embed resources in the executable. The
resources are stored in a special read-only partition prefixed with
'romfs:/'. As such, when opening a file, we should first try the romfs
unless sdmc is specifically mentionned.
unless sdmc is specifically mentioned.
*/
FILE *N3DS_FileOpen(const char *file, const char *mode)
{

View File

@ -119,13 +119,13 @@ static const ControllerDescription_t arrControllers[] = {
{ MAKE_CONTROLLER_ID( 0x146b, 0x0609 ), k_eControllerType_XInputPS4Controller, NULL }, // NACON Wireless Controller for PS4
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d01 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller - has gyro
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d02 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller v2 - has gyro
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymmetric Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d08 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited Wireless Dongle
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d09 ), k_eControllerType_PS4Controller, NULL }, // NACON Daija Fight Stick - touchpad but no gyro/rumble
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Infinite - has gyro
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d13 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Pro Controller 3
{ MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller -- on windows this doesn't enumerate
{ MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymmetric Controller -- on windows this doesn't enumerate
{ MAKE_CONTROLLER_ID( 0x1532, 0X0401 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera PS4 Controller
{ MAKE_CONTROLLER_ID( 0x1532, 0x1000 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju PS4 Controller
{ MAKE_CONTROLLER_ID( 0x1532, 0x1004 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate USB

View File

@ -677,7 +677,7 @@ static void FormatStatePacketUntilGyro(SteamControllerStateInternal_t *pState, V
SDL_memcpy(&pState->ulButtons, &pStatePacket->ButtonTriggerData.ulButtons, 8);
pState->ulButtons &= ~0xFFFF000000LL;
// The firmware uses this bit to tell us what kind of data is packed into the left two axises
// The firmware uses this bit to tell us what kind of data is packed into the left two axes
if (pStatePacket->ButtonTriggerData.ulButtons & STEAM_LEFTPAD_FINGERDOWN_MASK) {
// Finger-down bit not set; "left pad" is actually trackpad
pState->sLeftPadX = pState->sPrevLeftPad[0] = pStatePacket->sLeftPadX;
@ -695,7 +695,7 @@ static void FormatStatePacketUntilGyro(SteamControllerStateInternal_t *pState, V
} else {
// Finger-down bit not set; "left pad" is actually joystick
// XXX there's a firmware bug where sometimes padX is 0 and padY is a large number (acutally the battery voltage)
// XXX there's a firmware bug where sometimes padX is 0 and padY is a large number (actually the battery voltage)
// If that happens skip this packet and report last frames stick
/*
if ( m_eControllerType == k_eControllerType_SteamControllerV2 && pStatePacket->sLeftPadY > 900 ) {

View File

@ -1179,7 +1179,7 @@ static SDL_bool HIDAPI_DriverSwitch_IsSupportedDevice(SDL_HIDAPI_Device *device,
/* The HORI Wireless Switch Pad enumerates as a HID device when connected via USB
with the same VID/PID as when connected over Bluetooth but doesn't actually
support communication over USB. The most reliable way to block this without allowing the
controller to continually attempt to reconnect is to filter it out by manufactuer/product string.
controller to continually attempt to reconnect is to filter it out by manufacturer/product string.
Note that the controller does have a different product string when connected over Bluetooth.
*/
if (SDL_strcmp(name, "HORI Wireless Switch Pad") == 0) {

View File

@ -62,7 +62,7 @@ typedef struct
// Roll this version forward anytime that you are breaking compatibility of existing
// message types within ValveInReport_t or the header itself. Hopefully this should
// be super rare and instead you shoudl just add new message payloads to the union,
// be super rare and instead you should just add new message payloads to the union,
// or just add fields to the end of existing payload structs which is expected to be
// safe in all code consuming these as they should just consume/copy upto the prior size
// they were aware of when processing.
@ -288,7 +288,7 @@ enum EBLEPacketReportNums
// Enumeration of data chunks in BLE state packets
enum EBLEOptionDataChunksBitmask
{
// First byte uppper nibble
// First byte upper nibble
k_EBLEButtonChunk1 = 0x10,
k_EBLEButtonChunk2 = 0x20,
k_EBLEButtonChunk3 = 0x40,

View File

@ -1371,7 +1371,7 @@ static int PrepareJoystickHwdata(SDL_Joystick *joystick, SDL_joylist_item *item,
if (fd < 0) {
return SDL_SetError("Unable to open %s", item->path);
}
/* If openning sensor fail, continue with buttons and axes only */
/* If opening sensor fail, continue with buttons and axes only */
if (item_sensor != NULL) {
fd_sensor = open(item_sensor->path, O_RDONLY | O_CLOEXEC, 0);
}

View File

@ -1311,7 +1311,7 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
direct_update = SDL_TRUE;
}
} else {
/* Surface and Renderer formats are differents, it needs an intermediate conversion. */
/* Surface and Renderer formats are different, it needs an intermediate conversion. */
direct_update = SDL_FALSE;
}

View File

@ -2364,7 +2364,7 @@ static int D3D12_SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *c
NOTE: Although it may seem inefficient to linearly search through ~450 pipelines
to find the correct one, in profiling this doesn't come up at all.
It's unlikely that using a hash table would affect performance a measurable amount unless
it's a degenerate case that's chaning the pipline state dozens of times per frame.
it's a degenerate case that's changing the pipeline state dozens of times per frame.
*/
rendererData->currentPipelineState = NULL;
for (i = 0; i < rendererData->pipelineStateCount; ++i) {

View File

@ -173,7 +173,7 @@ static void PS2_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *texture
GSTEXTURE *ps2_texture = (GSTEXTURE *)texture->driverdata;
/*
set texture filtering according to scaleMode
suported hint values are nearest (0, default) or linear (1)
supported hint values are nearest (0, default) or linear (1)
gskit scale mode is either GS_FILTER_NEAREST (good for tile-map)
or GS_FILTER_LINEAR (good for scaling)
*/

View File

@ -1027,7 +1027,7 @@ static int PSP_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v
Uint8 *gpumem = NULL;
StartDrawing(renderer);
/* note that before the renderer interface change, this would do extrememly small
/* note that before the renderer interface change, this would do extremely small
batches with sceGuGetMemory()--a few vertices at a time--and it's not clear that
this won't fail if you try to push 100,000 draw calls in a single batch.
I don't know what the limits on PSP hardware are. It might be useful to have

View File

@ -546,7 +546,7 @@
ErrorAdj = ((unsigned long)DeltaX << 16) / (unsigned long)DeltaY; \
/* Draw all pixels other than the first and last */ \
while (--DeltaY) { \
ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ \
ErrorAccTemp = ErrorAcc; /* remember current accumulated error */ \
ErrorAcc += ErrorAdj; /* calculate error for next pixel */ \
if (ErrorAcc <= ErrorAccTemp) { \
/* The error accumulator turned over, so advance the X coord */ \
@ -581,7 +581,7 @@
ErrorAdj = ((unsigned long)DeltaY << 16) / (unsigned long)DeltaX; \
/* Draw all pixels other than the first and last */ \
while (--DeltaX) { \
ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ \
ErrorAccTemp = ErrorAcc; /* remember current accumulated error */ \
ErrorAcc += ErrorAdj; /* calculate error for next pixel */ \
if (ErrorAcc <= ErrorAccTemp) { \
/* The error accumulator turned over, so advance the Y coord */ \

View File

@ -27,7 +27,7 @@
#include "../../video/SDL_blit.h"
/* fixed points bits precision
* Set to 1, so that it can start rendering wth middle of a pixel precision.
* Set to 1, so that it can start rendering with middle of a pixel precision.
* It doesn't need to be increased.
* But, if increased too much, it overflows (srcx, srcy) coordinates used for filling with texture.
* (which could be turned to int64).

View File

@ -601,7 +601,7 @@ static void VITA_GXM_SetTextureScaleMode(SDL_Renderer *renderer, SDL_Texture *te
/*
set texture filtering according to scaleMode
suported hint values are nearest (0, default) or linear (1)
supported hint values are nearest (0, default) or linear (1)
vitaScaleMode is either SCE_GXM_TEXTURE_FILTER_POINT (good for tile-map)
or SCE_GXM_TEXTURE_FILTER_LINEAR (good for scaling)
*/

View File

@ -526,7 +526,7 @@ int gxm_init(SDL_Renderer *renderer)
// set the stencil test reference (this is currently assumed to always remain 1 after here for region clipping)
sceGxmSetFrontStencilRef(data->gxm_context, 1);
// set the stencil function (this wouldn't actually be needed, as the set clip rectangle function has to call this at the begginning of every scene)
// set the stencil function (this wouldn't actually be needed, as the set clip rectangle function has to call this at the beginning of every scene)
sceGxmSetFrontStencilFunc(
data->gxm_context,
SCE_GXM_STENCIL_FUNC_ALWAYS,

View File

@ -149,7 +149,7 @@ Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
}
number = SDLTest_RandomUint32();
/* invocation count increment in preceeding call */
/* invocation count increment in preceding call */
return (Sint32)((number % ((max + 1) - min)) + min);
}

View File

@ -258,7 +258,7 @@ static int SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, const SDLTest_
/* Set timeout timer */
timer = SDLTest_SetTestTimeout(SDLTest_TestCaseTimeout, SDLTest_BailOut);
/* Maybe run suite initalizer function */
/* Maybe run suite initializer function */
if (testSuite->testSetUp) {
testSuite->testSetUp(0x0);
if (SDLTest_AssertSummaryToTestResult() == TEST_RESULT_FAILED) {
@ -272,7 +272,7 @@ static int SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, const SDLTest_
/* Convert test execution result into harness result */
if (testCaseResult == TEST_SKIPPED) {
/* Test was programatically skipped */
/* Test was programmatically skipped */
testResult = TEST_RESULT_SKIPPED;
} else if (testCaseResult == TEST_STARTED) {
/* Test did not return a TEST_COMPLETED value; assume it failed */
@ -303,7 +303,7 @@ static int SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, const SDLTest_
/* Final log based on test execution result */
if (testCaseResult == TEST_SKIPPED) {
/* Test was programatically skipped */
/* Test was programmatically skipped */
SDLTest_Log(SDLTEST_FINAL_RESULT_FORMAT, "Test", testCase->name, COLOR_BLUE "Skipped (Programmatically)" COLOR_END);
} else if (testCaseResult == TEST_STARTED) {
/* Test did not return a TEST_COMPLETED value; assume it failed */

View File

@ -69,7 +69,7 @@ SDL_ThreadID(void)
#ifdef __WINRT__
return GetCurrentThreadId();
#else
// HACK: Mimick a thread ID, if one isn't otherwise available.
// HACK: Mimic a thread ID, if one isn't otherwise available.
static thread_local SDL_threadID current_thread_id = 0;
static SDL_threadID next_thread_id = 1;
static std::mutex next_thread_id_mutex;

View File

@ -74,7 +74,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread)
ThreadEntry, // function to run
0, // priority. 0 means priority of calling thread
stack_size, // stack size
0, // attibutes. always 0
0, // attributes. always 0
0, // cpu affinity mask. 0 = all CPUs
NULL // opt. always NULL
);

View File

@ -173,7 +173,7 @@ static vector unsigned char reorder_ppc64le_vec(vector unsigned char vpermute)
The LE transformation for vec_perm has an implicit assumption
that the permutation is being used to reorder vector elements,
not to reorder bytes within those elements.
Unfortunatly the result order is not the expected one for powerpc
Unfortunately the result order is not the expected one for powerpc
little endian when the two first vector parameters of vec_perm are
not of type 'vector char'. This is because the numbering from the
left for BE, and numbering from the right for LE, produces a

View File

@ -632,7 +632,7 @@ int SDL_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)
* accelerated blitting function.
*
* These parts are separated out and each used internally by this
* library in the optimimum places. They are exported so that if
* library in the optimum places. They are exported so that if
* you know exactly what you are doing, you can optimize your code
* by calling the one(s) you need.
*/
@ -1299,7 +1299,7 @@ SDL_Surface *SDL_ConvertSurface(SDL_Surface *surface, const SDL_PixelFormat *for
tmp->map->info.flags &= ~SDL_COPY_COLORKEY;
/* Convertion of the colorkey */
/* Conversion of the colorkey */
tmp2 = SDL_ConvertSurface(tmp, format);
if (tmp2 == NULL) {
SDL_DestroySurface(tmp);

View File

@ -87,7 +87,7 @@ struct SDL_Window
/* Stored position and size for windowed mode */
SDL_Rect windowed;
/* Whether or not the intial position was defined */
/* Whether or not the initial position was defined */
SDL_bool undefined_x;
SDL_bool undefined_y;

View File

@ -73,7 +73,7 @@ extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
/* Create a surface directly from a display connected to a physical device
* using the DisplayKHR extension.
* This needs to be passed an instance that was created with the VK_KHR_DISPLAY_EXTENSION_NAME
* exension. */
* extension. */
extern SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr,
VkInstance instance,
VkSurfaceKHR *surface);

View File

@ -79,7 +79,7 @@
* as NOP to workaround some HW bugs or for whatever other reason)
*
* PREFETCH_TYPE_SIMPLE (may be useful for simple single-issue ARM cores where
* advanced prefetch intruduces heavy overhead)
* advanced prefetch introduces heavy overhead)
*
* PREFETCH_TYPE_ADVANCED (useful for superscalar cores such as ARM Cortex-A8
* which can run ARM and NEON instructions simultaneously so that extra ARM

View File

@ -169,7 +169,7 @@ static SDL_bool GetDisplayMode(SDL_VideoDevice *_this, CGDisplayModeRef vidmode,
/* If a list of possible display modes is passed in, use it to filter out
* modes that have duplicate sizes. We don't just rely on SDL's higher level
* duplicate filtering because this code can choose what properties are
* prefered, and it can add CGDisplayModes to the DisplayModeData's list of
* preferred, and it can add CGDisplayModes to the DisplayModeData's list of
* modes to try (see comment below for why that's necessary). */
pixelW = CGDisplayModeGetPixelWidth(vidmode);
pixelH = CGDisplayModeGetPixelHeight(vidmode);

View File

@ -401,7 +401,7 @@ static void Cocoa_HandleTitleButtonEvent(SDL_VideoDevice *_this, NSEvent *event)
NSWindow *nswindow = [event window];
/* You might land in this function before SDL_Init if showing a message box.
Don't derefence a NULL pointer if that happens. */
Don't dereference a NULL pointer if that happens. */
if (_this == NULL) {
return;
}

View File

@ -295,7 +295,7 @@ NSImage *Cocoa_CreateImage(SDL_Surface *surface)
/*
* macOS log support.
*
* This doesn't really have aything to do with the interfaces of the SDL video
* This doesn't really have anything to do with the interfaces of the SDL video
* subsystem, but we need to stuff this into an Objective-C source code file.
*
* NOTE: This is copypasted in src/video/uikit/SDL_uikitvideo.m! Be sure both

View File

@ -386,7 +386,7 @@ static NSUInteger GetWindowWindowedStyle(SDL_Window *window)
/* IF YOU CHANGE ANY FLAGS IN HERE, PLEASE READ
the NSWindowStyleMaskBorderless comments in SetupWindowData()! */
/* always allow miniaturization, otherwise you can't programatically
/* always allow miniaturization, otherwise you can't programmatically
minimize the window, whether there's a title bar or not */
NSUInteger style = NSWindowStyleMaskMiniaturizable;

View File

@ -49,8 +49,8 @@ static void KMSDRM_FreeCursor(SDL_Cursor *cursor);
/* and shows it on screen with KMSDRM_ShowCursor(). */
/* KMSDRM_ShowCursor() simply shows or hides the cursor it receives: it does NOT */
/* mind if it's mouse->cur_cursor, etc. */
/* -If KMSDRM_ShowCursor() returns succesfully, that cursor becomes mouse->cur_cursor */
/* and mouse->cursor_shown is 1. */
/* -If KMSDRM_ShowCursor() returns successfully, that cursor becomes */
/* mouse->cur_cursor and mouse->cursor_shown is 1. */
/**************************************************************************************/
static SDL_Cursor *KMSDRM_CreateDefaultCursor(void)

View File

@ -1052,16 +1052,16 @@ static void KMSDRM_DestroySurfaces(SDL_VideoDevice *_this, SDL_Window *window)
/**********************************************/
/*KMSDRM_WaitPageflip(_this, windata);*/
/***********************************************************************/
/* Restore the original CRTC configuration: configue the crtc with the */
/* original video mode and make it point to the original TTY buffer. */
/***********************************************************************/
/************************************************************************/
/* Restore the original CRTC configuration: configure the crtc with the */
/* original video mode and make it point to the original TTY buffer. */
/************************************************************************/
ret = KMSDRM_drmModeSetCrtc(viddata->drm_fd, dispdata->crtc->crtc_id,
dispdata->crtc->buffer_id, 0, 0, &dispdata->connector->connector_id, 1,
&dispdata->original_mode);
/* If we failed to set the original mode, try to set the connector prefered mode. */
/* If we failed to set the original mode, try to set the connector preferred mode. */
if (ret && (dispdata->crtc->mode_valid == 0)) {
ret = KMSDRM_drmModeSetCrtc(viddata->drm_fd, dispdata->crtc->crtc_id,
dispdata->crtc->buffer_id, 0, 0, &dispdata->connector->connector_id, 1,
@ -1363,7 +1363,7 @@ void KMSDRM_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window)
KMSDRM_DestroySurfaces(_this, window);
/* Unload library and deinit GBM, but only if this is the last window.
Note that this is the right comparision because num_windows could be 1
Note that this is the right comparison because num_windows could be 1
if there is a complete window, or 0 if we got here from SDL_CreateWindow()
because KMSDRM_CreateWindow() returned an error so the window wasn't
added to the windows list. */

View File

@ -29,7 +29,7 @@
struct SDL_WindowData
{
gfxScreen_t screen; /**< Keeps track of which N3DS screen is targetted */
gfxScreen_t screen; /**< Keeps track of which N3DS screen is targeted */
};
#define FRAMEBUFFER_FORMAT SDL_PIXELFORMAT_RGBA8888

View File

@ -27,7 +27,7 @@
#include <sys/keycodes.h>
/**
* A map thta translates Screen key names to SDL scan codes.
* A map that translates Screen key names to SDL scan codes.
* This map is incomplete, but should include most major keys.
*/
static int key_to_sdl[] = {

View File

@ -261,7 +261,7 @@ static int RPI_WarpMouseGlobalGraphically(float x, float y)
return SDL_SetError("vc_dispmanx_element_change_attributes() failed");
}
/* Submit asynchronously, otherwise the peformance suffers a lot */
/* Submit asynchronously, otherwise the performance suffers a lot */
ret = vc_dispmanx_update_submit(update, 0, NULL);
if (ret != DISPMANX_SUCCESS) {
return SDL_SetError("vc_dispmanx_update_submit() failed");

View File

@ -293,7 +293,7 @@ int RPI_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
return SDL_SetError("Could not create GLES window surface");
}
/* Start generating vsync callbacks if necesary */
/* Start generating vsync callbacks if necessary */
wdata->double_buffer = SDL_FALSE;
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_DOUBLE_BUFFER, SDL_FALSE)) {
wdata->vsync_cond = SDL_CreateCondition();

View File

@ -87,7 +87,7 @@ my %set_rgba_string = (
sub open_file {
my $name = shift;
open(FILE, ">$name.new") || die "Cant' open $name.new: $!";
open(FILE, ">$name.new") || die "Can't open $name.new: $!";
print FILE <<__EOF__;
/* DO NOT EDIT! This file is generated by sdlgenblit.pl */
/*

View File

@ -257,7 +257,7 @@ void UIKit_ForceUpdateHomeIndicator(void)
/*
* iOS log support.
*
* This doesn't really have aything to do with the interfaces of the SDL video
* This doesn't really have anything to do with the interfaces of the SDL video
* subsystem, but we need to stuff this into an Objective-C source code file.
*
* NOTE: This is copypasted from src/video/cocoa/SDL_cocoavideo.m! Thus, if
@ -283,7 +283,7 @@ void SDL_NSLog(const char *prefix, const char *text)
/*
* iOS Tablet detection
*
* This doesn't really have aything to do with the interfaces of the SDL video
* This doesn't really have anything to do with the interfaces of the SDL video
* subsystem, but we need to stuff this into an Objective-C source code file.
*/
SDL_bool SDL_IsIPad(void)

View File

@ -143,7 +143,7 @@ static int SetupWindowData(SDL_VideoDevice *_this, SDL_Window *window, UIWindow
view = [[SDL_uikitview alloc] initWithFrame:frame];
/* Sets this view as the controller's view, and adds the view to the window
* heirarchy. */
* hierarchy. */
[view setSDLWindow:window];
return 0;

View File

@ -901,7 +901,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Notes on how RDP appears to work, as of Windows 10 2004:
- SetCursorPos() calls are cached, with multiple calls coalesced into a single call that's sent to the RDP client. If the last call to SetCursorPos() has the same value as the last one that was sent to the client, it appears to be ignored and not sent. This means that we need to jitter the SetCursorPos() position slightly in order for the recentering to work correctly.
- User mouse motion is coalesced with SetCursorPos(), so the WM_INPUT positions we see will not necessarily match the positon we requested with SetCursorPos().
- User mouse motion is coalesced with SetCursorPos(), so the WM_INPUT positions we see will not necessarily match the position we requested with SetCursorPos().
- SetCursorPos() outside of the bounds of the focus window appears not to do anything.
- SetCursorPos() while the cursor is NULL doesn't do anything

View File

@ -615,7 +615,7 @@ static WIN_DialogData *CreateDialogData(int w, int h, const char *caption)
* function returns NULL and, on success, returns a pointer to the escaped
* sequence as a read-only string that is valid until the next call or until the
* work buffer is freed. Once all strings have been processed, it's the caller's
* responsibilty to free the work buffer with SDL_free, even on errors.
* responsibility to free the work buffer with SDL_free, even on errors.
*/
static const char *EscapeAmpersands(char **dst, size_t *dstlen, const char *src)
{
@ -699,7 +699,7 @@ static int WIN_ShowOldMessageBox(const SDL_MessageBoxData *messageboxdata, int *
const int IconMargin = 20;
if (messageboxdata->numbuttons > MAX_BUTTONS) {
return SDL_SetError("Number of butons exceeds limit of %d", MAX_BUTTONS);
return SDL_SetError("Number of buttons exceeds limit of %d", MAX_BUTTONS);
}
switch (messageboxdata->flags) {

View File

@ -809,7 +809,7 @@ int WIN_GetWindowBordersSize(SDL_VideoDevice *_this, SDL_Window *window, int *to
rcWindow.bottom = ptDiff.y;
rcWindow.right = ptDiff.x;
/* Now that both the inner and outer rects use the same coordinate system we can substract them to get the border size.
/* Now that both the inner and outer rects use the same coordinate system we can subtract them to get the border size.
* Keep in mind that the top/left coordinates of rcWindow are negative because the border lies slightly before {0,0},
* so switch them around because SDL3 wants them in positive. */
*top = rcClient.top - rcWindow.top;

View File

@ -622,7 +622,7 @@ int WINRT_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
/* OpenGL ES 2 wasn't requested. Don't set up an EGL surface. */
data->egl_surface = EGL_NO_SURFACE;
} else {
/* OpenGL ES 2 was reuqested. Set up an EGL surface. */
/* OpenGL ES 2 was requested. Set up an EGL surface. */
SDL_VideoData *video_data = _this->driverdata;
/* Call SDL_EGL_ChooseConfig and eglCreateWindowSurface directly,

View File

@ -835,7 +835,7 @@ static void X11_DispatchEvent(SDL_VideoDevice *_this, XEvent *xevent)
orig_keycode = 0;
}
/* filter events catchs XIM events and sends them to the correct handler */
/* filter events catches XIM events and sends them to the correct handler */
if (X11_XFilterEvent(xevent, None) == True) {
#if 0
printf("Filtered event type = %d display = %d window = %d\n",
@ -1215,7 +1215,7 @@ static void X11_DispatchEvent(SDL_VideoDevice *_this, XEvent *xevent)
unsigned int NumChildren;
Window ChildReturn, Root, Parent;
Window *Children;
/* Translate these coodinates back to relative to root */
/* Translate these coordinates back to relative to root */
X11_XQueryTree(data->videodata->display, xevent->xconfigure.window, &Root, &Parent, &Children, &NumChildren);
X11_XTranslateCoordinates(xevent->xconfigure.display,
Parent, DefaultRootWindow(xevent->xconfigure.display),