Updated the platform test for the new CPU feature functions.
authorSam Lantinga <slouken@libsdl.org>
Sun, 13 Feb 2011 01:29:29 -0800
changeset 528673d27f06a715
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
     1.1 --- a/src/SDL_compat.c	Sun Feb 13 00:18:05 2011 -0800
     1.2 +++ b/src/SDL_compat.c	Sun Feb 13 01:29:29 2011 -0800
     1.3 @@ -32,6 +32,7 @@
     1.4  
     1.5  
     1.6  static SDL_Window *SDL_VideoWindow = NULL;
     1.7 +static SDL_Surface *SDL_WindowSurface = NULL;
     1.8  static SDL_Surface *SDL_VideoSurface = NULL;
     1.9  static SDL_Surface *SDL_ShadowSurface = NULL;
    1.10  static SDL_Surface *SDL_PublicSurface = NULL;
    1.11 @@ -410,9 +411,9 @@
    1.12          return 0;
    1.13      }
    1.14  
    1.15 -    /* Destroy the screen texture and recreate it */
    1.16 -    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.17 -    if (!SDL_VideoSurface) {
    1.18 +    /* Get the surface for the window */
    1.19 +    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.20 +    if (!SDL_WindowSurface) {
    1.21          return -1;
    1.22      }
    1.23  
    1.24 @@ -549,8 +550,8 @@
    1.25      }
    1.26  
    1.27      /* Create the screen surface */
    1.28 -    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.29 -    if (!SDL_VideoSurface) {
    1.30 +    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.31 +    if (!SDL_WindowSurface) {
    1.32          return NULL;
    1.33      }
    1.34      SDL_VideoSurface->flags |= surface_flags;
     2.1 --- a/test/automated/platform/platform.c	Sun Feb 13 00:18:05 2011 -0800
     2.2 +++ b/test/automated/platform/platform.c	Sun Feb 13 01:29:29 2011 -0800
     2.3 @@ -159,13 +159,11 @@
     2.4     SDL_ATprintVerbose( 1, "Available extensions:\n" );
     2.5     SDL_ATprintVerbose( 1, "   RDTSC %s\n", SDL_HasRDTSC()? "detected" : "not detected" );
     2.6     SDL_ATprintVerbose( 1, "   MMX %s\n", SDL_HasMMX()? "detected" : "not detected" );
     2.7 -   SDL_ATprintVerbose( 1, "   MMX Ext %s\n", SDL_HasMMXExt()? "detected" : "not detected" );
     2.8 -   SDL_ATprintVerbose( 1, "   3DNow %s\n", SDL_Has3DNow()? "detected" : "not detected" );
     2.9 -   SDL_ATprintVerbose( 1, "   3DNow Ext %s\n",
    2.10 -         SDL_Has3DNowExt()? "detected" : "not detected" );
    2.11     SDL_ATprintVerbose( 1, "   SSE %s\n", SDL_HasSSE()? "detected" : "not detected" );
    2.12     SDL_ATprintVerbose( 1, "   SSE2 %s\n", SDL_HasSSE2()? "detected" : "not detected" );
    2.13 -   SDL_ATprintVerbose( 1, "   AltiVec %s\n", SDL_HasAltiVec()? "detected" : "not detected" );
    2.14 +   SDL_ATprintVerbose( 1, "   SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected" );
    2.15 +   SDL_ATprintVerbose( 1, "   SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected" );
    2.16 +   SDL_ATprintVerbose( 1, "   SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected" );
    2.17  
    2.18     plat_testTypes();
    2.19     plat_testEndian();