cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

SDL_syshaptic.c (3366B)


      1/*
      2  Simple DirectMedia Layer
      3  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
      4
      5  This software is provided 'as-is', without any express or implied
      6  warranty.  In no event will the authors be held liable for any damages
      7  arising from the use of this software.
      8
      9  Permission is granted to anyone to use this software for any purpose,
     10  including commercial applications, and to alter it and redistribute it
     11  freely, subject to the following restrictions:
     12
     13  1. The origin of this software must not be misrepresented; you must not
     14     claim that you wrote the original software. If you use this software
     15     in a product, an acknowledgment in the product documentation would be
     16     appreciated but is not required.
     17  2. Altered source versions must be plainly marked as such, and must not be
     18     misrepresented as being the original software.
     19  3. This notice may not be removed or altered from any source distribution.
     20*/
     21#include "../../SDL_internal.h"
     22
     23#if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED)
     24
     25#include "SDL_haptic.h"
     26#include "../SDL_syshaptic.h"
     27
     28
     29static int
     30SDL_SYS_LogicError(void)
     31{
     32    return SDL_SetError("Logic error: No haptic devices available.");
     33}
     34
     35
     36int
     37SDL_SYS_HapticInit(void)
     38{
     39    return 0;
     40}
     41
     42int
     43SDL_SYS_NumHaptics(void)
     44{
     45    return 0;
     46}
     47
     48const char *
     49SDL_SYS_HapticName(int index)
     50{
     51    SDL_SYS_LogicError();
     52    return NULL;
     53}
     54
     55
     56int
     57SDL_SYS_HapticOpen(SDL_Haptic * haptic)
     58{
     59    return SDL_SYS_LogicError();
     60}
     61
     62
     63int
     64SDL_SYS_HapticMouse(void)
     65{
     66    return -1;
     67}
     68
     69
     70int
     71SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
     72{
     73    return 0;
     74}
     75
     76
     77int
     78SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
     79{
     80    return SDL_SYS_LogicError();
     81}
     82
     83
     84int
     85SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
     86{
     87    return 0;
     88}
     89
     90
     91void
     92SDL_SYS_HapticClose(SDL_Haptic * haptic)
     93{
     94    return;
     95}
     96
     97
     98void
     99SDL_SYS_HapticQuit(void)
    100{
    101    return;
    102}
    103
    104
    105int
    106SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
    107                        struct haptic_effect *effect, SDL_HapticEffect * base)
    108{
    109    return SDL_SYS_LogicError();
    110}
    111
    112
    113int
    114SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
    115                           struct haptic_effect *effect,
    116                           SDL_HapticEffect * data)
    117{
    118    return SDL_SYS_LogicError();
    119}
    120
    121
    122int
    123SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
    124                        Uint32 iterations)
    125{
    126    return SDL_SYS_LogicError();
    127}
    128
    129
    130int
    131SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
    132{
    133    return SDL_SYS_LogicError();
    134}
    135
    136
    137void
    138SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
    139{
    140    SDL_SYS_LogicError();
    141    return;
    142}
    143
    144
    145int
    146SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
    147                              struct haptic_effect *effect)
    148{
    149    return SDL_SYS_LogicError();
    150}
    151
    152
    153int
    154SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
    155{
    156    return SDL_SYS_LogicError();
    157}
    158
    159
    160int
    161SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
    162{
    163    return SDL_SYS_LogicError();
    164}
    165
    166int
    167SDL_SYS_HapticPause(SDL_Haptic * haptic)
    168{
    169    return SDL_SYS_LogicError();
    170}
    171
    172int
    173SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
    174{
    175    return SDL_SYS_LogicError();
    176}
    177
    178int
    179SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
    180{
    181    return SDL_SYS_LogicError();
    182}
    183
    184#endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */