Make scrolling utilize mouse_kinetic_state_t, just like mouse movements. Fix scrolling issue by making distance float. Add new debug functions for ints and float.
This commit is contained in:
@@ -45,6 +45,21 @@ void SetBufferUint32(uint8_t *buffer, uint32_t offset, uint32_t value)
|
||||
*(uint32_t*)(buffer + offset) = value;
|
||||
}
|
||||
|
||||
void SetBufferInt8(uint8_t *buffer, uint32_t offset, int8_t value)
|
||||
{
|
||||
*(int8_t*)(buffer + offset) = value;
|
||||
}
|
||||
|
||||
void SetBufferInt16(uint8_t *buffer, uint32_t offset, int16_t value)
|
||||
{
|
||||
*(int16_t*)(buffer + offset) = value;
|
||||
}
|
||||
|
||||
void SetBufferInt32(uint8_t *buffer, uint32_t offset, int32_t value)
|
||||
{
|
||||
*(int32_t*)(buffer + offset) = value;
|
||||
}
|
||||
|
||||
void SetBufferUint8Be(uint8_t *buffer, uint32_t offset, uint8_t value)
|
||||
{
|
||||
buffer[offset] = value;
|
||||
@@ -63,3 +78,8 @@ void SetBufferUint32Be(uint8_t *buffer, uint32_t offset, uint32_t value)
|
||||
buffer[offset+2] = (value >> 8) & 0xff;
|
||||
buffer[offset+3] = (value >> 0) & 0xff;
|
||||
}
|
||||
|
||||
void SetBufferFloat(uint8_t *buffer, uint32_t offset, float value)
|
||||
{
|
||||
*(float*)(buffer + offset) = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user