rem: scope_bg_canvas = TFB_DrawCanvas_New_Paletted (width, height, scope_frame->image->Palette, -1);
add: if (TFB_DrawCanvas_IsPaletted (scope_frame->image->NormalImg)) { scope_bg_canvas = TFB_DrawCanvas_New_Paletted (width, height, scope_frame->image->Palette, -1); scope_surf_canvas = TFB_DrawCanvas_New_Paletted (width, height, scope_frame->image->Palette, -1); } else { scope_bg_canvas = TFB_DrawCanvas_New_ForScreen (width, height, FALSE); scope_surf_canvas = TFB_DrawCanvas_New_ForScreen (width, height, FALSE); }
context: InitOscilloscope (DWORD x, DWORD y, DWORD width, DWORD height, FRAME f){	scope_frame = f;	if (!scope_init)	{		TFB_Canvas scope_bg_canvas, scope_surf_canvas;		scope_bg_canvas = TFB_DrawCanvas_New_Paletted (width, height,				scope_frame->image->Palette, -1);		scope_bg = TFB_DrawImage_New (scope_bg_canvas);		scope_surf_canvas = TFB_DrawCanvas_New_Paletted (width, height,				scope_frame->image->Palette, -1);		scope_surf = TFB_DrawImage_New (scope_surf_canvas);		TFB_DrawImage_Image (scope_frame->image, 0, 0, 0, NULL, scope_bg);		scope_init = 1;	}	/* remove compiler warnings */	(void) x;	(void) y;}