Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Updated the platform test for the new CPU feature functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 13, 2011
1 parent abac93c commit b4c79d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/SDL_compat.c
Expand Up @@ -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;
Expand Down Expand Up @@ -410,9 +411,9 @@ SDL_ResizeVideoMode(int width, int height, int bpp, Uint32 flags)
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;
}

Expand Down Expand Up @@ -549,8 +550,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
}

/* 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;
Expand Down
8 changes: 3 additions & 5 deletions test/automated/platform/platform.c
Expand Up @@ -159,13 +159,11 @@ int test_platform (void)
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();
Expand Down

0 comments on commit b4c79d8

Please sign in to comment.