src/video/win32/SDL_d3drender.c
changeset 1901 f1828a500391
parent 1900 5c6bdbf3aadf
child 1903 f132024010be
     1.1 --- a/src/video/win32/SDL_d3drender.c	Wed Jul 12 09:25:17 2006 +0000
     1.2 +++ b/src/video/win32/SDL_d3drender.c	Thu Jul 13 08:13:02 2006 +0000
     1.3 @@ -287,6 +287,7 @@
     1.4          pparams.Windowed = TRUE;
     1.5      }
     1.6      pparams.FullScreen_RefreshRateInHz = 0;     /* FIXME */
     1.7 +    pparams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
     1.8  
     1.9      result = IDirect3D9_CreateDevice(videodata->d3d, D3DADAPTER_DEFAULT,        /* FIXME */
    1.10                                       D3DDEVTYPE_HAL,
    1.11 @@ -431,6 +432,7 @@
    1.12                     Uint32 color)
    1.13  {
    1.14      SDL_D3D_RenderData *data = (SDL_D3D_RenderData *) renderer->driverdata;
    1.15 +    D3DRECT d3drect;
    1.16      HRESULT result;
    1.17  
    1.18      if (data->beginScene) {
    1.19 @@ -438,9 +440,12 @@
    1.20          data->beginScene = SDL_FALSE;
    1.21      }
    1.22  
    1.23 -    result =
    1.24 -        IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET,
    1.25 -                               (D3DCOLOR) color, 1.0f, 0);
    1.26 +    d3drect.x1 = rect->x;
    1.27 +    d3drect.x2 = rect->x+rect->w;
    1.28 +    d3drect.y1 = rect->y;
    1.29 +    d3drect.y2 = rect->y+rect->h;
    1.30 +
    1.31 +    result = IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET, (D3DCOLOR) color, 1.0f, 0);
    1.32      if (FAILED(result)) {
    1.33          D3D_SetError("Clear()", result);
    1.34          return -1;