shithub: choc

Download patch

ref: 06aee4662c69ee944b455264bd11bf864bfdc7da
parent: 63fad45ab003f47fc5f28dd6f72e959e1d1a5f0d
author: Fabian Greffrath <fabian@greffrath.com>
date: Wed Aug 12 08:22:16 EDT 2015

Revert "Use the screen's native pixel format for the texture"

This reverts commit 63fad45ab003f47fc5f28dd6f72e959e1d1a5f0d.

TODO: This needs to be taken care of when creating the SDL_surfaces.
At least we know that SDL_UpdateTexture() does not take care of the
pixel order when uploading a SDL_surface to a texture.

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1873,7 +1873,7 @@
     // are going to change frequently.
 
     texture = SDL_CreateTexture(renderer,
-                                SDL_GetWindowPixelFormat(screen),
+                                SDL_PIXELFORMAT_ARGB8888,
                                 SDL_TEXTUREACCESS_STREAMING,
                                 UPSCALE*SCREENWIDTH, UPSCALE*SCREENHEIGHT);