From 37e567994dfa5cf6215b1767295e3399c83a3136 Mon Sep 17 00:00:00 2001
From: luzpaz <[EMAIL REDACTED]>
Date: Mon, 3 Jul 2023 15:46:47 -0400
Subject: [PATCH] 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`
---
include/SDL3/SDL_hints.h | 10 +++++-----
include/SDL3/SDL_main.h | 2 +-
src/atomic/SDL_atomic.c | 2 +-
src/audio/alsa/SDL_alsa_audio.c | 2 +-
src/audio/netbsd/SDL_netbsdaudio.c | 2 +-
src/audio/openslES/SDL_openslES.c | 2 +-
src/audio/pipewire/SDL_pipewire.c | 2 +-
src/audio/psp/SDL_pspaudio.c | 2 +-
src/audio/qnx/SDL_qsa_audio.c | 4 ++--
src/core/freebsd/SDL_evdev_kbd_freebsd.c | 2 +-
src/core/linux/SDL_evdev_kbd.c | 2 +-
src/core/winrt/SDL_winrtapp_direct3d.cpp | 2 +-
src/core/winrt/SDL_winrtapp_xaml.cpp | 2 +-
src/dynapi/gendynapi.py | 20 +++++++++----------
src/file/n3ds/SDL_rwopsromfs.c | 2 +-
src/joystick/controller_list.h | 4 ++--
src/joystick/hidapi/SDL_hidapi_steam.c | 4 ++--
src/joystick/hidapi/SDL_hidapi_switch.c | 2 +-
.../hidapi/steam/controller_structs.h | 4 ++--
src/joystick/linux/SDL_sysjoystick.c | 2 +-
src/render/SDL_render.c | 2 +-
src/render/direct3d12/SDL_render_d3d12.c | 2 +-
src/render/ps2/SDL_render_ps2.c | 2 +-
src/render/psp/SDL_render_psp.c | 2 +-
src/render/software/SDL_draw.h | 4 ++--
src/render/software/SDL_triangle.c | 2 +-
src/render/vitagxm/SDL_render_vita_gxm.c | 2 +-
.../vitagxm/SDL_render_vita_gxm_tools.c | 2 +-
src/test/SDL_test_fuzzer.c | 2 +-
src/test/SDL_test_harness.c | 6 +++---
src/thread/stdcpp/SDL_systhread.cpp | 2 +-
src/thread/vita/SDL_systhread.c | 2 +-
src/video/SDL_blit_N.c | 2 +-
src/video/SDL_surface.c | 4 ++--
src/video/SDL_sysvideo.h | 2 +-
src/video/SDL_vulkan_internal.h | 2 +-
src/video/arm/pixman-arm-neon-asm.S | 2 +-
src/video/cocoa/SDL_cocoamodes.m | 2 +-
src/video/cocoa/SDL_cocoamouse.m | 2 +-
src/video/cocoa/SDL_cocoavideo.m | 2 +-
src/video/cocoa/SDL_cocoawindow.m | 2 +-
src/video/kmsdrm/SDL_kmsdrmmouse.c | 4 ++--
src/video/kmsdrm/SDL_kmsdrmvideo.c | 12 +++++------
src/video/n3ds/SDL_n3dsvideo.h | 2 +-
src/video/qnx/SDL_qnxkeyboard.c | 2 +-
src/video/raspberry/SDL_rpimouse.c | 2 +-
src/video/raspberry/SDL_rpivideo.c | 2 +-
src/video/sdlgenblit.pl | 2 +-
src/video/uikit/SDL_uikitvideo.m | 4 ++--
src/video/uikit/SDL_uikitwindow.m | 2 +-
src/video/windows/SDL_windowsevents.c | 2 +-
src/video/windows/SDL_windowsmessagebox.c | 4 ++--
src/video/windows/SDL_windowswindow.c | 2 +-
src/video/winrt/SDL_winrtvideo.cpp | 2 +-
src/video/x11/SDL_x11events.c | 4 ++--
55 files changed, 85 insertions(+), 85 deletions(-)
diff --git a/include/SDL3/SDL_hints.h b/include/SDL3/SDL_hints.h
index 3916570f2f24..4df6dc07865e 100644
--- a/include/SDL3/SDL_hints.h
+++ b/include/SDL3/SDL_hints.h
@@ -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
diff --git a/include/SDL3/SDL_main.h b/include/SDL3/SDL_main.h
index 40ecb1af867b..6181c0c01069 100644
--- a/include/SDL3/SDL_main.h
+++ b/include/SDL3/SDL_main.h
@@ -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 */
diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c
index 6b1b0f4c6236..4164a5f71441 100644
--- a/src/atomic/SDL_atomic.c
+++ b/src/atomic/SDL_atomic.c
@@ -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.
diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index a73204768902..7699c5d8cb88 100644
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -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
diff --git a/src/audio/netbsd/SDL_netbsdaudio.c b/src/audio/netbsd/SDL_netbsdaudio.c
index aefe91ebaa76..6474aa86e522 100644
--- a/src/audio/netbsd/SDL_netbsdaudio.c
+++ b/src/audio/netbsd/SDL_netbsdaudio.c
@@ -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"
"",
diff --git a/src/audio/openslES/SDL_openslES.c b/src/audio/openslES/SDL_openslES.c
index 8eea5f0f2d77..128fef61e9d1 100644
--- a/src/audio/openslES/SDL_openslES.c
+++ b/src/audio/openslES/SDL_openslES.c
@@ -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);
}
diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c
index 0cb1268ab504..1d1b156254fb 100644
--- a/src/audio/pipewire/SDL_pipewire.c
+++ b/src/audio/pipewire/SDL_pipewire.c
@@ -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.
*/
diff --git a/src/audio/psp/SDL_pspaudio.c b/src/audio/psp/SDL_pspaudio.c
index eda9c74ee33e..e43f692e1a6d 100644
--- a/src/audio/psp/SDL_pspaudio.c
+++ b/src/audio/psp/SDL_pspaudio.c
@@ -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. */
diff --git a/src/audio/qnx/SDL_qsa_audio.c b/src/audio/qnx/SDL_qsa_audio.c
index 11ec7b441c34..92f999fb32e8 100644
--- a/src/audio/qnx/SDL_qsa_audio.c
+++ b/src/audio/qnx/SDL_qsa_audio.c
@@ -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:
diff --git a/src/core/freebsd/SDL_evdev_kbd_freebsd.c b/src/core/freebsd/SDL_evdev_kbd_freebsd.c
index fb71cc0868a3..a30988c8acad 100644
--- a/src/core/freebsd/SDL_evdev_kbd_freebsd.c
+++ b/src/core/freebsd/SDL_evdev_kbd_freebsd.c
@@ -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;
}
diff --git a/src/core/linux/SDL_evdev_kbd.c b/src/core/linux/SDL_evdev_kbd.c
index d82e0854080f..2754e51e4d40 100644
--- a/src/core/linux/SDL_evdev_kbd.c
+++ b/src/core/linux/SDL_evdev_kbd.c
@@ -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;
}
diff --git a/src/core/winrt/SDL_winrtapp_direct3d.cpp b/src/core/winrt/SDL_winrtapp_direct3d.cpp
index d3f0689c8d29..3bd87ccd67d5 100644
--- a/src/core/winrt/SDL_winrtapp_direct3d.cpp
+++ b/src/core/winrt/SDL_winrtapp_direct3d.cpp
@@ -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
diff --git a/src/core/winrt/SDL_winrtapp_xaml.cpp b/src/core/winrt/SDL_winrtapp_xaml.cpp
index 9af6106cc110..9998e0ea83ce 100644
--- a/src/core/winrt/SDL_winrtapp_xaml.cpp
+++ b/src/core/winrt/SDL_winrtapp_xaml.cpp
@@ -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;
diff --git a/src/dynapi/gendynapi.py b/src/dynapi/gendynapi.py
index 0f6284ab268e..526f543c8964 100755
--- a/src/dynapi/gendynapi.py
+++ b/src/dynapi/gendynapi.py
@@ -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 @@ def add_dyn_api(proc):
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()
diff --git a/src/file/n3ds/SDL_rwopsromfs.c b/src/file/n3ds/SDL_rwopsromfs.c
index 9b14fed71dbd..acb8701a22e2 100644
--- a/src/file/n3ds/SDL_rwopsromfs.c
+++ b/src/file/n3ds/SDL_rwopsromfs.c
@@ -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)
{
diff --git a/src/joystick/controller_list.h b/src/joystick/controller_list.h
index 48d8a47474d7..4c6f0913911c 100644
--- a/src/joystick/controller_list.h
+++ b/src/joystick/controller_list.h
@@ -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
diff --git a/src/joystick/hidapi/SDL_hidapi_steam.c b/src/joystick/hidapi/SDL_hidapi_steam.c
index 00846d0339e0..edb476a414ed 100644
--- a/src/joystick/hidapi/SDL_hidapi_steam.c
+++ b/src/joystick/hidapi/SDL_hidapi_steam.c
@@ -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 ) {
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 16ff94e5f309..349de568343f 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -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) {
diff --git a/src/joystick/hidapi/steam/controller_structs.h b/src/joystick/hidapi/steam/controller_structs.h
index c8fd61226e85..e60428e26bf7 100644
--- a/src/joystick/hidapi/steam/controller_structs.h
+++ b/src/joystick/hidapi/steam/controller_structs.h
@@ -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,
diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index 819583a3f33a..5dada52445a0 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -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);
}
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index c234724a5083..bd935ac8288a 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -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;
}
diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c
index 86eaeea12bac..376361bfea44 100644
--- a/src/render/direct3d12/SDL_render_d3d12.c
+++ b/src/render/direct3d12/SDL_render_d3d12.c
@@ -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) {
diff --git a/src/render/ps2/SDL_render_ps2.c b/src/render/ps2/SDL_render_ps2.c
index a1828286a6cc..c1d748e32b69 100644
--- a/src/render/ps2/SDL_render_ps2.c
+++ b/src/render/ps2/SDL_render_ps2.c
@@ -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)
*/
diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c
index 151c360aeabb..82b0a6b79fa4 100644
--- a/src/render/psp/SDL_render_psp.c
+++ b/src/render/psp/SDL_render_psp.c
@@ -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
diff --git a/src/render/software/SDL_draw.h b/src/render/software/SDL_draw.h
index 63c588e0fe6f..b8f3fc642019 100644
--- a/src/render/software/SDL_draw.h
+++ b/src/render/software/SDL_draw.h
@@ -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 */ \
diff --git a/src/render/software/SDL_triangle.c b/src/render/software/SDL_triangle.c
index 2896ddcb47a1..3b6e37d03a16 100644
--- a/src/render/software/SDL_triangle.c
+++ b/src/render/software/SDL_triangle.c
@@ -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).
diff --git a/src/render/vitagxm/SDL_render_vita_gxm.c b/src/render/vitagxm/SDL_render_vita_gxm.c
index 827a0f3b7f61..de0fa7e18959 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm.c
@@ -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)
*/
diff --git a/src/render/vitagxm/SDL_rende
(Patch may be truncated, please check the link at the top of this post.)