| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz> |
|---|
| 3 | 4 | * Copyright (c) 2001-2002, 2007 Johann Deneux <johann.deneux@gmail.com> |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * USB/RS232 I-Force joysticks and wheels. |
|---|
| 6 | | - */ |
|---|
| 7 | | - |
|---|
| 8 | | -/* |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | | - * |
|---|
| 19 | | - * You should have received a copy of the GNU General Public License |
|---|
| 20 | | - * along with this program; if not, write to the Free Software |
|---|
| 21 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 22 | 7 | */ |
|---|
| 23 | 8 | |
|---|
| 24 | 9 | #include "iforce.h" |
|---|
| .. | .. |
|---|
| 384 | 369 | } |
|---|
| 385 | 370 | |
|---|
| 386 | 371 | switch (effect->u.periodic.waveform) { |
|---|
| 387 | | - case FF_SQUARE: wave_code = 0x20; break; |
|---|
| 388 | | - case FF_TRIANGLE: wave_code = 0x21; break; |
|---|
| 389 | | - case FF_SINE: wave_code = 0x22; break; |
|---|
| 390 | | - case FF_SAW_UP: wave_code = 0x23; break; |
|---|
| 391 | | - case FF_SAW_DOWN: wave_code = 0x24; break; |
|---|
| 392 | | - default: wave_code = 0x20; break; |
|---|
| 372 | + case FF_SQUARE: wave_code = 0x20; break; |
|---|
| 373 | + case FF_TRIANGLE: wave_code = 0x21; break; |
|---|
| 374 | + case FF_SINE: wave_code = 0x22; break; |
|---|
| 375 | + case FF_SAW_UP: wave_code = 0x23; break; |
|---|
| 376 | + case FF_SAW_DOWN: wave_code = 0x24; break; |
|---|
| 377 | + default: wave_code = 0x20; break; |
|---|
| 393 | 378 | } |
|---|
| 394 | 379 | |
|---|
| 395 | 380 | if (!old || need_core(old, effect)) { |
|---|
| .. | .. |
|---|
| 488 | 473 | int core_err = 0; |
|---|
| 489 | 474 | |
|---|
| 490 | 475 | switch (effect->type) { |
|---|
| 491 | | - case FF_SPRING: type = 0x40; break; |
|---|
| 492 | | - case FF_DAMPER: type = 0x41; break; |
|---|
| 493 | | - default: return -1; |
|---|
| 476 | + case FF_SPRING: type = 0x40; break; |
|---|
| 477 | + case FF_DAMPER: type = 0x41; break; |
|---|
| 478 | + default: return -1; |
|---|
| 494 | 479 | } |
|---|
| 495 | 480 | |
|---|
| 496 | 481 | if (!old || need_condition_modifier(iforce, old, effect)) { |
|---|