include/SDL_cpuinfo.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 21 Feb 2006 08:46:50 +0000
changeset 1402 d910939febfa
parent 1356 67114343400d
child 1426 ef9a9064bff2
permissions -rw-r--r--
Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.
slouken@739
     1
/*
slouken@739
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@739
     4
slouken@739
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@739
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@739
     9
slouken@739
    10
    This library is distributed in the hope that it will be useful,
slouken@739
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@739
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@739
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@739
    18
slouken@739
    19
    Sam Lantinga
slouken@739
    20
    slouken@libsdl.org
slouken@739
    21
*/
slouken@739
    22
slouken@739
    23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
slouken@739
    24
/* CPU feature detection for SDL                                       */
slouken@739
    25
slouken@739
    26
#ifndef _SDL_cpuinfo_h
slouken@739
    27
#define _SDL_cpuinfo_h
slouken@739
    28
slouken@1402
    29
#include "SDL_stdinc.h"
slouken@1402
    30
slouken@739
    31
#include "begin_code.h"
slouken@739
    32
/* Set up for C function definitions, even when using C++ */
slouken@739
    33
#ifdef __cplusplus
slouken@739
    34
extern "C" {
slouken@739
    35
#endif
slouken@739
    36
slouken@745
    37
/* This function returns true if the CPU has the RDTSC instruction
slouken@745
    38
 */
slouken@745
    39
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC();
slouken@745
    40
slouken@739
    41
/* This function returns true if the CPU has MMX features
slouken@739
    42
 */
slouken@739
    43
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX();
slouken@739
    44
slouken@785
    45
/* This function returns true if the CPU has MMX Ext. features
slouken@785
    46
 */
slouken@785
    47
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt();
slouken@785
    48
slouken@739
    49
/* This function returns true if the CPU has 3DNow features
slouken@739
    50
 */
slouken@739
    51
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow();
slouken@739
    52
slouken@785
    53
/* This function returns true if the CPU has 3DNow! Ext. features
slouken@785
    54
 */
slouken@785
    55
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt();
slouken@785
    56
slouken@739
    57
/* This function returns true if the CPU has SSE features
slouken@739
    58
 */
slouken@739
    59
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE();
slouken@739
    60
slouken@785
    61
/* This function returns true if the CPU has SSE2 features
slouken@785
    62
 */
slouken@785
    63
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2();
slouken@785
    64
slouken@778
    65
/* This function returns true if the CPU has AltiVec features
slouken@778
    66
 */
slouken@778
    67
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec();
slouken@778
    68
slouken@739
    69
/* Ends C function definitions when using C++ */
slouken@739
    70
#ifdef __cplusplus
slouken@739
    71
}
slouken@739
    72
#endif
slouken@739
    73
#include "close_code.h"
slouken@739
    74
slouken@739
    75
#endif /* _SDL_cpuinfo_h */