Fix some pointer formatting;

This commit is contained in:
bjorn 2022-02-02 12:01:38 -08:00
parent 07074a39a8
commit 6f3e46d8cf
6 changed files with 9 additions and 9 deletions

View File

@ -642,7 +642,7 @@ static int l_lovrHeadsetGetTime(lua_State* L) {
}
static int l_lovrHeadsetGetMirrorTexture(lua_State* L) {
Texture *texture = NULL;
Texture* texture = NULL;
if (lovrHeadsetDisplayDriver->getMirrorTexture)
texture = lovrHeadsetDisplayDriver->getMirrorTexture();
luax_pushtype(L, Texture, texture);

View File

@ -562,12 +562,12 @@ bool lovrSourceUsesSpatializer(Source* source) {
return source->effects != EFFECT_NONE; // Currently, all effects require the spatializer
}
void lovrSourceGetPose(Source *source, float position[4], float orientation[4]) {
void lovrSourceGetPose(Source* source, float position[4], float orientation[4]) {
memcpy(position, source->position, sizeof(source->position));
memcpy(orientation, source->orientation, sizeof(source->orientation));
}
void lovrSourceSetPose(Source *source, float position[4], float orientation[4]) {
void lovrSourceSetPose(Source* source, float position[4], float orientation[4]) {
ma_mutex_lock(&state.lock);
memcpy(source->position, position, sizeof(source->position));
memcpy(source->orientation, orientation, sizeof(source->orientation));

View File

@ -287,7 +287,7 @@ static void oculus_sourceCreate(Source* source) {
*spatializerMemo = -1;
}
static void oculus_sourceDestroy(Source *source) {
static void oculus_sourceDestroy(Source* source) {
intptr_t* spatializerMemo = lovrSourceGetSpatializerMemoField(source);
if (*spatializerMemo >= 0) {
state.sources[*spatializerMemo].source = NULL;

View File

@ -447,6 +447,6 @@ uint32_t lovrSoundCopy(Sound* src, Sound* dst, uint32_t count, uint32_t srcOffse
return frames;
}
void *lovrSoundGetCallbackMemo(Sound *sound) {
void *lovrSoundGetCallbackMemo(Sound* sound) {
return sound->callbackMemo;
}

View File

@ -43,4 +43,4 @@ bool lovrSoundIsStream(Sound* sound);
uint32_t lovrSoundRead(Sound* sound, uint32_t offset, uint32_t count, void* data);
uint32_t lovrSoundWrite(Sound* sound, uint32_t offset, uint32_t count, const void* data);
uint32_t lovrSoundCopy(Sound* src, Sound* dst, uint32_t frames, uint32_t srcOffset, uint32_t dstOffset);
void *lovrSoundGetCallbackMemo(Sound *sound);
void *lovrSoundGetCallbackMemo(Sound* sound);

View File

@ -51,7 +51,7 @@ static double oculus_getDisplayTime(void) {
return ovr_GetPredictedDisplayTime(state.session, state.frameIndex);
}
static ovrTrackingState *refreshTracking(void) {
static ovrTrackingState* refreshTracking(void) {
static ovrTrackingState ts;
if (!state.needRefreshTracking) {
return &ts;
@ -72,7 +72,7 @@ static ovrTrackingState *refreshTracking(void) {
return &ts;
}
static ovrInputState *refreshButtons(void) {
static ovrInputState* refreshButtons(void) {
static ovrInputState is;
if (!state.needRefreshButtons) {
return &is;
@ -248,7 +248,7 @@ static const float* oculus_getBoundsGeometry(uint32_t* count) {
}
ovrPoseStatef* getPose(Device device) {
ovrTrackingState *ts = refreshTracking();
ovrTrackingState* ts = refreshTracking();
switch (device) {
case DEVICE_HEAD: return &ts->HeadPose;
case DEVICE_HAND_LEFT: return &ts->HandPoses[ovrHand_Left];