SDL_cpuinfo.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. SDL - Simple DirectMedia Layer
  3. Copyright (C) 1997-2012 Sam Lantinga
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. Sam Lantinga
  16. slouken@libsdl.org
  17. */
  18. /**
  19. * @file SDL_cpuinfo.h
  20. * CPU feature detection for SDL
  21. */
  22. #ifndef _SDL_cpuinfo_h
  23. #define _SDL_cpuinfo_h
  24. #include "SDL_stdinc.h"
  25. #include "begin_code.h"
  26. /* Set up for C function definitions, even when using C++ */
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /** This function returns true if the CPU has the RDTSC instruction */
  31. extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
  32. /** This function returns true if the CPU has MMX features */
  33. extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
  34. /** This function returns true if the CPU has MMX Ext. features */
  35. extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
  36. /** This function returns true if the CPU has 3DNow features */
  37. extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
  38. /** This function returns true if the CPU has 3DNow! Ext. features */
  39. extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
  40. /** This function returns true if the CPU has SSE features */
  41. extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
  42. /** This function returns true if the CPU has SSE2 features */
  43. extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
  44. /** This function returns true if the CPU has AltiVec features */
  45. extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
  46. /* Ends C function definitions when using C++ */
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #include "close_code.h"
  51. #endif /* _SDL_cpuinfo_h */