Added Clamp function to general.c Now clamps all final joystick values to be from 0 - 32767 (2^15 - 1). Output from the 3ds was giving a strange range on the values, even though the code expected it to be in the range -128 to 128. Was more like -146 to 146 on the c-stick, and -170 to 170 on the circle pad. This may remove some of the resolution of the sticks, but increase compatability with programs.
7 lines
111 B
C
7 lines
111 B
C
#pragma once
|
|
|
|
#include <stdio.h>
|
|
|
|
void error(const char *functionName);
|
|
|
|
int clamp(int val, int min, int max);
|