src/joystick/dummy/SDL_sysjoystick.c
author Sam Lantinga
Sat, 25 Feb 2006 15:01:44 +0000
changeset 1429 aff0170f9f1b
parent 1402 d910939febfa
child 1635 92947e3a18db
permissions -rw-r--r--
Date: Sat, 25 Feb 2006 14:26:19 +0100 (CET)
From: "Torsten Giebl"
Subject: [SDL] testpalette.diff

To get rid of Mousecursor Fullscreen problems on Mac OSX.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2006 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 
    24 /* This is the system specific header for the SDL joystick API */
    25 
    26 #include "SDL_joystick.h"
    27 #include "../SDL_sysjoystick.h"
    28 #include "../SDL_joystick_c.h"
    29 
    30 /* Function to scan the system for joysticks.
    31  * This function should set SDL_numjoysticks to the number of available
    32  * joysticks.  Joystick 0 should be the system default joystick.
    33  * It should return 0, or -1 on an unrecoverable fatal error.
    34  */
    35 int SDL_SYS_JoystickInit(void)
    36 {
    37 	SDL_numjoysticks = 0;
    38 	return(0);
    39 }
    40 
    41 /* Function to get the device-dependent name of a joystick */
    42 const char *SDL_SYS_JoystickName(int index)
    43 {
    44 	SDL_SetError("Logic error: No joysticks available");
    45 	return(NULL);
    46 }
    47 
    48 /* Function to open a joystick for use.
    49    The joystick to open is specified by the index field of the joystick.
    50    This should fill the nbuttons and naxes fields of the joystick structure.
    51    It returns 0, or -1 if there is an error.
    52  */
    53 int SDL_SYS_JoystickOpen(SDL_Joystick *joystick)
    54 {
    55 	SDL_SetError("Logic error: No joysticks available");
    56 	return(-1);
    57 }
    58 
    59 /* Function to update the state of a joystick - called as a device poll.
    60  * This function shouldn't update the joystick structure directly,
    61  * but instead should call SDL_PrivateJoystick*() to deliver events
    62  * and update joystick device state.
    63  */
    64 void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick)
    65 {
    66 	return;
    67 }
    68 
    69 /* Function to close a joystick after use */
    70 void SDL_SYS_JoystickClose(SDL_Joystick *joystick)
    71 {
    72 	return;
    73 }
    74 
    75 /* Function to perform any system-specific joystick related cleanup */
    76 void SDL_SYS_JoystickQuit(void)
    77 {
    78 	return;
    79 }
    80