aboutsummaryrefslogtreecommitdiffstats
path: root/songmanagement/src/lib/JEDI-SDL/SDL/Pas/sdl_cpuinfo.pas
blob: b09f19f933acfc07fe5e95b68dfd7cc3e96f93ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
unit sdl_cpuinfo;
{
  $Id: sdl_cpuinfo.pas,v 1.2 2004/02/18 22:52:53 savage Exp $

}
{******************************************************************************}
{                                                                              }
{       Borland Delphi SDL - Simple DirectMedia Layer                          }
{       Conversion of the Simple DirectMedia Layer Headers                     }
{                                                                              }
{ Portions created by Sam Lantinga <slouken@devolution.com> are                }
{ Copyright (C) 1997-2004  Sam Lantinga                                        }
{ 5635-34 Springhouse Dr.                                                      }
{ Pleasanton, CA 94588 (USA)                                                   }
{                                                                              }
{ All Rights Reserved.                                                         }
{                                                                              }
{ The original files are : SDL_cpuinfo.h                                       }
{                                                                              }
{ The initial developer of this Pascal code was :                              }
{ Dominqiue Louis <Dominique@SavageSoftware.com.au>                            }
{                                                                              }
{ Portions created by Dominqiue Louis are                                      }
{ Copyright (C) 2000 - 2004 Dominqiue Louis.                                   }
{                                                                              }
{                                                                              }
{ Contributor(s)                                                               }
{ --------------                                                               }
{ Obtained through:                                                            }
{ Joint Endeavour of Delphi Innovators ( Project JEDI )                        }
{                                                                              }
{ You may retrieve the latest version of this file at the Project              }
{ JEDI home page, located at http://delphi-jedi.org                            }
{                                                                              }
{ The contents of this file are used with permission, subject to               }
{ the Mozilla Public License Version 1.1 (the "License"); you may              }
{ not use this file except in compliance with the License. You may             }
{ obtain a copy of the License at                                              }
{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
{                                                                              }
{ Software distributed under the License is distributed on an                  }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or               }
{ implied. See the License for the specific language governing                 }
{ rights and limitations under the License.                                    }
{                                                                              }
{ Description                                                                  }
{ -----------                                                                  }
{                                                                              }
{                                                                              }
{                                                                              }
{                                                                              }
{                                                                              }
{                                                                              }
{                                                                              }
{ Requires                                                                     }
{ --------                                                                     }
{   The SDL Runtime libraris on Win32  : SDL.dll on Linux : libSDL.so          }
{   They are available from...                                                 }
{   http://www.libsdl.org .                                                    }
{                                                                              }
{ Programming Notes                                                            }
{ -----------------                                                            }
{                                                                              }
{                                                                              }
{                                                                              }
{                                                                              }
{ Revision History                                                             }
{ ----------------                                                             }
{
  $Log: sdl_cpuinfo.pas,v $
  Revision 1.2  2004/02/18 22:52:53  savage
  Forgot to add jedi-sdl.inc file. It's there now.

  Revision 1.1  2004/02/18 22:35:54  savage
  Brought sdl.pas up to 1.2.7 compatability
  Thus...
  Added SDL_GL_STEREO,
      SDL_GL_MULTISAMPLEBUFFERS,
      SDL_GL_MULTISAMPLESAMPLES

  Add DLL/Shared object functions
  function SDL_LoadObject( const sofile : PChar ) : Pointer;

  function SDL_LoadFunction( handle : Pointer; const name : PChar ) : Pointer;

  procedure SDL_UnloadObject( handle : Pointer );

  Added function to create RWops from const memory: SDL_RWFromConstMem()
  function SDL_RWFromConstMem(const mem: Pointer; size: Integer) : PSDL_RWops;

  Ported SDL_cpuinfo.h so Now you can test for Specific CPU types.


}
{******************************************************************************}

interface

{$I jedi-sdl.inc}

uses
  sdl;

{* This function returns true if the CPU has the RDTSC instruction
 *}
function SDL_HasRDTSC : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasRDTSC'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasRDTSC}

{* This function returns true if the CPU has MMX features
 *}
function SDL_HasMMX : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasMMX'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasMMX}

{* This function returns true if the CPU has MMX Ext. features
 *}
function SDL_HasMMXExt : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasMMXExt'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasMMXExt}

{* This function returns true if the CPU has 3DNow features
 *}
function SDL_Has3DNow : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_Has3DNow'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_Has3DNow}

{* This function returns true if the CPU has 3DNow! Ext. features
 *}
function SDL_Has3DNowExt : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_Has3DNowExt'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_Has3DNowExt}

{* This function returns true if the CPU has SSE features
 *}
function SDL_HasSSE : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasSSE'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasSSE}

{* This function returns true if the CPU has SSE2 features
 *}
function SDL_HasSSE2 : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasSSE2'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasSSE2}

{* This function returns true if the CPU has AltiVec features
 *}
function SDL_HasAltiVec : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasAltiVec'{$ELSE} SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasAltiVec}

implementation

end.