src/haptic/dummy/SDL_syshaptic.c
author Ryan C. Gordon <icculus@icculus.org>
Mon, 21 May 2018 12:00:21 -0400
changeset 11994 8e094f91ddab
parent 11811 5d94cb6b24d3
child 12503 806492103856
permissions -rw-r--r--
thread: fixed compiler warnings on non-Linux systems that use pthread.

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