Skip to content

Commit

Permalink
Minor style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 10, 2014
1 parent 1a35f32 commit 965cdf1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/render/direct3d11/SDL_render_d3d11.c
Expand Up @@ -1130,7 +1130,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer)
goto done;
}

/* Setup render state that doesn't change through the program */
/* Setup render state that doesn't change */
ID3D11DeviceContext_IASetInputLayout(data->d3dContext, data->inputLayout);
ID3D11DeviceContext_VSSetShader(data->d3dContext, data->vertexShader, NULL, 0);
ID3D11DeviceContext_VSSetConstantBuffers(data->d3dContext, 0, 1, &data->vertexShaderConstants);
Expand Down Expand Up @@ -1185,8 +1185,7 @@ D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer * renderer)
static DXGI_MODE_ROTATION
D3D11_GetCurrentRotation()
{
switch (DisplayProperties::CurrentOrientation)
{
switch (DisplayProperties::CurrentOrientation) {
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
/* Windows Phone rotations */
case DisplayOrientations::Landscape:
Expand Down Expand Up @@ -1458,8 +1457,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer)
* To note, the call for this, IDXGISwapChain1::SetRotation, is not necessary
* on Windows Phone, nor is it supported there. It's only needed in Windows 8/RT.
*/
if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL)
{
if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) {
result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation);
if (FAILED(result)) {
WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain1::SetRotation", result);
Expand Down Expand Up @@ -1515,7 +1513,7 @@ D3D11_HandleDeviceLost(SDL_Renderer * renderer)
D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
HRESULT result = S_OK;

/* FIXME: Need to release all resources - all texures are invalid! */
/* FIXME: Need to release all resources - all textures are invalid! */

result = D3D11_CreateDeviceResources(renderer);
if (FAILED(result)) {
Expand Down Expand Up @@ -1844,8 +1842,7 @@ D3D11_UpdateViewport(SDL_Renderer * renderer)
* direction of the DXGI_MODE_ROTATION enumeration.
*/
Float4X4 projection;
switch (data->rotation)
{
switch (data->rotation) {
case DXGI_MODE_ROTATION_IDENTITY:
projection = MatrixIdentity();
break;
Expand Down Expand Up @@ -2466,8 +2463,7 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
textureMemory.RowPitch,
format,
pixels,
pitch) != 0)
{
pitch) != 0) {
/* When SDL_ConvertPixels fails, it'll have already set the format.
* Get the error message, and attach some extra data to it.
*/
Expand Down

0 comments on commit 965cdf1

Please sign in to comment.