Brenton Bostick hace 1 mes
padre
commit
f361034ac3

+ 2 - 2
src/audio/SDL_wave.c

@@ -813,7 +813,7 @@ static bool IMA_ADPCM_Init(WaveFile *file, size_t datalength)
 
     if (format->formattag == EXTENSIBLE_CODE) {
         /* There's no specification for this, but it's basically the same
-         * format because the extensible header has wSampePerBlocks too.
+         * format because the extensible header has wSamplePerBlocks too.
          */
     } else {
         // The Standards Update says there 'should' be 2 bytes for wSamplesPerBlock.
@@ -1852,7 +1852,7 @@ static bool WaveLoad(SDL_IOStream *src, WaveFile *file, SDL_AudioSpec *spec, Uin
 
     /* Step through all chunks and save information on the fmt, data, and fact
      * chunks. Ignore the chunks we don't know as per specification. This
-     * currently also ignores cue, list, and slnt chunks.
+     * currently also ignores cue, list, and inst chunks.
      */
     while ((Uint64)RIFFend > (Uint64)chunk->position + chunk->length + (chunk->length & 1)) {
         // Abort after too many chunks or else corrupt files may waste time.

+ 3 - 3
src/audio/alsa/SDL_alsa_audio.c

@@ -652,7 +652,7 @@ static void swizzle_map_compute_alsa_subscan(const struct ALSA_pcm_cfg_ctx *ctx,
     }
 }
 
-// XXX: this must stay playback/recording symetric.
+// XXX: this must stay playback/recording symmetric.
 static void swizzle_map_compute(const struct ALSA_pcm_cfg_ctx *ctx, int *swizzle_map, bool *needs_swizzle)
 {
     *needs_swizzle = false;
@@ -1069,7 +1069,7 @@ static bool ALSA_pcm_cfg_hw(struct ALSA_pcm_cfg_ctx *ctx)
     }
 
     // Here, status == CHANS_N_NOT_CONFIGURED
-    return SDL_SetError("ALSA: Coudn't configure targetting any SDL supported channel number");
+    return SDL_SetError("ALSA: Couldn't configure targeting any SDL supported channel number");
 }
 #undef CHANS_N_SCAN_MODE__EQUAL_OR_ABOVE_REQUESTED_CHANS_N
 #undef CHANS_N_SCAN_MODE__BELOW_REQUESTED_CHANS_N
@@ -1150,7 +1150,7 @@ static bool ALSA_OpenDevice(SDL_AudioDevice *device)
         goto err_close_pcm;
     }
 
-    // from here, we get only the alsa chmap queries in cfg_ctx to explicitely clean, hwparams is
+    // from here, we get only the alsa chmap queries in cfg_ctx to explicitly clean, hwparams is
     // uninstalled upon pcm closing
 
     // This is useful for debugging

+ 2 - 2
src/audio/qnx/SDL_qsa_audio.c

@@ -89,8 +89,8 @@ static void QSA_InitAudioParams(snd_pcm_channel_params_t * cpars)
 static bool QSA_WaitDevice(SDL_AudioDevice *device)
 {
     // Setup timeout for playing one fragment equal to 2 seconds
-    // If timeout occurred than something wrong with hardware or driver
-    // For example, Vortex 8820 audio driver stucks on second DAC because
+    // If timeout occurred then something wrong with hardware or driver
+    // For example, Vortex 8820 audio driver sticks on second DAC because
     // it doesn't exist !
     const int result = SDL_IOReady(device->hidden->audio_fd,
                                    device->recording ? SDL_IOR_READ : SDL_IOR_WRITE,

+ 1 - 1
src/camera/android/SDL_camera_android.c

@@ -729,7 +729,7 @@ static void onCameraAvailable(void *context, const char *cameraId)
 static void onCameraUnavailable(void *context, const char *cameraId)
 {
     #if DEBUG_CAMERA
-    SDL_Log("CAMERA: CB onCameraUnvailable('%s')", cameraId);
+    SDL_Log("CAMERA: CB onCameraUnavailable('%s')", cameraId);
     #endif
 
     SDL_assert(cameraId != NULL);

+ 1 - 1
src/core/android/SDL_android.c

@@ -1644,7 +1644,7 @@ SDL_DisplayOrientation Android_JNI_GetDisplayCurrentOrientation(void)
     return displayCurrentOrientation;
 }
 
-void Android_JNI_MinizeWindow(void)
+void Android_JNI_MinimizeWindow(void)
 {
     JNIEnv *env = Android_JNI_GetEnv();
     (*env)->CallStaticVoidMethod(env, mActivityClass, midMinimizeWindow);

+ 1 - 1
src/core/android/SDL_android.h

@@ -61,7 +61,7 @@ void Android_SetAllowRecreateActivity(bool enabled);
 extern void Android_JNI_SetActivityTitle(const char *title);
 extern void Android_JNI_SetWindowStyle(bool fullscreen);
 extern void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint);
-extern void Android_JNI_MinizeWindow(void);
+extern void Android_JNI_MinimizeWindow(void);
 extern bool Android_JNI_ShouldMinimizeOnFocusLoss(void);
 
 extern bool Android_JNI_GetAccelerometerValues(float values[3]);

+ 1 - 1
src/dynapi/gendynapi.py

@@ -451,7 +451,7 @@ def get_header_list() -> list[Path]:
 
     return ret
 
-# Write the new API in files: _procs.h _overrivides.h and .sym
+# Write the new API in files: _procs.h _overrides.h and .sym
 def add_dyn_api(proc: SdlProcedure) -> None:
     decl_args: list[str] = []
     call_args = []

+ 2 - 2
src/events/SDL_windowevents.c

@@ -56,7 +56,7 @@ void SDL_RemoveWindowEventWatch(SDL_WindowEventWatchPriority priority, SDL_Event
     SDL_RemoveEventWatchList(&SDL_window_event_watchers[priority], filter, userdata);
 }
 
-static bool SDLCALL RemoveSupercededWindowEvents(void *userdata, SDL_Event *event)
+static bool SDLCALL RemoveSupersededWindowEvents(void *userdata, SDL_Event *event)
 {
     SDL_Event *new_event = (SDL_Event *)userdata;
 
@@ -232,7 +232,7 @@ bool SDL_SendWindowEvent(SDL_Window *window, SDL_EventType windowevent, int data
             windowevent == SDL_EVENT_WINDOW_SAFE_AREA_CHANGED ||
             windowevent == SDL_EVENT_WINDOW_EXPOSED ||
             windowevent == SDL_EVENT_WINDOW_OCCLUDED) {
-            SDL_FilterEvents(RemoveSupercededWindowEvents, &event);
+            SDL_FilterEvents(RemoveSupersededWindowEvents, &event);
         }
         posted = SDL_PushEvent(&event);
     }

+ 2 - 2
src/hidapi/ios/hid.m

@@ -403,7 +403,7 @@ typedef enum
 			NSLog( @"CoreBluetooth BLE hardware is powered on and ready" );
 
 			// at startup, if we have no already attached peripherals, do a 20s scan for new unpaired devices,
-			// otherwise callers should occaisionally do additional scans. we don't want to continuously be
+			// otherwise callers should occasionally do additional scans. we don't want to continuously be
 			// scanning because it drains battery, causes other nearby people to have a hard time pairing their
 			// Steam Controllers, and may also trigger firmware weirdness when a device attempts to start
 			// the pairing sequence multiple times concurrently
@@ -750,7 +750,7 @@ static void process_pending_events(void)
 
 - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
 {
-	NSLog( @"didUpdateNotifcationStateForCharacteristic %@ (%@)", characteristic, error );
+	NSLog( @"didUpdateNotificationStateForCharacteristic %@ (%@)", characteristic, error );
 }
 
 @end

+ 1 - 1
src/hidapi/linux/hid.c

@@ -147,7 +147,7 @@ static void register_error_str(wchar_t **error_str, const char *msg)
 #endif
 }
 
-/* Semilar to register_error_str, but allows passing a format string with va_list args into this function. */
+/* Similar to register_error_str, but allows passing a format string with va_list args into this function. */
 static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args)
 {
 	char msg[256];

+ 1 - 1
src/hidapi/mac/hid.c

@@ -1424,7 +1424,7 @@ void HID_API_EXPORT hid_close(hid_device *dev)
 
 	   UPD: The crash part was true in/until some version of macOS.
 	   Starting with macOS 10.15, there is an opposite effect in some environments:
-	   crash happenes if IOHIDDeviceClose() is not called.
+	   crash happens if IOHIDDeviceClose() is not called.
 	   Not leaking a resource in all tested environments.
 	*/
 	if (is_macos_10_10_or_greater || !dev->disconnected) {

+ 1 - 1
src/hidapi/netbsd/hid.c

@@ -96,7 +96,7 @@ static void register_error_str(wchar_t **error_str, const char *msg)
 	*error_str = utf8_to_wchar_t(msg);
 }
 
-/* Semilar to register_error_str, but allows passing a format string with va_list args into this function. */
+/* Similar to register_error_str, but allows passing a format string with va_list args into this function. */
 static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args)
 {
 	char msg[256];

+ 1 - 1
src/joystick/controller_list.h

@@ -418,7 +418,7 @@ static const ControllerDescription_t arrControllers[] = {
 	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2012 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X Cuphead EnWired Controller - Mugman
 	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2015 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Controller - Blue Hint
 	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2016 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Controller - Green Hint
-	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Cntroller - Arctic Camo
+	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Controller - Arctic Camo
 	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2018 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Controller Arc Lightning
 	{ MAKE_CONTROLLER_ID( 0x20d6, 0x2019 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Controller Royal Purple
 	{ MAKE_CONTROLLER_ID( 0x20d6, 0x201a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" },       // PowerA Xbox Series X EnWired Controller Nebula

+ 1 - 1
src/joystick/hidapi/SDL_hidapi_steam_hori.c

@@ -312,7 +312,7 @@ static void HIDAPI_DriverSteamHori_HandleStatePacket(SDL_Joystick *joystick, SDL
         ctx->sensor_ticks += delta;
 
         /* Sensor timestamp is in 1us units, but there seems to be some issues with the values reported from the device */
-        sensor_timestamp = timestamp; // if the values were good we woudl call SDL_US_TO_NS(ctx->sensor_ticks);
+        sensor_timestamp = timestamp; // if the values were good we would call SDL_US_TO_NS(ctx->sensor_ticks);
 
         const float accelScale = SDL_STANDARD_GRAVITY * 8 / 32768.0f;
         const float gyroScale = DEG2RAD(2048);

+ 3 - 3
src/joystick/hidapi/steam/controller_constants.h

@@ -353,7 +353,7 @@ enum GamepadButtons
 // Mode adjust
 enum ModeAdjustModes
 {
-	MODE_ADJUST_SENSITITY=1,
+	MODE_ADJUST_SENSITIVITY=1,
 	MODE_ADJUST_LEFT_PAD_SECONDARY_MODE,
 	MODE_ADJUST_RIGHT_PAD_SECONDARY_MODE,
 	MODE_ADJUST_COUNT
@@ -364,8 +364,8 @@ typedef enum
 {
 	ATTRIB_UNIQUE_ID,
 	ATTRIB_PRODUCT_ID,
-	ATTRIB_PRODUCT_REVISON,											// deprecated
-	ATTRIB_CAPABILITIES = ATTRIB_PRODUCT_REVISON,	// intentional aliasing
+	ATTRIB_PRODUCT_REVISION,											// deprecated
+	ATTRIB_CAPABILITIES = ATTRIB_PRODUCT_REVISION,	// intentional aliasing
 	ATTRIB_FIRMWARE_VERSION,										// deprecated
 	ATTRIB_FIRMWARE_BUILD_TIME,
 	ATTRIB_RADIO_FIRMWARE_BUILD_TIME,

+ 2 - 2
src/joystick/hidapi/steam/controller_structs.h

@@ -112,7 +112,7 @@ typedef struct {
 	int16_t dur_ms; 			// Duration of tone / rumble (if applicable) (neg = infinite)
 
 	uint16_t noise_intensity;
-	uint16_t lfo_freq; 			// Drives both tone and rumble geneators
+	uint16_t lfo_freq; 			// Drives both tone and rumble generators
 	uint8_t lfo_depth; 			// percentage, typically 100
 	uint8_t rand_tone_gain; 	// Randomize each LFO cycle's gain
 	uint8_t script_id; 			// Used w/ dBgain for scripted haptics
@@ -261,7 +261,7 @@ typedef struct
 	short sRightPadX;
 	short sRightPadY;
 
-	//This mimcs how the dongle reconstitutes HID packets, there will be 0-4 shorts depending on gyro mode
+	//This mimics how the dongle reconstitutes HID packets, there will be 0-4 shorts depending on gyro mode
 	unsigned char ucGyroDataType; //TODO could maybe find some unused bits in the button field for this info (is only 2bits)
 	short sGyro[4];
 

+ 1 - 1
src/libm/e_exp.c

@@ -27,7 +27,7 @@
  *	the interval [0,0.34658]:
  *	Write
  *	    R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
- *      We use a special Reme algorithm on [0,0.34658] to generate
+ *      We use a special Remez algorithm on [0,0.34658] to generate
  * 	a polynomial of degree 5 to approximate R. The maximum error
  *	of this polynomial approximation is bounded by 2**-59. In
  *	other words,

+ 2 - 2
src/libm/e_log.c

@@ -16,7 +16,7 @@
 #endif
 
 /* __ieee754_log(x)
- * Return the logrithm of x
+ * Return the logarithm of x
  *
  * Method :
  *   1. Argument Reduction: find k and f such that
@@ -27,7 +27,7 @@
  *	Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
  *		 = 2s + 2/3 s**3 + 2/5 s**5 + .....,
  *	     	 = 2s + s*R
- *      We use a special Reme algorithm on [0,0.1716] to generate
+ *      We use a special Remez algorithm on [0,0.1716] to generate
  * 	a polynomial of degree 14 to approximate R The maximum error
  *	of this polynomial approximation is bounded by 2**-58.45. In
  *	other words,

+ 1 - 1
src/libm/e_sqrt.c

@@ -331,7 +331,7 @@ B.  sqrt(x) by Reciproot Iteration
 
 	Let x0 and x1 be the leading and the trailing 32-bit words of
 	a floating point number x (in IEEE double format) respectively
-	(see section A). By performing shifs and subtracts on x0 and y0,
+	(see section A). By performing shifts and subtracts on x0 and y0,
 	we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
 
 	    k := 0x5fe80000 - (x0>>1);

+ 1 - 1
src/libm/k_rem_pio2.c

@@ -48,7 +48,7 @@
  *			64-bit  precision	2
  *			113-bit precision	3
  *		The actual value is the sum of them. Thus for 113-bit
- *		precison, one may have to do something like:
+ *		precision, one may have to do something like:
  *
  *		long double t,w,r_head, r_tail;
  *		t = (long double)y[2] + (long double)y[1];

+ 1 - 1
src/render/SDL_render.c

@@ -4872,7 +4872,7 @@ static bool SDLCALL SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
             continue;
         }
 
-        /* Two triangles forming a quadialateral,
+        /* Two triangles forming a quadrilateral,
          * prev and current triangles must have exactly 2 common vertices */
         {
             int cnt = 0, j = 3;

+ 1 - 1
src/stdlib/SDL_malloc.c

@@ -3035,7 +3035,7 @@ static size_t traverse_and_check(mstate m);
   http://www.usenix.org/events/lisa03/tech/robertson.html The footer
   of an inuse chunk holds the xor of its mstate and a random seed,
   that is checked upon calls to free() and realloc().  This is
-  (probabalistically) unguessable from outside the program, but can be
+  (probabilistically) unguessable from outside the program, but can be
   computed by any code successfully malloc'ing any chunk, so does not
   itself provide protection against code that has already broken
   security through some other means.  Unlike Robertson et al, we

+ 2 - 2
src/video/android/SDL_androidwindow.c

@@ -126,7 +126,7 @@ SDL_FullscreenResult Android_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Win
         /* Ensure our size matches reality after we've executed the window style change.
          *
          * It is possible that we've set width and height to the full-size display, but on
-         * Samsung DeX or Chromebooks or other windowed Android environemtns, our window may
+         * Samsung DeX or Chromebooks or other windowed Android environments, our window may
          * still not be the full display size.
          */
         if (!SDL_IsDeXMode() && !SDL_IsChromebook()) {
@@ -165,7 +165,7 @@ endfunction:
 
 void Android_MinimizeWindow(SDL_VideoDevice *_this, SDL_Window *window)
 {
-    Android_JNI_MinizeWindow();
+    Android_JNI_MinimizeWindow();
 }
 
 void Android_SetWindowResizable(SDL_VideoDevice *_this, SDL_Window *window, bool resizable)