34 static const char* joy_axis_names[] = {
45 static int selected_axis = -1;
46 static int sample_axis = -1;
47 static int samples[8];
49 static int map_axis[4];
54 :
FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr),
55 apply(0), cancel(0), message(0)
70 for (
int i = 0; i < 4; i++) {
92 if (selected_axis >= 0 && selected_axis < 4) {
99 for (
int i = 0; i < 8; i++) {
102 int d = a - samples[i];
105 if (d > delta && samples[i] < 1e6) {
115 if (sample_axis >= 0) {
117 map_axis[selected_axis] = sample_axis;
133 for (
int i = 0; i < 4; i++) {
139 if (map >= 0 && map < 8) {
161 for (
int i = 0; i < 4; i++) {
162 int map = map_axis[i];
166 if (map >= 0 && map < 8)
171 if (selected_axis == i) {
189 for (
int i = 0; i < 8; i++) {
190 samples[i] = 10000000;