From 37e567994dfa5cf6215b1767295e3399c83a3136 Mon Sep 17 00:00:00 2001 From: luzpaz 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 3916570f2..4df6dc078 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 40ecb1af8..6181c0c01 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 #elif defined(__WINRT__) /* C++ platforms */ diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index 6b1b0f4c6..4164a5f71 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 a73204768..7699c5d8c 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 aefe91eba..6474aa86e 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 8eea5f0f2..128fef61e 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 0cb1268ab..1d1b15625 100644 --- a/src/audio/pipewire/SDL_pipewire.c +++ b/src/audio/pipewire/SDL_pipewire.c @@ -30,7 +30,7 @@ #include /* - * 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 eda9c74ee..e43f692e1 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 11ec7b441..92f999fb3 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 fb71cc086..a30988c8a 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 d82e08540..2754e51e4 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 d3f0689c8..3bd87ccd6 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 9af6106cc..9998e0ea8 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 0f6284ab2..526f543c8 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 @@ 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() diff --git a/src/file/n3ds/SDL_rwopsromfs.c b/src/file/n3ds/SDL_rwopsromfs.c index 9b14fed71..acb8701a2 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 48d8a4747..4c6f09139 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 00846d033..edb476a41 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 16ff94e5f..349de5683 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 c8fd61226..e60428e26 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 819583a3f..5dada5244 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 c234724a5..bd935ac82 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 86eaeea12..376361bfe 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 a1828286a..c1d748e32 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 151c360ae..82b0a6b79 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 63c588e0f..b8f3fc642 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 2896ddcb4..3b6e37d03 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 827a0f3b7..de0fa7e18 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_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c index a7964594a..7a8b59f41 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c @@ -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, diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c index 74716aff4..0941c5f33 100644 --- a/src/test/SDL_test_fuzzer.c +++ b/src/test/SDL_test_fuzzer.c @@ -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); } diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c index 4b8be17c1..ffdc593ac 100644 --- a/src/test/SDL_test_harness.c +++ b/src/test/SDL_test_harness.c @@ -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 */ diff --git a/src/thread/stdcpp/SDL_systhread.cpp b/src/thread/stdcpp/SDL_systhread.cpp index b7b1be77c..a1d1fd17c 100644 --- a/src/thread/stdcpp/SDL_systhread.cpp +++ b/src/thread/stdcpp/SDL_systhread.cpp @@ -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; diff --git a/src/thread/vita/SDL_systhread.c b/src/thread/vita/SDL_systhread.c index 1643506bb..013de1134 100644 --- a/src/thread/vita/SDL_systhread.c +++ b/src/thread/vita/SDL_systhread.c @@ -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 ); diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c index f770a3cc8..bf7c91076 100644 --- a/src/video/SDL_blit_N.c +++ b/src/video/SDL_blit_N.c @@ -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 diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 64e3b95a1..4a5d29853 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -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); diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index db67e46af..758c6fbf7 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -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; diff --git a/src/video/SDL_vulkan_internal.h b/src/video/SDL_vulkan_internal.h index 4345b38bc..5242aecef 100644 --- a/src/video/SDL_vulkan_internal.h +++ b/src/video/SDL_vulkan_internal.h @@ -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); diff --git a/src/video/arm/pixman-arm-neon-asm.S b/src/video/arm/pixman-arm-neon-asm.S index e6ef64603..f9549621a 100644 --- a/src/video/arm/pixman-arm-neon-asm.S +++ b/src/video/arm/pixman-arm-neon-asm.S @@ -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 diff --git a/src/video/cocoa/SDL_cocoamodes.m b/src/video/cocoa/SDL_cocoamodes.m index 2daff95b2..e6b90b85a 100644 --- a/src/video/cocoa/SDL_cocoamodes.m +++ b/src/video/cocoa/SDL_cocoamodes.m @@ -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); diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index a81f0fda8..fc29c5a59 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -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; } diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m index cc4d38489..167e73b18 100644 --- a/src/video/cocoa/SDL_cocoavideo.m +++ b/src/video/cocoa/SDL_cocoavideo.m @@ -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 diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 7abd873f9..77db1e895 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -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; diff --git a/src/video/kmsdrm/SDL_kmsdrmmouse.c b/src/video/kmsdrm/SDL_kmsdrmmouse.c index 4ed8b7c2a..962802cef 100644 --- a/src/video/kmsdrm/SDL_kmsdrmmouse.c +++ b/src/video/kmsdrm/SDL_kmsdrmmouse.c @@ -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) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 7ddef3f4c..927af657c 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -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. */ diff --git a/src/video/n3ds/SDL_n3dsvideo.h b/src/video/n3ds/SDL_n3dsvideo.h index fab0f7c89..0c0af19c2 100644 --- a/src/video/n3ds/SDL_n3dsvideo.h +++ b/src/video/n3ds/SDL_n3dsvideo.h @@ -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 diff --git a/src/video/qnx/SDL_qnxkeyboard.c b/src/video/qnx/SDL_qnxkeyboard.c index 348af4af1..4b091dc5d 100644 --- a/src/video/qnx/SDL_qnxkeyboard.c +++ b/src/video/qnx/SDL_qnxkeyboard.c @@ -27,7 +27,7 @@ #include /** - * 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[] = { diff --git a/src/video/raspberry/SDL_rpimouse.c b/src/video/raspberry/SDL_rpimouse.c index 4ef0387e0..e188b37c7 100644 --- a/src/video/raspberry/SDL_rpimouse.c +++ b/src/video/raspberry/SDL_rpimouse.c @@ -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"); diff --git a/src/video/raspberry/SDL_rpivideo.c b/src/video/raspberry/SDL_rpivideo.c index 0b0b37623..40519a923 100644 --- a/src/video/raspberry/SDL_rpivideo.c +++ b/src/video/raspberry/SDL_rpivideo.c @@ -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(); diff --git a/src/video/sdlgenblit.pl b/src/video/sdlgenblit.pl index 1b0aca3f1..1db1ae51a 100755 --- a/src/video/sdlgenblit.pl +++ b/src/video/sdlgenblit.pl @@ -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 */ /* diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m index 2eccb1bec..51bef011f 100644 --- a/src/video/uikit/SDL_uikitvideo.m +++ b/src/video/uikit/SDL_uikitvideo.m @@ -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) diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m index a26b0e4f9..13aa86462 100644 --- a/src/video/uikit/SDL_uikitwindow.m +++ b/src/video/uikit/SDL_uikitwindow.m @@ -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; diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index cb1a1ab93..0fbc267b5 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -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 diff --git a/src/video/windows/SDL_windowsmessagebox.c b/src/video/windows/SDL_windowsmessagebox.c index d49b40b9c..b5459da5e 100644 --- a/src/video/windows/SDL_windowsmessagebox.c +++ b/src/video/windows/SDL_windowsmessagebox.c @@ -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) { diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index 130261c4b..fbfefe324 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -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; diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp index 2164a0b21..b98f67526 100644 --- a/src/video/winrt/SDL_winrtvideo.cpp +++ b/src/video/winrt/SDL_winrtvideo.cpp @@ -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, diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 6607c1502..212ea4117 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -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),