📄 jtest.c
字号:
/*
** Test program for joystick library.
**
** This file is part of:
**
** Joystick Library for Dos.
** Version: 1.1
**
** Last modified: June 15th, 1997
**
** (C) 1997 Simone Zanella Productions.
**
** E-mail: szanella@dsi.unive.it
** zanella@prometeo.it
**
** Web: http://www.dsi.unive.it/~szanella/index.htm
** http://members.tripod.com/~szanella/index.htm
**
** Changes from version 1.0:
**
** - added support for 4 and 6 buttons joysticks;
** - added command line parameter mode;
** - changed calibration to manual, to avoid incompatibilities and
** to get a faster reading;
** - calibration is now saved to JTEST.JC, in JTEST.EXE directory;
** - removed tolerances.
**
** --------------------------------------------------------
**
** This is freeware: use it as you like, but ALWAYS include
** the original author's name in the docs of your program.
**
** --------------------------------------------------------
*/
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "joystick.h"
#ifndef __BORLANDC__
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
static int mode = JOY_2BUTTONS;
void printstatus(unsigned char jready, unsigned int j0, unsigned int j1)
{
/* Show status for both joysticks */
char l[13][26];
unsigned char j, o, ln;
unsigned int jflags;
strcpy(l[0], "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -