mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-23 10:09:48 +00:00
Fix typos (thanks @qndel!)
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb) codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF cd src; git checkout \ events/imKStoUCS.* \ hidapi \ joystick/controller_type.c \ joystick/controller_type.h \ joystick/hidapi/steam/controller_constants.h \ joystick/hidapi/steam/controller_structs.h \ libm \ stdlib/SDL_malloc.c \ stdlib/SDL_qsort.c \ stdlib/SDL_strtokr.c \ video/khronos \ video/x11/edid.h \ video/x11/edid-parse.c \ video/x11/xsettings-client.* \ video/yuv2rgb
This commit is contained in:
parent
e4f987f299
commit
bd04459cde
@ -1827,9 +1827,9 @@ But if you're migrating your code which uses masks, you probably have a format i
|
||||
|
||||
SDL_BlitSurface() and SDL_BlitSurfaceScaled() now have a const `dstrect` parameter and do not fill it in with the final destination rectangle.
|
||||
|
||||
SDL_BlitSurfaceScaled() and SDL_BlitSurfaceUncheckedScaled() now take a scale paramater.
|
||||
SDL_BlitSurfaceScaled() and SDL_BlitSurfaceUncheckedScaled() now take a scale parameter.
|
||||
|
||||
SDL_SoftStretch() now takes a scale paramater.
|
||||
SDL_SoftStretch() now takes a scale parameter.
|
||||
|
||||
SDL_PixelFormat is used instead of Uint32 for API functions that refer to pixel format by enumerated value.
|
||||
|
||||
|
@ -2497,7 +2497,7 @@ extern "C" {
|
||||
* system while relative mode is active, in case the desired confinement state
|
||||
* became out-of-sync due to interference from other running programs.
|
||||
*
|
||||
* The variable can be integers representing miliseconds between each refresh.
|
||||
* The variable can be integers representing milliseconds between each refresh.
|
||||
* A value of zero means SDL will not automatically refresh the confinement.
|
||||
* The default value varies depending on the operating system, this variable
|
||||
* might not have any effects on inapplicable platforms such as those without
|
||||
|
@ -129,14 +129,14 @@ SDL_bool SDL_TryLockSpinlock(SDL_SpinLock *lock)
|
||||
#elif defined(PS2)
|
||||
uint32_t oldintr;
|
||||
bool res = false;
|
||||
// disable interuption
|
||||
// disable interruption
|
||||
oldintr = DIntr();
|
||||
|
||||
if (*lock == 0) {
|
||||
*lock = 1;
|
||||
res = true;
|
||||
}
|
||||
// enable interuption
|
||||
// enable interruption
|
||||
if (oldintr) {
|
||||
EIntr();
|
||||
}
|
||||
|
@ -1013,7 +1013,7 @@ static bool GetAudioStreamDataInternal(SDL_AudioStream *stream, void *buf, int o
|
||||
// Calculate the number of input frames necessary for this request.
|
||||
// Because resampling happens "between" frames, The same number of output_frames
|
||||
// can require a different number of input_frames, depending on the resample_offset.
|
||||
// Infact, input_frames can sometimes even be zero when upsampling.
|
||||
// In fact, input_frames can sometimes even be zero when upsampling.
|
||||
const int input_frames = (int) SDL_GetResamplerInputFrames(output_frames, resample_rate, stream->resample_offset);
|
||||
|
||||
const int padding_frames = SDL_GetResamplerPaddingFrames(resample_rate);
|
||||
|
@ -28,7 +28,7 @@
|
||||
struct SDL_PrivateAudioData
|
||||
{
|
||||
Uint8 *mixbuf; // The file descriptor for the audio device
|
||||
Uint32 io_delay; // miliseconds to sleep in WaitDevice.
|
||||
Uint32 io_delay; // milliseconds to sleep in WaitDevice.
|
||||
};
|
||||
|
||||
#endif // SDL_dummyaudio_h_
|
||||
|
@ -116,7 +116,7 @@ bool SDL_AddCameraFormat(CameraFormatAddData *data, SDL_PixelFormat format, SDL_
|
||||
static bool ZombieWaitDevice(SDL_Camera *device)
|
||||
{
|
||||
if (!SDL_GetAtomicInt(&device->shutdown)) {
|
||||
// !!! FIXME: this is bad for several reasons (uses double, could be precalculated, doesn't track elasped time).
|
||||
// !!! FIXME: this is bad for several reasons (uses double, could be precalculated, doesn't track elapsed time).
|
||||
const double duration = ((double) device->actual_spec.framerate_denominator / ((double) device->actual_spec.framerate_numerator));
|
||||
SDL_Delay((Uint32) (duration * 1000.0));
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ static const char *MediaStatusStr(const media_status_t rc)
|
||||
{
|
||||
switch (rc) {
|
||||
case AMEDIA_OK: return "no error";
|
||||
case AMEDIACODEC_ERROR_INSUFFICIENT_RESOURCE: return "insuffient resources";
|
||||
case AMEDIACODEC_ERROR_INSUFFICIENT_RESOURCE: return "insufficient resources";
|
||||
case AMEDIACODEC_ERROR_RECLAIMED: return "reclaimed";
|
||||
case AMEDIA_ERROR_UNKNOWN: return "unknown error";
|
||||
case AMEDIA_ERROR_MALFORMED: return "malformed";
|
||||
|
@ -352,9 +352,9 @@ void SDL_EVDEV_Poll(void)
|
||||
}
|
||||
|
||||
/* BTN_TOUCH event value 1 indicates there is contact with
|
||||
a touchscreen or trackpad (earlist finger's current
|
||||
a touchscreen or trackpad (earliest finger's current
|
||||
position is sent in EV_ABS ABS_X/ABS_Y, switching to
|
||||
next finger after earlist is released) */
|
||||
next finger after earliest is released) */
|
||||
if (item->is_touchscreen && event->code == BTN_TOUCH) {
|
||||
if (item->touchscreen_data->max_slots == 1) {
|
||||
if (event->value) {
|
||||
|
@ -161,7 +161,7 @@ extern BOOL WIN_IsRectEmpty(const RECT *rect);
|
||||
|
||||
extern SDL_AudioFormat SDL_WaveFormatExToSDLFormat(WAVEFORMATEX *waveformat);
|
||||
|
||||
// WideCharToMultiByte, but with some WinXP manangement.
|
||||
// WideCharToMultiByte, but with some WinXP management.
|
||||
extern int WIN_WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCCH lpDefaultChar, LPBOOL lpUsedDefaultChar);
|
||||
|
||||
// Ends C function definitions when using C++
|
||||
|
@ -46,7 +46,7 @@ char *convert_filter(const SDL_DialogFileFilter filter, NameTransform ntf,
|
||||
const char *suffix, const char *ext_prefix,
|
||||
const char *ext_separator, const char *ext_suffix);
|
||||
|
||||
// Converts the extenstion list of a filter into a single string.
|
||||
// Converts the extension list of a filter into a single string.
|
||||
// <prefix>[extension]{<separator>[extension]...}<suffix>
|
||||
char *convert_ext_list(const char *list, const char *prefix,
|
||||
const char *separator, const char *suffix);
|
||||
|
@ -85,7 +85,7 @@ def main():
|
||||
ignore_wiki_documentation = False
|
||||
continue
|
||||
|
||||
# Discard wiki documentions blocks.
|
||||
# Discard wiki documentations blocks.
|
||||
if line.startswith("#ifdef SDL_WIKI_DOCUMENTATION_SECTION"):
|
||||
ignore_wiki_documentation = True
|
||||
continue
|
||||
|
@ -888,7 +888,7 @@ struct D3D12UniformBuffer
|
||||
Uint32 currentBlockSize;
|
||||
};
|
||||
|
||||
// Foward function declarations
|
||||
// Forward function declarations
|
||||
|
||||
static void D3D12_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void D3D12_Wait(SDL_GPURenderer *driverData);
|
||||
|
@ -2408,7 +2408,7 @@ static void VULKAN_INTERNAL_TrackUniformBuffer(
|
||||
*
|
||||
* This strategy imposes certain limitations on resource usage flags.
|
||||
* For example, a texture cannot have both the SAMPLER and GRAPHICS_STORAGE usage flags,
|
||||
* because then it is imposible for the backend to infer which default usage mode the texture should use.
|
||||
* because then it is impossible for the backend to infer which default usage mode the texture should use.
|
||||
*
|
||||
* Sync hazards can be detected by setting VK_KHRONOS_VALIDATION_VALIDATE_SYNC=1 when using validation layers.
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ static Uint32 initial_blacklist_devices[] = {
|
||||
// Microsoft Nano Transceiver v2.0
|
||||
MAKE_VIDPID(0x045e, 0x0800),
|
||||
|
||||
MAKE_VIDPID(0x046d, 0xc30a), // Logitech, Inc. iTouch Composite keboard
|
||||
MAKE_VIDPID(0x046d, 0xc30a), // Logitech, Inc. iTouch Composite keyboard
|
||||
|
||||
MAKE_VIDPID(0x04d9, 0xa0df), // Tek Syndicate Mouse (E-Signal USB Gaming Mouse)
|
||||
|
||||
|
@ -31,7 +31,7 @@ bool SDL_SYS_OpenURL(const char *url)
|
||||
@autoreleasepool {
|
||||
|
||||
#ifdef SDL_PLATFORM_VISIONOS
|
||||
return SDL_Unsupported(); // openURL is not suported on visionOS
|
||||
return SDL_Unsupported(); // openURL is not supported on visionOS
|
||||
#else
|
||||
NSString *nsstr = [NSString stringWithUTF8String:url];
|
||||
NSURL *nsurl = [NSURL URLWithString:nsstr];
|
||||
|
@ -96,7 +96,7 @@ Sint32 SDL_rand_r(Uint64 *state, Sint32 n)
|
||||
|
||||
if (n < 0) {
|
||||
// The algorithm looks like it works for numbers < 0 but it has an
|
||||
// infintesimal chance of returning a value out of range.
|
||||
// infinitesimal chance of returning a value out of range.
|
||||
// Returning -SDL_rand(abs(n)) blows up at INT_MIN instead.
|
||||
// It's easier to just say no.
|
||||
return 0;
|
||||
|
@ -523,7 +523,7 @@ int SDLTest_ExecuteTestSuiteRunner(SDLTest_TestSuiteRunner *runner)
|
||||
|
||||
/* Mix the list of suites to run them in random order */
|
||||
{
|
||||
/* Exclude last test "subsystemsTestSuite" which is said to interfer with other tests */
|
||||
/* Exclude last test "subsystemsTestSuite" which is said to interfere with other tests */
|
||||
nbSuites--;
|
||||
|
||||
if (runner->user.execKey != 0) {
|
||||
|
@ -195,7 +195,7 @@ SDL_bool SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks)
|
||||
void SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime)
|
||||
{
|
||||
/* Convert nanoseconds to Win32 ticks.
|
||||
* SDL_Time has a range of roughly 292 years, so even SDL_MIN_TIME can't underflow thw Win32 epoch.
|
||||
* SDL_Time has a range of roughly 292 years, so even SDL_MIN_TIME can't underflow the Win32 epoch.
|
||||
*/
|
||||
const Uint64 wtime = (Uint64)((ticks / 100) + DELTA_EPOCH_1601_100NS);
|
||||
|
||||
|
@ -2896,8 +2896,8 @@ SDL_bool SDL_SetWindowSize(SDL_Window *window, int w, int h)
|
||||
return SDL_InvalidParamError("h");
|
||||
}
|
||||
|
||||
// It is possible for the aspect ratio contraints to not satisfy the size constraints.
|
||||
// The size constraints will override the aspect ratio contraints so we will apply the
|
||||
// It is possible for the aspect ratio constraints to not satisfy the size constraints.
|
||||
// The size constraints will override the aspect ratio constraints so we will apply the
|
||||
// the aspect ratio constraints first
|
||||
float new_aspect = w / (float)h;
|
||||
if (window->max_aspect > 0.0f && new_aspect > window->max_aspect) {
|
||||
|
@ -1048,7 +1048,7 @@ static void touch_handler_up(void *data, struct wl_touch *touch, uint32_t serial
|
||||
SDL_SendTouch(Wayland_GetTouchTimestamp(input, timestamp), (SDL_TouchID)(uintptr_t)touch,
|
||||
(SDL_FingerID)(id + 1), window_data->sdlwindow, false, x, y, 0.0f);
|
||||
|
||||
/* If the seat lacks pointer focus, the seat's keyboard focus is another window or NULL, this window curently
|
||||
/* If the seat lacks pointer focus, the seat's keyboard focus is another window or NULL, this window currently
|
||||
* has mouse focus, and the surface has no active touch events, consider mouse focus to be lost.
|
||||
*/
|
||||
if (!input->pointer_focus && input->keyboard_focus != window_data &&
|
||||
|
@ -617,7 +617,7 @@ static void UpdateWindowFullscreen(SDL_Window *window, bool fullscreen)
|
||||
SDL_UpdateFullscreenMode(window, SDL_FULLSCREEN_OP_ENTER, false);
|
||||
|
||||
/* Set the output for exclusive fullscreen windows when entering fullscreen from a
|
||||
* compositor event, or if the fullscreen paramaters were changed between the initial
|
||||
* compositor event, or if the fullscreen parameters were changed between the initial
|
||||
* fullscreen request and now, to ensure that the window is on the correct output,
|
||||
* as requested by the client.
|
||||
*/
|
||||
|
@ -454,11 +454,11 @@ static void PoofThing_ondrag(Thing *thing, int button, float x, float y)
|
||||
static void PoofThing_ontick(Thing *thing, Uint64 now)
|
||||
{
|
||||
const int lifetime = POOF_LIFETIME;
|
||||
const int elasped = (int) (now - thing->createticks);
|
||||
if (elasped > lifetime) {
|
||||
const int elapsed = (int) (now - thing->createticks);
|
||||
if (elapsed > lifetime) {
|
||||
DestroyThing(thing);
|
||||
} else {
|
||||
const float pct = ((float) elasped) / ((float) lifetime);
|
||||
const float pct = ((float) elapsed) / ((float) lifetime);
|
||||
thing->a = (Uint8) (int) (255.0f - (pct * 255.0f));
|
||||
thing->scale = 1.0f - pct; /* shrink to nothing! */
|
||||
}
|
||||
@ -962,13 +962,13 @@ static void PhysicalDeviceThing_ondrop(Thing *thing, int button, float x, float
|
||||
static void PhysicalDeviceThing_ontick(Thing *thing, Uint64 now)
|
||||
{
|
||||
const int lifetime = POOF_LIFETIME;
|
||||
const int elasped = (int) (now - thing->createticks);
|
||||
if (elasped > lifetime) {
|
||||
const int elapsed = (int) (now - thing->createticks);
|
||||
if (elapsed > lifetime) {
|
||||
thing->scale = 1.0f;
|
||||
thing->a = 255;
|
||||
thing->ontick = NULL; /* no more ticking. */
|
||||
} else {
|
||||
const float pct = ((float) elasped) / ((float) lifetime);
|
||||
const float pct = ((float) elapsed) / ((float) lifetime);
|
||||
thing->a = (Uint8) (int) (pct * 255.0f);
|
||||
thing->scale = pct; /* grow to normal size */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user