src/bbcvdu.c
// Invert cursor/caret blob for 'copy key' editing:
Invert cursor/caret blob for 'copy key' editing.
Invert cursor / caret blob for ' copy key ' editing .
static void blob (void)
{
	int pitch ;
	int *pixels, *p ;
	SDL_Texture *tex ;
	SDL_Rect rect = {textx, texty, charx, chary} ;
	if ((cursa & BIT6) != 0)
		return ;
	tex = SDL_CreateTexture (memhdc, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING,
				 rect.w, rect.h) ;
	SDL_LockTexture (tex, NULL, (void **) &pixels, &pitch) ;
	BBC_RenderReadPixels (memhdc, &rect, SDL_PIXELFORMAT_ABGR8888, pixels, pitch) ;
	for (p = pixels; p < (pixels + rect.h * rect.w); p++)
		*p ^= 0xFFFFFF ;
	SDL_UnlockTexture (tex) ;
	SDL_RenderCopy (memhdc, tex, NULL, &rect) ;
	SDL_DestroyTexture (tex) ;
	bChanged = 1 ;
}
static void blob ( void ) { int pitch ; int * pixels , * p ; SDL_Texture * tex ; SDL_Rect rect = { textx , texty , charx , chary } ; if ( ( cursa & BIT6 ) != 0 ) return ; tex = SDL_CreateTexture ( memhdc , SDL_PIXELFORMAT_ABGR8888 , SDL_TEXTUREACCESS_STREAMING , rect . w , rect . h ) ; SDL_LockTexture ( tex , NULL , ( void * * ) & pixels , & pitch ) ; BBC_RenderReadPixels ( memhdc , & rect , SDL_PIXELFORMAT_ABGR8888 , pixels , pitch ) ; for ( p = pixels ; p < ( pixels + rect . h * rect . w ) ; p ++ ) * p ^= 0xFFFFFF ; SDL_UnlockTexture ( tex ) ; SDL_RenderCopy ( memhdc , tex , NULL , & rect ) ; SDL_DestroyTexture ( tex ) ; bChanged = 1 ; }
Invert cursor/caret blob for 'copy key' editing:
Invert cursor / caret blob for ' copy key ' editing :