We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1898

Summary: SDL_BlitSurface not working
Product: SDL Reporter: kursher <345288901>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED ENDOFLIFE QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2    
Version: 1.2.15   
Hardware: x86   
OS: Windows 7   
Attachments: All2.bmp

Description kursher 2013-06-07 03:19:41 UTC
Created attachment 1180 [details]
All2.bmp

SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
SDL_WM_SetCaption("Demo", NULL);
SDL_WM_SetIcon(SDL_LoadBMP("icon.bmp"), NULL);
SDL_Surface* pBKSurface = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE | SDL_DOUBLEBUF );

SDL_Rect nRect = {0, 0, 16, 16};
Uint32 nColorKey = SDL_MapRGB(pBKSurface->format, 0xF6, 0x00, 0xF6);

SDL_Surface* pSpr = SDL_LoadBMP("all2.bmp");         // 32bit BMP
SDL_SetColorKey(pSpr, SDL_SRCCOLORKEY, nColorKey);
SDL_Surface* pNewSpr = SDL_DisplayFormatAlpha(pSpr);				
SDL_FreeSurface(pSpr);

SDL_Surface* pMem = SDL_CreateRGBSurface(pNewSpr->flags, nRect.w, nRect.h,  pNewSpr->format->BitsPerPixel, pNewSpr->format->Rmask, pNewSpr->format->Gmask, pNewSpr->format->Bmask, pNewSpr->format->Amask);

SDL_BlitSurface(pNewSpr, &nRect, pMem, NULL);       // it does not Blit
//SDL_SoftStretch(pNewSpr, &nRect, pMem, NULL);	    // It can bilt


while ( TRUE )
{
	SDL_Event nKeyEvent;
	if ( SDL_PollEvent(&nKeyEvent) )
	{
		if ( nKeyEvent.quit.type == SDL_QUIT )
			break;
	}

	SDL_BlitSurface(pMem, NULL, pBKSurface, NULL);
	SDL_Flip(pBKSurface);
}
Comment 1 Ryan C. Gordon 2015-08-25 09:38:24 UTC
Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here.

We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable.

Our current focus is on SDL 2.0.

If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features.

Failing that, we _will_ accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases.

Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation.

Thank you,
--ryan.