Mercurial > sdl-ios-xcode
comparison src/video/fbcon/SDL_fbelo.c @ 1341:d02b552e5304
Configure dynamically generates SDL_config.h
I'm still wrestling with autoheader, but this should work for now...
Fixed lots of build problems with C library support disabled
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 12:11:33 +0000 |
parents | 604d73db6802 |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1340:58b114ef50e7 | 1341:d02b552e5304 |
---|---|
90 } | 90 } |
91 | 91 |
92 x = ((mousebuf[4] << 8) | mousebuf[3]); | 92 x = ((mousebuf[4] << 8) | mousebuf[3]); |
93 y = ((mousebuf[6] << 8) | mousebuf[5]); | 93 y = ((mousebuf[6] << 8) | mousebuf[5]); |
94 | 94 |
95 if((abs(x - last_x) > ELO_SNAP_SIZE) || (abs(y - last_y) > ELO_SNAP_SIZE)) { | 95 if((SDL_abs(x - last_x) > ELO_SNAP_SIZE) || (SDL_abs(y - last_y) > ELO_SNAP_SIZE)) { |
96 *dx = ((mousebuf[4] << 8) | mousebuf[3]); | 96 *dx = ((mousebuf[4] << 8) | mousebuf[3]); |
97 *dy = ((mousebuf[6] << 8) | mousebuf[5]); | 97 *dy = ((mousebuf[6] << 8) | mousebuf[5]); |
98 } | 98 } |
99 else { | 99 else { |
100 *dx = last_x; | 100 *dx = last_x; |
333 struct termios mouse_termios; | 333 struct termios mouse_termios; |
334 | 334 |
335 /* try to read the calibration values */ | 335 /* try to read the calibration values */ |
336 buffer = SDL_getenv("SDL_ELO_MIN_X"); | 336 buffer = SDL_getenv("SDL_ELO_MIN_X"); |
337 if(buffer) { | 337 if(buffer) { |
338 ELO_MIN_X = atoi(buffer); | 338 ELO_MIN_X = SDL_atoi(buffer); |
339 } | 339 } |
340 buffer = SDL_getenv("SDL_ELO_MAX_X"); | 340 buffer = SDL_getenv("SDL_ELO_MAX_X"); |
341 if(buffer) { | 341 if(buffer) { |
342 ELO_MAX_X = atoi(buffer); | 342 ELO_MAX_X = SDL_atoi(buffer); |
343 } | 343 } |
344 buffer = SDL_getenv("SDL_ELO_MIN_Y"); | 344 buffer = SDL_getenv("SDL_ELO_MIN_Y"); |
345 if(buffer) { | 345 if(buffer) { |
346 ELO_MIN_Y = atoi(buffer); | 346 ELO_MIN_Y = SDL_atoi(buffer); |
347 } | 347 } |
348 buffer = SDL_getenv("SDL_ELO_MAX_Y"); | 348 buffer = SDL_getenv("SDL_ELO_MAX_Y"); |
349 if(buffer) { | 349 if(buffer) { |
350 ELO_MAX_Y = atoi(buffer); | 350 ELO_MAX_Y = SDL_atoi(buffer); |
351 } | 351 } |
352 | 352 |
353 #ifdef DEBUG_MOUSE | 353 #ifdef DEBUG_MOUSE |
354 fprintf( stderr, "ELO calibration values:\nmin_x: %i\nmax_x: %i\nmin_y: %i\nmax_y: %i\n", | 354 fprintf( stderr, "ELO calibration values:\nmin_x: %i\nmax_x: %i\nmin_y: %i\nmax_y: %i\n", |
355 ELO_MIN_X, | 355 ELO_MIN_X, |