Have the submodules working correctly.
This commit is contained in:
@ -19,7 +19,7 @@ void inputInit(input_t *input) {
|
||||
input->previous = input->inputsB;
|
||||
|
||||
// Create the buffer, zero all the values out.
|
||||
memset(&input->buffer, 0, sizeof(inputval_t)*INPUT_SOURCE_COUNT);
|
||||
memset(input->buffer, 0, sizeof(inputval_t)*INPUT_SOURCE_COUNT);
|
||||
}
|
||||
|
||||
void inputUpdate(input_t *input) {
|
||||
@ -66,6 +66,10 @@ void inputUnbind(input_t *input, inputbind_t bind, inputsource_t source) {
|
||||
listRemove(input->bindMap[bind], (void *)source);
|
||||
}
|
||||
|
||||
void inputStateSet(input_t *input, inputsource_t source, float value) {
|
||||
input->buffer[source] = value;
|
||||
}
|
||||
|
||||
bool inputIsDown(input_t *input, inputbind_t binding) {
|
||||
return input->current[binding] != 0;
|
||||
}
|
||||
|
@ -111,6 +111,15 @@ void inputBind(input_t *input, inputbind_t bind, inputsource_t source);
|
||||
*/
|
||||
void inputUnbind(input_t *input, inputbind_t bind, inputsource_t source);
|
||||
|
||||
/**
|
||||
* Set the state of an input.
|
||||
*
|
||||
* @param input Input to set the state for.
|
||||
* @param source Source to set.
|
||||
* @param value Value to set.
|
||||
*/
|
||||
void inputStateSet(input_t *input, inputsource_t source, float value);
|
||||
|
||||
/**
|
||||
* Is the current input "down", being pressed, being moved, not in a state
|
||||
* of rest.
|
||||
|
Reference in New Issue
Block a user