comparison src/SDL_compat.c @ 2328:91e601d9df8b

re: bug#563. checking in some commented out trace code and a fix so that the in testalpha.c the background only flashes when alpha == 255. The problem that is being fixed is caused by clearing SDL_COPY_RLE_COLORKEY without setting SDL_COPY_RLE_DESIRED in SDL_UnRELSurface.
author Bob Pendleton <bob@pendleton.com>
date Fri, 14 Mar 2008 18:17:49 +0000
parents c25d45b7add3
children 3eb72191bb7e e1da92da346c 44e49d3fa6cf
comparison
equal deleted inserted replaced
2327:7b53a8401195 2328:91e601d9df8b
27 #include "SDL_syswm.h" 27 #include "SDL_syswm.h"
28 28
29 #include "video/SDL_sysvideo.h" 29 #include "video/SDL_sysvideo.h"
30 #include "video/SDL_pixels_c.h" 30 #include "video/SDL_pixels_c.h"
31 31
32 32 static SDL_WindowID SDL_VideoWindow = 0;
33 static SDL_WindowID SDL_VideoWindow;
34 static SDL_RendererInfo SDL_VideoRendererInfo; 33 static SDL_RendererInfo SDL_VideoRendererInfo;
35 static SDL_TextureID SDL_VideoTexture; 34 static SDL_TextureID SDL_VideoTexture = 0;
36 static SDL_Surface *SDL_VideoSurface; 35 static SDL_Surface *SDL_VideoSurface = NULL;
37 static SDL_Surface *SDL_ShadowSurface; 36 static SDL_Surface *SDL_ShadowSurface = NULL;
38 static SDL_Surface *SDL_PublicSurface; 37 static SDL_Surface *SDL_PublicSurface = NULL;
39 static SDL_GLContext *SDL_VideoContext; 38 static SDL_GLContext *SDL_VideoContext = NULL;
40 static char *wm_title; 39 static char *wm_title = NULL;
41 40
42 char * 41 char *
43 SDL_AudioDriverName(char *namebuf, int maxlen) 42 SDL_AudioDriverName(char *namebuf, int maxlen)
44 { 43 {
45 const char *name = SDL_GetCurrentAudioDriver(); 44 const char *name = SDL_GetCurrentAudioDriver();
389 SDL_VideoPaletteChanged, NULL); 388 SDL_VideoPaletteChanged, NULL);
390 SDL_FreeSurface(SDL_VideoSurface); 389 SDL_FreeSurface(SDL_VideoSurface);
391 SDL_VideoSurface = NULL; 390 SDL_VideoSurface = NULL;
392 } 391 }
393 if (SDL_VideoContext) { 392 if (SDL_VideoContext) {
394 SDL_GL_MakeCurrent(0, NULL); 393 /* SDL_GL_MakeCurrent(0, NULL); *//* Doesn't do anything */
395 SDL_GL_DeleteContext(SDL_VideoContext); 394 SDL_GL_DeleteContext(SDL_VideoContext);
396 SDL_VideoContext = NULL; 395 SDL_VideoContext = NULL;
397 } 396 }
398 if (SDL_VideoWindow) { 397 if (SDL_VideoWindow) {
399 SDL_GetWindowPosition(SDL_VideoWindow, &window_x, &window_y); 398 SDL_GetWindowPosition(SDL_VideoWindow, &window_x, &window_y);