mirror of https://github.com/libsdl-org/SDL.git
Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_VIRTUAL
This commit is contained in:
parent
99095a89f1
commit
bc160b55fe
|
|
@ -44,7 +44,7 @@
|
|||
#include <tlhelp32.h>
|
||||
#endif
|
||||
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#ifdef SDL_JOYSTICK_VIRTUAL
|
||||
#include "./virtual/SDL_virtualjoystick_c.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -631,7 +631,7 @@ SDL_JoystickID SDL_AttachVirtualJoystick(SDL_JoystickType type, int naxes, int n
|
|||
|
||||
SDL_JoystickID SDL_AttachVirtualJoystickEx(const SDL_VirtualJoystickDesc *desc)
|
||||
{
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#if defined(SDL_JOYSTICK_VIRTUAL)
|
||||
SDL_JoystickID retval;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
|
|
@ -645,7 +645,7 @@ SDL_JoystickID SDL_AttachVirtualJoystickEx(const SDL_VirtualJoystickDesc *desc)
|
|||
|
||||
int SDL_DetachVirtualJoystick(SDL_JoystickID instance_id)
|
||||
{
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#if defined(SDL_JOYSTICK_VIRTUAL)
|
||||
int retval;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
|
|
@ -659,7 +659,7 @@ int SDL_DetachVirtualJoystick(SDL_JoystickID instance_id)
|
|||
|
||||
SDL_bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id)
|
||||
{
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#if defined(SDL_JOYSTICK_VIRTUAL)
|
||||
SDL_JoystickDriver *driver;
|
||||
int device_index;
|
||||
SDL_bool is_virtual = SDL_FALSE;
|
||||
|
|
@ -686,7 +686,7 @@ int SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)
|
|||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, -1);
|
||||
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#if defined(SDL_JOYSTICK_VIRTUAL)
|
||||
retval = SDL_SetJoystickVirtualAxisInner(joystick, axis, value);
|
||||
#else
|
||||
retval = SDL_SetError("SDL not built with virtual-joystick support");
|
||||
|
|
@ -705,7 +705,7 @@ int SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, Uint8 value
|
|||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, -1);
|
||||
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#if defined(SDL_JOYSTICK_VIRTUAL)
|
||||
retval = SDL_SetJoystickVirtualButtonInner(joystick, button, value);
|
||||
#else
|
||||
retval = SDL_SetError("SDL not built with virtual-joystick support");
|
||||
|
|
@ -724,7 +724,7 @@ int SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)
|
|||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, -1);
|
||||
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#if defined(SDL_JOYSTICK_VIRTUAL)
|
||||
retval = SDL_SetJoystickVirtualHatInner(joystick, hat, value);
|
||||
#else
|
||||
retval = SDL_SetError("SDL not built with virtual-joystick support");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef SDL_VIRTUALJOYSTICK_C_H
|
||||
#define SDL_VIRTUALJOYSTICK_C_H
|
||||
|
||||
#if SDL_JOYSTICK_VIRTUAL
|
||||
#ifdef SDL_JOYSTICK_VIRTUAL
|
||||
|
||||
/**
|
||||
* Data for a virtual, software-only joystick.
|
||||
|
|
|
|||
Loading…
Reference in New Issue