Fix typos in comments.

(cherry picked from commit 23fec649c2)
This commit is contained in:
Eddy Jansson
2026-01-30 16:10:05 +01:00
committed by Sam Lantinga
parent 5a4f1cbceb
commit ff2a43bfbf
12 changed files with 22 additions and 22 deletions

View File

@@ -66,7 +66,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
/* To update a streaming texture, you need to lock it first. This gets you access to the pixels.
Note that this is considered a _write-only_ operation: the buffer you get from locking
might not acutally have the existing contents of the texture, and you have to write to every
might not actually have the existing contents of the texture, and you have to write to every
locked pixel! */
/* You can use SDL_LockTexture() to get an array of raw pixels, but we're going to use

View File

@@ -1021,7 +1021,7 @@ static int ALSA_pcm_cfg_hw_chans_n_scan(struct ALSA_pcm_cfg_ctx *ctx, unsigned i
SDL_SetError("ALSA: Couldn't set the period size: %s", ALSA_snd_strerror(status));
return -1;
}
// let approximate the minimun number of periods per buffer (we target a double buffer)
// let approximate the minimum number of periods per buffer (we target a double buffer)
ctx->periods = 2;
status = ALSA_snd_pcm_hw_params_set_periods_min(ctx->device->hidden->pcm, ctx->hwparams, &(ctx->periods), NULL);
if (status < 0) {

View File

@@ -260,7 +260,7 @@ void CAudio::MaoscPlayComplete(TInt aError)
// should never see the stream end -- we are continuously feeding it more
// data! Many underflow errors mean that the latency target is too low.
if (aError == KErrUnderflow) {
// The number of samples played gets resetted to zero when we restart
// The number of samples played gets reset to zero when we restart
// playback after underflow.
iBaseSamplesPlayed = iSamplesWritten;

View File

@@ -245,7 +245,7 @@ static SDL_CameraFrameResult COREMEDIA_AcquireFrame(SDL_Camera *device, SDL_Surf
if (device->position == SDL_CAMERA_POSITION_BACK_FACING) {
static const Uint16 back_rotations[4][4] = {
{ 90, 90, 90, 90 }, // ui portrait
{ 270, 270, 270, 270 }, // ui portait upside down
{ 270, 270, 270, 270 }, // ui portrait upside down
{ 0, 0, 0, 0 }, // ui landscape left
{ 180, 180, 180, 180 } // ui landscape right
};
@@ -253,7 +253,7 @@ static SDL_CameraFrameResult COREMEDIA_AcquireFrame(SDL_Camera *device, SDL_Surf
} else {
static const Uint16 front_rotations[4][4] = {
{ 90, 90, 270, 270 }, // ui portrait
{ 270, 270, 90, 90 }, // ui portait upside down
{ 270, 270, 90, 90 }, // ui portrait upside down
{ 0, 0, 180, 180 }, // ui landscape left
{ 180, 180, 0, 0 } // ui landscape right
};
@@ -462,7 +462,7 @@ static bool COREMEDIA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *spec)
// the device's accelerometer, so I assume this burns power, so we don't leave this running all
// the time. These calls nest, so we just need to call the matching `end` message when we close.
// You _can_ get an actual events through this mechanism, but we just want to be able to call
// -[UIDevice orientation], which will update with real info while notificatons are enabled.
// -[UIDevice orientation], which will update with real info while notifications are enabled.
UIDevice *uidevice = [UIDevice currentDevice];
[uidevice beginGeneratingDeviceOrientationNotifications];
hidden.last_device_orientation = uidevice.orientation;

View File

@@ -132,7 +132,7 @@ bool DBUS_ApplyWindowProgress(SDL_VideoDevice *_this, SDL_Window *window)
DBusMessageIter args, props;
dbus->message_iter_init_append(msg, &args);
dbus->message_iter_append_basic(&args, DBUS_TYPE_STRING, &desktop_path); // Setup app_uri paramter
dbus->message_iter_append_basic(&args, DBUS_TYPE_STRING, &desktop_path); // Setup app_uri parameter
dbus->message_iter_open_container(&args, DBUS_TYPE_ARRAY, "{sv}", &props); // Setup properties parameter
DBusMessageIter key_it, value_it;
// Set progress visible property

View File

@@ -256,7 +256,7 @@ static D3D12_BLEND_OP SDLToD3D12_BlendOp[] = {
SDL_COMPILE_TIME_ASSERT(SDLToD3D12_BlendOp, SDL_arraysize(SDLToD3D12_BlendOp) == SDL_GPU_BLENDOP_MAX_ENUM_VALUE);
// These are actually color formats.
// For some genius reason, D3D12 splits format capabilites for depth-stencil views.
// For some genius reason, D3D12 splits format capabilities for depth-stencil views.
static DXGI_FORMAT SDLToD3D12_TextureFormat[] = {
DXGI_FORMAT_UNKNOWN, // INVALID
DXGI_FORMAT_A8_UNORM, // A8_UNORM

View File

@@ -208,7 +208,7 @@
#define GIP_MOTOR_LEFT_IMPULSE (1u << 3)
#define GIP_MOTOR_ALL 0xF
/* Extended Comand constants */
/* Extended Command constants */
#define GIP_EXTCMD_GET_CAPABILITIES 0x00
#define GIP_EXTCMD_GET_TELEMETRY_DATA 0x01
#define GIP_EXTCMD_GET_SERIAL_NUMBER 0x04

View File

@@ -437,7 +437,7 @@ static bool HIDAPI_DriverSteamTriton_RumbleJoystick(SDL_HIDAPI_Device *device, S
{
int rc;
//RKRK Not sure about size. Probalby 64+1 is OK for ORs
//RKRK Not sure about size. Probably 64+1 is OK for ORs
Uint8 buffer[HID_RUMBLE_OUTPUT_REPORT_BYTES];
OutputReportMsg *msg = (OutputReportMsg *)(buffer);

View File

@@ -523,7 +523,7 @@ void Cocoa_HandleMouseEvent(SDL_VideoDevice *_this, NSEvent *event)
// has mouse focus, so we'll always set the focus even if we happen to miss
// NSEventTypeMouseEntered, which apparently happens if the window is
// created under the mouse on macOS 12.7. But, only set the focus if
// the event acutally has a non-NULL window, otherwise what would happen
// the event actually has a non-NULL window, otherwise what would happen
// is that after an NSEventTypeMouseEntered there would sometimes be
// NSEventTypeMouseMoved without a window causing us to suppress subsequent
// mouse move events.

View File

@@ -153,7 +153,7 @@ static bool KMSDRM_GLES_SwapWindowFenced(SDL_VideoDevice *_this, SDL_Window * wi
/* wait for GPU to finish rendering the frame (remember where we */
/* put the fence in the GL CMDSTREAM) before doing the changes */
/* requested in the atomic ioct (the pageflip in this case). */
/* (We export the GPU-side FENCE OJECT to the fence INPUT FD now, */
/* (We export the GPU-side FENCE OBJECT to the fence INPUT FD now,*/
/* not sooner, because now we are sure that the GPU-side fence is */
/* in the CMDSTREAM to be lifted when the CMDSTREAM to this point */
/* is completed). */

View File

@@ -491,18 +491,18 @@ void free_plane(KMSDRM_plane **_plane)
/* A PLANE reads a BUFFER, and a CRTC reads a PLANE and sends it's contents */
/* over to a CONNECTOR->ENCODER system (several CONNECTORS can be connected */
/* to the same PLANE). */
/* Think of a plane as a "frame" sorrounding a picture, where the "picture" */
/* Think of a plane as a "frame" surrounding a picture, where the "picture" */
/* is the buffer, and we move the "frame" from a picture to another, */
/* and the one that has the "frame" is the one sent over to the screen */
/* via the CONNECTOR->ENCODER system. */
/* Think of a PLANE as being "in the middle", it's the CENTRAL part */
/* bewteen the CRTC and the BUFFER that is shown on screen. */
/* between the CRTC and the BUFFER that is shown on screen. */
/* What we do here is connect a PLANE to a CRTC and a BUFFER. */
/* -ALWAYS set the CRTC_ID and FB_ID attribs of a plane at the same time, */
/* meaning IN THE SAME atomic request. */
/* -And NEVER destroy a GBM surface whose buffers are being read by a plane: */
/* first, move the plane away from those buffers and ONLY THEN destroy the */
/* buffers and/or the GBM surface containig them. */
/* buffers and/or the GBM surface containing them. */
/**********************************************************************************/
void
drm_atomic_set_plane_props(SDL_DisplayData *dispdata, struct KMSDRM_PlaneInfo *info)
@@ -1629,10 +1629,10 @@ static void KMSDRM_DestroySurfaces(SDL_VideoDevice *_this, SDL_Window *window)
plane_info.plane = dispdata->display_plane;
plane_info.crtc_id = 0;
plane_info.fb_id = 0;
/***********************************************************************/
/* 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. */
/************************************************************************/
drm_atomic_set_plane_props(dispdata, &plane_info);
ret = KMSDRM_drmModeSetCrtc(viddata->drm_fd, dispdata->crtc->crtc_id,
@@ -1642,7 +1642,7 @@ static void KMSDRM_DestroySurfaces(SDL_VideoDevice *_this, SDL_Window *window)
/* Issue atomic commit that is blocking and allows modesetting. */
if (drm_atomic_commit(_this, dispdata, true, true)) {
SDL_SetError("Failed to issue atomic commit on surfaces destruction.");
/* 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,

View File

@@ -830,7 +830,7 @@ static SDL_GLContext OPENVR_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window
int i;
SDL_VideoData *videodata = (SDL_VideoData *)_this->internal;
if (!videodata->hglrc) {
// Crate a surfaceless EGL Context
// Create a surfaceless EGL Context
HWND hwnd;
WNDCLASSA wnd;
@@ -982,7 +982,7 @@ static EGLint context_attribs[] = {
static bool SDL_EGL_InitInternal(SDL_VideoData * vd)
{
// Crate a surfaceless EGL Context
// Create a surfaceless EGL Context
EGLint major, minor;
EGLConfig eglCfg=NULL;
EGLBoolean b;