~ubuntu-branches/ubuntu/saucy/joystick/saucy

« back to all changes in this revision

Viewing changes to utils/ffmvforce.c

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2013-05-06 23:03:26 UTC
  • mfrom: (3.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20130506230326-po18icz4mtaa25k1
Tags: 1:1.4.6-1
* New upstream release:
  - Disable CRTSCTS on ELO touchscreens. Closes: #699030. Thanks Thierry
    Bultel!
  - Handle long device names correctly. Closes: #706744. Thanks Ralf
    Jung!
* Drop hardening.patch, merged upstream.
* Standards-Version 3.9.4, no change required.
* Switch to my Debian address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include <SDL.h>
39
39
 
40
40
#define BIT(x) (1<<(x))
41
 
#define STR_LEN 64
42
41
#define WIN_W   400
43
42
#define WIN_H   400
44
43
#define max(a,b)        ((a)>(b)?(a):(b))
116
115
int main(int argc, char** argv)
117
116
{
118
117
        SDL_Surface* screen;
119
 
        char dev_name[STR_LEN];
 
118
        const char * dev_name = "/dev/input/event0";
120
119
        int i;
121
120
        Uint32 ticks, period = 200;
122
121
 
124
123
        if (argc <= 1) return 0;
125
124
 
126
125
        /* Parse parameters */
127
 
        strcpy(dev_name, "/dev/input/event0");
128
126
        for (i=1; i<argc; ++i) {
129
127
                if (strcmp(argv[i], "--help") == 0) {
130
128
                        printf("Usage: %s /dev/input/eventXX [-u update frequency in HZ]\n", argv[0]);
139
137
                        period = 1000.0/atof(argv[i]);
140
138
                }
141
139
                else {
142
 
                        strncpy(dev_name, argv[i], STR_LEN);
 
140
                        dev_name = argv[i];
143
141
                }
144
142
        }
145
143