Example #1
0
static void ddraw_delete_surfaces(win_window_info *window)
{
	dd_info *dd = window->drawdata;

	// release the gamma control
	if (dd->gamma != NULL)
		IDirectDrawGammaControl_Release(dd->gamma);
	dd->gamma = NULL;

	// release the clipper
	if (dd->clipper != NULL)
		IDirectDrawClipper_Release(dd->clipper);
	dd->clipper = NULL;

	// free the memory buffer
	if (dd->membuffer != NULL)
		free(dd->membuffer);
	dd->membuffer = NULL;
	dd->membuffersize = 0;

	// release the blit surface
	if (dd->blit != NULL)
		IDirectDrawSurface7_Release(dd->blit);
	dd->blit = NULL;

	// release the back surface
	if (dd->back != NULL)
		IDirectDrawSurface7_Release(dd->back);
	dd->back = NULL;

	// release the primary surface
	if (dd->primary != NULL)
		IDirectDrawSurface7_Release(dd->primary);
	dd->primary = NULL;
}
Example #2
0
void renderer_dd::ddraw_delete_surfaces()
{
	// release the gamma control
	if (gamma != NULL)
		IDirectDrawGammaControl_Release(gamma);
	gamma = NULL;

	// release the clipper
	if (clipper != NULL)
		IDirectDrawClipper_Release(clipper);
	clipper = NULL;

	// free the memory buffer
	global_free_array(membuffer);
	membuffer = NULL;
	membuffersize = 0;

	// release the blit surface
	if (blit != NULL)
		IDirectDrawSurface7_Release(blit);
	blit = NULL;

	// release the back surface
	if (back != NULL)
		IDirectDrawSurface7_Release(back);
	back = NULL;

	// release the primary surface
	if (primary != NULL)
		IDirectDrawSurface7_Release(primary);
	primary = NULL;
}