comparison test/automated/platform/platform.c @ 3319:63d4517fc4ac

Fixed bug #777 Implemented SDL_GetPlatform()
author Sam Lantinga <slouken@libsdl.org>
date Sat, 26 Sep 2009 10:32:14 +0000
parents 50848072885e
children c32c53fca10d
comparison
equal deleted inserted replaced
3318:f085091f74cd 3319:63d4517fc4ac
130 SDL_ATend(); 130 SDL_ATend();
131 } 131 }
132 132
133 133
134 /** 134 /**
135 * @brief Gets the name of the platform.
136 */
137 const char *platform_getPlatform (void)
138 {
139 return
140 #if __AIX__
141 "AIX"
142 #elif __HAIKU__
143 /* Haiku must appear here before BeOS, since it also defines __BEOS__ */
144 "Haiku"
145 #elif __BEOS__
146 "BeOS"
147 #elif __BSDI__
148 "BSDI"
149 #elif __DREAMCAST__
150 "Dreamcast"
151 #elif __FREEBSD__
152 "FreeBSD"
153 #elif __HPUX__
154 "HP-UX"
155 #elif __IRIX__
156 "Irix"
157 #elif __LINUX__
158 "Linux"
159 #elif __MINT__
160 "Atari MiNT"
161 #elif __MACOS__
162 "MacOS Classic"
163 #elif __MACOSX__
164 "Mac OS X"
165 #elif __NETBSD__
166 "NetBSD"
167 #elif __OPENBSD__
168 "OpenBSD"
169 #elif __OS2__
170 "OS/2"
171 #elif __OSF__
172 "OSF/1"
173 #elif __QNXNTO__
174 "QNX Neutrino"
175 #elif __RISCOS__
176 "RISC OS"
177 #elif __SOLARIS__
178 "Solaris"
179 #elif __WIN32__
180 #ifdef _WIN32_WCE
181 "Windows CE"
182 #else
183 "Windows"
184 #endif
185 #elif __IPHONEOS__
186 "iPhone OS"
187 #else
188 "an unknown operating system! (see SDL_platform.h)"
189 #endif
190 ;
191 }
192
193
194 /**
195 * @brief Platform test entrypoint. 135 * @brief Platform test entrypoint.
196 */ 136 */
197 #ifdef TEST_STANDALONE 137 #ifdef TEST_STANDALONE
198 int main( int argc, const char *argv[] ) 138 int main( int argc, const char *argv[] )
199 { 139 {
205 #endif /* TEST_STANDALONE */ 145 #endif /* TEST_STANDALONE */
206 146
207 SDL_ATinit( "Platform" ); 147 SDL_ATinit( "Platform" );
208 148
209 /* Debug information. */ 149 /* Debug information. */
210 SDL_ATprintVerbose( 1, "%s System detected\n", platform_getPlatform() ); 150 SDL_ATprintVerbose( 1, "%s System detected\n", SDL_GetPlatform() );
211 SDL_ATprintVerbose( 1, "System is %s endian\n", 151 SDL_ATprintVerbose( 1, "System is %s endian\n",
212 #ifdef SDL_LIL_ENDIAN 152 #ifdef SDL_LIL_ENDIAN
213 "little" 153 "little"
214 #else 154 #else
215 "big" 155 "big"