Fixed whitespace
authorSam Lantinga <slouken@libsdl.org>
Mon, 21 Oct 2013 22:08:56 -0700
changeset 7877aa7e6130d6e9
parent 7876 d6373384b5ce
child 7878 b331f16f3fe0
Fixed whitespace
src/render/direct3d/SDL_render_d3d.c
     1.1 --- a/src/render/direct3d/SDL_render_d3d.c	Mon Oct 21 10:28:57 2013 -0700
     1.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Mon Oct 21 22:08:56 2013 -0700
     1.3 @@ -543,17 +543,17 @@
     1.4      D3D_RenderData *data;
     1.5      SDL_SysWMinfo windowinfo;
     1.6      HRESULT result;
     1.7 -	const char *hint;
     1.8 +    const char *hint;
     1.9      D3DPRESENT_PARAMETERS pparams;
    1.10      IDirect3DSwapChain9 *chain;
    1.11      D3DCAPS9 caps;
    1.12 -	DWORD device_flags;
    1.13 +    DWORD device_flags;
    1.14      Uint32 window_flags;
    1.15      int w, h;
    1.16      SDL_DisplayMode fullscreen_mode;
    1.17      int d3dxVersion;
    1.18      char d3dxDLLFile[50];
    1.19 -	int displayIndex;
    1.20 +    int displayIndex;
    1.21  
    1.22      renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
    1.23      if (!renderer) {
    1.24 @@ -568,7 +568,7 @@
    1.25          return NULL;
    1.26      }
    1.27  
    1.28 -	if( D3D_LoadDLL( &data->d3dDLL, &data->d3d ) ) {
    1.29 +    if( D3D_LoadDLL( &data->d3dDLL, &data->d3d ) ) {
    1.30          for (d3dxVersion=50;d3dxVersion>0;d3dxVersion--) {
    1.31              LPTSTR dllName;
    1.32              SDL_snprintf(d3dxDLLFile, sizeof(d3dxDLLFile), "D3DX9_%02d.dll", d3dxVersion);
    1.33 @@ -600,7 +600,7 @@
    1.34      renderer->WindowEvent = D3D_WindowEvent;
    1.35      renderer->CreateTexture = D3D_CreateTexture;
    1.36      renderer->UpdateTexture = D3D_UpdateTexture;
    1.37 -	renderer->UpdateTextureYUV = D3D_UpdateTextureYUV;
    1.38 +    renderer->UpdateTextureYUV = D3D_UpdateTextureYUV;
    1.39      renderer->LockTexture = D3D_LockTexture;
    1.40      renderer->UnlockTexture = D3D_UnlockTexture;
    1.41      renderer->SetRenderTarget = D3D_SetRenderTarget;
    1.42 @@ -661,22 +661,22 @@
    1.43      }
    1.44  
    1.45      /* Get the adapter for the display that the window is on */
    1.46 -	displayIndex = SDL_GetWindowDisplayIndex( window );
    1.47 +    displayIndex = SDL_GetWindowDisplayIndex( window );
    1.48      data->adapter = SDL_Direct3D9GetAdapterIndex( displayIndex );
    1.49  
    1.50      IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);
    1.51  
    1.52 -	device_flags = D3DCREATE_FPU_PRESERVE;
    1.53 -	if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
    1.54 -		device_flags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
    1.55 -	} else {
    1.56 -		device_flags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
    1.57 -	}
    1.58 +    device_flags = D3DCREATE_FPU_PRESERVE;
    1.59 +    if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
    1.60 +        device_flags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
    1.61 +    } else {
    1.62 +        device_flags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
    1.63 +    }
    1.64  
    1.65 -	hint = SDL_GetHint(SDL_HINT_RENDER_DIRECT3D_THREADSAFE);
    1.66 -	if (hint && SDL_atoi(hint)) {
    1.67 -		device_flags |= D3DCREATE_MULTITHREADED;
    1.68 -	}
    1.69 +    hint = SDL_GetHint(SDL_HINT_RENDER_DIRECT3D_THREADSAFE);
    1.70 +    if (hint && SDL_atoi(hint)) {
    1.71 +        device_flags |= D3DCREATE_MULTITHREADED;
    1.72 +    }
    1.73  
    1.74      result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
    1.75                                       D3DDEVTYPE_HAL,
    1.76 @@ -1033,27 +1033,27 @@
    1.77                       const Uint8 *Uplane, int Upitch,
    1.78                       const Uint8 *Vplane, int Vpitch)
    1.79  {
    1.80 -	D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
    1.81 -	SDL_bool full_texture = SDL_FALSE;
    1.82 +    D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
    1.83 +    SDL_bool full_texture = SDL_FALSE;
    1.84  
    1.85  #ifdef USE_DYNAMIC_TEXTURE
    1.86 -	if (texture->access == SDL_TEXTUREACCESS_STREAMING &&
    1.87 -		rect->x == 0 && rect->y == 0 &&
    1.88 -		rect->w == texture->w && rect->h == texture->h) {
    1.89 -			full_texture = SDL_TRUE;
    1.90 -	}
    1.91 +    if (texture->access == SDL_TEXTUREACCESS_STREAMING &&
    1.92 +        rect->x == 0 && rect->y == 0 &&
    1.93 +        rect->w == texture->w && rect->h == texture->h) {
    1.94 +            full_texture = SDL_TRUE;
    1.95 +    }
    1.96  #endif
    1.97  
    1.98 -	if (D3D_UpdateTextureInternal(data->texture, texture->format, full_texture, rect->x, rect->y, rect->w, rect->h, Yplane, Ypitch) < 0) {
    1.99 -		return -1;
   1.100 -	}
   1.101 -	if (D3D_UpdateTextureInternal(data->utexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Uplane, Upitch) < 0) {
   1.102 -		return -1;
   1.103 -	}
   1.104 -	if (D3D_UpdateTextureInternal(data->vtexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Vplane, Vpitch) < 0) {
   1.105 -		return -1;
   1.106 -	}
   1.107 -	return 0;
   1.108 +    if (D3D_UpdateTextureInternal(data->texture, texture->format, full_texture, rect->x, rect->y, rect->w, rect->h, Yplane, Ypitch) < 0) {
   1.109 +        return -1;
   1.110 +    }
   1.111 +    if (D3D_UpdateTextureInternal(data->utexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Uplane, Upitch) < 0) {
   1.112 +        return -1;
   1.113 +    }
   1.114 +    if (D3D_UpdateTextureInternal(data->vtexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Vplane, Vpitch) < 0) {
   1.115 +        return -1;
   1.116 +    }
   1.117 +    return 0;
   1.118  }
   1.119  
   1.120  static int
   1.121 @@ -1894,20 +1894,20 @@
   1.122  IDirect3DDevice9 *
   1.123  SDL_RenderGetD3D9Device(SDL_Renderer * renderer)
   1.124  {
   1.125 -	D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
   1.126 -	IDirect3DDevice9 *device;
   1.127 +    D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
   1.128 +    IDirect3DDevice9 *device;
   1.129  
   1.130 -	// Make sure that this is a D3D renderer
   1.131 -	if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
   1.132 -		SDL_SetError("Renderer is not a D3D renderer");
   1.133 -		return NULL;
   1.134 -	}
   1.135 +    // Make sure that this is a D3D renderer
   1.136 +    if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
   1.137 +        SDL_SetError("Renderer is not a D3D renderer");
   1.138 +        return NULL;
   1.139 +    }
   1.140  
   1.141 -	device = data->device;
   1.142 -	if (device) {
   1.143 -		IDirect3DDevice9_AddRef( device );
   1.144 -	}
   1.145 -	return device;
   1.146 +    device = data->device;
   1.147 +    if (device) {
   1.148 +        IDirect3DDevice9_AddRef( device );
   1.149 +    }
   1.150 +    return device;
   1.151  }
   1.152  
   1.153  #endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */