foxygit / doom Log in
commit 63fad45ab003f47fc5f28dd6f72e959e1d1a5f0d
Author:     Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Thu Aug 6 18:27:30 2015 +0200
Commit:     Fabian Greffrath <fabian@greffrath.com>
CommitDate: Thu Aug 6 18:27:30 2015 +0200

    Use the screen's native pixel format for the texture

    instead of hard-coding it to ARGB8888.
---
 src/i_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i_video.c b/src/i_video.c
index fa9feb3b..6ef2b19f 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1873,7 +1873,7 @@ static void SetVideoMode(screen_mode_t *mode, int w, int h)
     // are going to change frequently.

     texture = SDL_CreateTexture(renderer,
-                                SDL_PIXELFORMAT_ARGB8888,
+                                SDL_GetWindowPixelFormat(screen),
                                 SDL_TEXTUREACCESS_STREAMING,
                                 UPSCALE*SCREENWIDTH, UPSCALE*SCREENHEIGHT);