mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
fix typos
This commit is contained in:

committed by
Sam Lantinga

parent
2ed1c35ca6
commit
f361034ac3
@@ -813,7 +813,7 @@ static bool IMA_ADPCM_Init(WaveFile *file, size_t datalength)
|
|||||||
|
|
||||||
if (format->formattag == EXTENSIBLE_CODE) {
|
if (format->formattag == EXTENSIBLE_CODE) {
|
||||||
/* There's no specification for this, but it's basically the same
|
/* 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 {
|
} else {
|
||||||
// The Standards Update says there 'should' be 2 bytes for wSamplesPerBlock.
|
// 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
|
/* 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
|
* 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)) {
|
while ((Uint64)RIFFend > (Uint64)chunk->position + chunk->length + (chunk->length & 1)) {
|
||||||
// Abort after too many chunks or else corrupt files may waste time.
|
// Abort after too many chunks or else corrupt files may waste time.
|
||||||
|
@@ -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)
|
static void swizzle_map_compute(const struct ALSA_pcm_cfg_ctx *ctx, int *swizzle_map, bool *needs_swizzle)
|
||||||
{
|
{
|
||||||
*needs_swizzle = false;
|
*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
|
// 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__EQUAL_OR_ABOVE_REQUESTED_CHANS_N
|
||||||
#undef CHANS_N_SCAN_MODE__BELOW_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;
|
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
|
// uninstalled upon pcm closing
|
||||||
|
|
||||||
// This is useful for debugging
|
// This is useful for debugging
|
||||||
|
@@ -89,8 +89,8 @@ static void QSA_InitAudioParams(snd_pcm_channel_params_t * cpars)
|
|||||||
static bool QSA_WaitDevice(SDL_AudioDevice *device)
|
static bool QSA_WaitDevice(SDL_AudioDevice *device)
|
||||||
{
|
{
|
||||||
// Setup timeout for playing one fragment equal to 2 seconds
|
// Setup timeout for playing one fragment equal to 2 seconds
|
||||||
// If timeout occurred than something wrong with hardware or driver
|
// If timeout occurred then something wrong with hardware or driver
|
||||||
// For example, Vortex 8820 audio driver stucks on second DAC because
|
// For example, Vortex 8820 audio driver sticks on second DAC because
|
||||||
// it doesn't exist !
|
// it doesn't exist !
|
||||||
const int result = SDL_IOReady(device->hidden->audio_fd,
|
const int result = SDL_IOReady(device->hidden->audio_fd,
|
||||||
device->recording ? SDL_IOR_READ : SDL_IOR_WRITE,
|
device->recording ? SDL_IOR_READ : SDL_IOR_WRITE,
|
||||||
|
@@ -729,7 +729,7 @@ static void onCameraAvailable(void *context, const char *cameraId)
|
|||||||
static void onCameraUnavailable(void *context, const char *cameraId)
|
static void onCameraUnavailable(void *context, const char *cameraId)
|
||||||
{
|
{
|
||||||
#if DEBUG_CAMERA
|
#if DEBUG_CAMERA
|
||||||
SDL_Log("CAMERA: CB onCameraUnvailable('%s')", cameraId);
|
SDL_Log("CAMERA: CB onCameraUnavailable('%s')", cameraId);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SDL_assert(cameraId != NULL);
|
SDL_assert(cameraId != NULL);
|
||||||
|
@@ -1644,7 +1644,7 @@ SDL_DisplayOrientation Android_JNI_GetDisplayCurrentOrientation(void)
|
|||||||
return displayCurrentOrientation;
|
return displayCurrentOrientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Android_JNI_MinizeWindow(void)
|
void Android_JNI_MinimizeWindow(void)
|
||||||
{
|
{
|
||||||
JNIEnv *env = Android_JNI_GetEnv();
|
JNIEnv *env = Android_JNI_GetEnv();
|
||||||
(*env)->CallStaticVoidMethod(env, mActivityClass, midMinimizeWindow);
|
(*env)->CallStaticVoidMethod(env, mActivityClass, midMinimizeWindow);
|
||||||
|
@@ -61,7 +61,7 @@ void Android_SetAllowRecreateActivity(bool enabled);
|
|||||||
extern void Android_JNI_SetActivityTitle(const char *title);
|
extern void Android_JNI_SetActivityTitle(const char *title);
|
||||||
extern void Android_JNI_SetWindowStyle(bool fullscreen);
|
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_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_ShouldMinimizeOnFocusLoss(void);
|
||||||
|
|
||||||
extern bool Android_JNI_GetAccelerometerValues(float values[3]);
|
extern bool Android_JNI_GetAccelerometerValues(float values[3]);
|
||||||
|
@@ -451,7 +451,7 @@ def get_header_list() -> list[Path]:
|
|||||||
|
|
||||||
return ret
|
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:
|
def add_dyn_api(proc: SdlProcedure) -> None:
|
||||||
decl_args: list[str] = []
|
decl_args: list[str] = []
|
||||||
call_args = []
|
call_args = []
|
||||||
|
@@ -56,7 +56,7 @@ void SDL_RemoveWindowEventWatch(SDL_WindowEventWatchPriority priority, SDL_Event
|
|||||||
SDL_RemoveEventWatchList(&SDL_window_event_watchers[priority], filter, userdata);
|
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;
|
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_SAFE_AREA_CHANGED ||
|
||||||
windowevent == SDL_EVENT_WINDOW_EXPOSED ||
|
windowevent == SDL_EVENT_WINDOW_EXPOSED ||
|
||||||
windowevent == SDL_EVENT_WINDOW_OCCLUDED) {
|
windowevent == SDL_EVENT_WINDOW_OCCLUDED) {
|
||||||
SDL_FilterEvents(RemoveSupercededWindowEvents, &event);
|
SDL_FilterEvents(RemoveSupersededWindowEvents, &event);
|
||||||
}
|
}
|
||||||
posted = SDL_PushEvent(&event);
|
posted = SDL_PushEvent(&event);
|
||||||
}
|
}
|
||||||
|
@@ -403,7 +403,7 @@ typedef enum
|
|||||||
NSLog( @"CoreBluetooth BLE hardware is powered on and ready" );
|
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,
|
// 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
|
// 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
|
// Steam Controllers, and may also trigger firmware weirdness when a device attempts to start
|
||||||
// the pairing sequence multiple times concurrently
|
// 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
|
- (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
|
||||||
{
|
{
|
||||||
NSLog( @"didUpdateNotifcationStateForCharacteristic %@ (%@)", characteristic, error );
|
NSLog( @"didUpdateNotificationStateForCharacteristic %@ (%@)", characteristic, error );
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -147,7 +147,7 @@ static void register_error_str(wchar_t **error_str, const char *msg)
|
|||||||
#endif
|
#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)
|
static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
|
@@ -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.
|
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:
|
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.
|
Not leaking a resource in all tested environments.
|
||||||
*/
|
*/
|
||||||
if (is_macos_10_10_or_greater || !dev->disconnected) {
|
if (is_macos_10_10_or_greater || !dev->disconnected) {
|
||||||
|
@@ -96,7 +96,7 @@ static void register_error_str(wchar_t **error_str, const char *msg)
|
|||||||
*error_str = utf8_to_wchar_t(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)
|
static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
|
@@ -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, 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, 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, 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, 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, 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
|
{ MAKE_CONTROLLER_ID( 0x20d6, 0x201a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Nebula
|
||||||
|
@@ -312,7 +312,7 @@ static void HIDAPI_DriverSteamHori_HandleStatePacket(SDL_Joystick *joystick, SDL
|
|||||||
ctx->sensor_ticks += delta;
|
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 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 accelScale = SDL_STANDARD_GRAVITY * 8 / 32768.0f;
|
||||||
const float gyroScale = DEG2RAD(2048);
|
const float gyroScale = DEG2RAD(2048);
|
||||||
|
@@ -353,7 +353,7 @@ enum GamepadButtons
|
|||||||
// Mode adjust
|
// Mode adjust
|
||||||
enum ModeAdjustModes
|
enum ModeAdjustModes
|
||||||
{
|
{
|
||||||
MODE_ADJUST_SENSITITY=1,
|
MODE_ADJUST_SENSITIVITY=1,
|
||||||
MODE_ADJUST_LEFT_PAD_SECONDARY_MODE,
|
MODE_ADJUST_LEFT_PAD_SECONDARY_MODE,
|
||||||
MODE_ADJUST_RIGHT_PAD_SECONDARY_MODE,
|
MODE_ADJUST_RIGHT_PAD_SECONDARY_MODE,
|
||||||
MODE_ADJUST_COUNT
|
MODE_ADJUST_COUNT
|
||||||
@@ -364,8 +364,8 @@ typedef enum
|
|||||||
{
|
{
|
||||||
ATTRIB_UNIQUE_ID,
|
ATTRIB_UNIQUE_ID,
|
||||||
ATTRIB_PRODUCT_ID,
|
ATTRIB_PRODUCT_ID,
|
||||||
ATTRIB_PRODUCT_REVISON, // deprecated
|
ATTRIB_PRODUCT_REVISION, // deprecated
|
||||||
ATTRIB_CAPABILITIES = ATTRIB_PRODUCT_REVISON, // intentional aliasing
|
ATTRIB_CAPABILITIES = ATTRIB_PRODUCT_REVISION, // intentional aliasing
|
||||||
ATTRIB_FIRMWARE_VERSION, // deprecated
|
ATTRIB_FIRMWARE_VERSION, // deprecated
|
||||||
ATTRIB_FIRMWARE_BUILD_TIME,
|
ATTRIB_FIRMWARE_BUILD_TIME,
|
||||||
ATTRIB_RADIO_FIRMWARE_BUILD_TIME,
|
ATTRIB_RADIO_FIRMWARE_BUILD_TIME,
|
||||||
|
@@ -112,7 +112,7 @@ typedef struct {
|
|||||||
int16_t dur_ms; // Duration of tone / rumble (if applicable) (neg = infinite)
|
int16_t dur_ms; // Duration of tone / rumble (if applicable) (neg = infinite)
|
||||||
|
|
||||||
uint16_t noise_intensity;
|
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 lfo_depth; // percentage, typically 100
|
||||||
uint8_t rand_tone_gain; // Randomize each LFO cycle's gain
|
uint8_t rand_tone_gain; // Randomize each LFO cycle's gain
|
||||||
uint8_t script_id; // Used w/ dBgain for scripted haptics
|
uint8_t script_id; // Used w/ dBgain for scripted haptics
|
||||||
@@ -261,7 +261,7 @@ typedef struct
|
|||||||
short sRightPadX;
|
short sRightPadX;
|
||||||
short sRightPadY;
|
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)
|
unsigned char ucGyroDataType; //TODO could maybe find some unused bits in the button field for this info (is only 2bits)
|
||||||
short sGyro[4];
|
short sGyro[4];
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
* the interval [0,0.34658]:
|
* the interval [0,0.34658]:
|
||||||
* Write
|
* Write
|
||||||
* R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
|
* 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
|
* a polynomial of degree 5 to approximate R. The maximum error
|
||||||
* of this polynomial approximation is bounded by 2**-59. In
|
* of this polynomial approximation is bounded by 2**-59. In
|
||||||
* other words,
|
* other words,
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* __ieee754_log(x)
|
/* __ieee754_log(x)
|
||||||
* Return the logrithm of x
|
* Return the logarithm of x
|
||||||
*
|
*
|
||||||
* Method :
|
* Method :
|
||||||
* 1. Argument Reduction: find k and f such that
|
* 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)
|
* 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 + 2/3 s**3 + 2/5 s**5 + .....,
|
||||||
* = 2s + s*R
|
* = 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
|
* a polynomial of degree 14 to approximate R The maximum error
|
||||||
* of this polynomial approximation is bounded by 2**-58.45. In
|
* of this polynomial approximation is bounded by 2**-58.45. In
|
||||||
* other words,
|
* other words,
|
||||||
|
@@ -331,7 +331,7 @@ B. sqrt(x) by Reciproot Iteration
|
|||||||
|
|
||||||
Let x0 and x1 be the leading and the trailing 32-bit words of
|
Let x0 and x1 be the leading and the trailing 32-bit words of
|
||||||
a floating point number x (in IEEE double format) respectively
|
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.
|
we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
|
||||||
|
|
||||||
k := 0x5fe80000 - (x0>>1);
|
k := 0x5fe80000 - (x0>>1);
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
* 64-bit precision 2
|
* 64-bit precision 2
|
||||||
* 113-bit precision 3
|
* 113-bit precision 3
|
||||||
* The actual value is the sum of them. Thus for 113-bit
|
* 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;
|
* long double t,w,r_head, r_tail;
|
||||||
* t = (long double)y[2] + (long double)y[1];
|
* t = (long double)y[2] + (long double)y[1];
|
||||||
|
@@ -4872,7 +4872,7 @@ static bool SDLCALL SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Two triangles forming a quadialateral,
|
/* Two triangles forming a quadrilateral,
|
||||||
* prev and current triangles must have exactly 2 common vertices */
|
* prev and current triangles must have exactly 2 common vertices */
|
||||||
{
|
{
|
||||||
int cnt = 0, j = 3;
|
int cnt = 0, j = 3;
|
||||||
|
@@ -3035,7 +3035,7 @@ static size_t traverse_and_check(mstate m);
|
|||||||
http://www.usenix.org/events/lisa03/tech/robertson.html The footer
|
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,
|
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
|
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
|
computed by any code successfully malloc'ing any chunk, so does not
|
||||||
itself provide protection against code that has already broken
|
itself provide protection against code that has already broken
|
||||||
security through some other means. Unlike Robertson et al, we
|
security through some other means. Unlike Robertson et al, we
|
||||||
|
@@ -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.
|
/* 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
|
* 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.
|
* still not be the full display size.
|
||||||
*/
|
*/
|
||||||
if (!SDL_IsDeXMode() && !SDL_IsChromebook()) {
|
if (!SDL_IsDeXMode() && !SDL_IsChromebook()) {
|
||||||
@@ -165,7 +165,7 @@ endfunction:
|
|||||||
|
|
||||||
void Android_MinimizeWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
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)
|
void Android_SetWindowResizable(SDL_VideoDevice *_this, SDL_Window *window, bool resizable)
|
||||||
|
Reference in New Issue
Block a user