Updated the platform test for the new CPU feature functions.
authorSam Lantinga <slouken@libsdl.org>
Sun, 13 Feb 2011 01:29:29 -0800
changeset 5286 73d27f06a715
parent 5285 ee03772989eb
child 5287 d1823573d005
Updated the platform test for the new CPU feature functions.
src/SDL_compat.c
test/automated/platform/platform.c
--- a/src/SDL_compat.c	Sun Feb 13 00:18:05 2011 -0800
+++ b/src/SDL_compat.c	Sun Feb 13 01:29:29 2011 -0800
@@ -32,6 +32,7 @@
 
 
 static SDL_Window *SDL_VideoWindow = NULL;
+static SDL_Surface *SDL_WindowSurface = NULL;
 static SDL_Surface *SDL_VideoSurface = NULL;
 static SDL_Surface *SDL_ShadowSurface = NULL;
 static SDL_Surface *SDL_PublicSurface = NULL;
@@ -410,9 +411,9 @@
         return 0;
     }
 
-    /* Destroy the screen texture and recreate it */
-    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
-    if (!SDL_VideoSurface) {
+    /* Get the surface for the window */
+    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
+    if (!SDL_WindowSurface) {
         return -1;
     }
 
@@ -549,8 +550,8 @@
     }
 
     /* Create the screen surface */
-    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
-    if (!SDL_VideoSurface) {
+    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
+    if (!SDL_WindowSurface) {
         return NULL;
     }
     SDL_VideoSurface->flags |= surface_flags;
--- a/test/automated/platform/platform.c	Sun Feb 13 00:18:05 2011 -0800
+++ b/test/automated/platform/platform.c	Sun Feb 13 01:29:29 2011 -0800
@@ -159,13 +159,11 @@
    SDL_ATprintVerbose( 1, "Available extensions:\n" );
    SDL_ATprintVerbose( 1, "   RDTSC %s\n", SDL_HasRDTSC()? "detected" : "not detected" );
    SDL_ATprintVerbose( 1, "   MMX %s\n", SDL_HasMMX()? "detected" : "not detected" );
-   SDL_ATprintVerbose( 1, "   MMX Ext %s\n", SDL_HasMMXExt()? "detected" : "not detected" );
-   SDL_ATprintVerbose( 1, "   3DNow %s\n", SDL_Has3DNow()? "detected" : "not detected" );
-   SDL_ATprintVerbose( 1, "   3DNow Ext %s\n",
-         SDL_Has3DNowExt()? "detected" : "not detected" );
    SDL_ATprintVerbose( 1, "   SSE %s\n", SDL_HasSSE()? "detected" : "not detected" );
    SDL_ATprintVerbose( 1, "   SSE2 %s\n", SDL_HasSSE2()? "detected" : "not detected" );
-   SDL_ATprintVerbose( 1, "   AltiVec %s\n", SDL_HasAltiVec()? "detected" : "not detected" );
+   SDL_ATprintVerbose( 1, "   SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected" );
+   SDL_ATprintVerbose( 1, "   SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected" );
+   SDL_ATprintVerbose( 1, "   SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected" );
 
    plat_testTypes();
    plat_testEndian();