}
int create_video_surface(void) {
+ float q;
DFBSurfaceDescription desc;
DFBVideoProviderCapabilities caps;
dfb->CreateVideoProvider(dfb,dfb_video_dev,&video_provider);
video_provider->GetSurfaceDescription(video_provider,&desc);
+ q=(((float)screen_height/desc.height>=(float)screen_width/desc.width)?
+ (float)screen_height/desc.height:(float)screen_width/desc.width);
+ desc.width=(int)(screen_width/q);
+ desc.height=(int)(screen_height/q);
video_provider->GetCapabilities(video_provider,&caps);
printf("video capabilities: %x\n",caps);
dfb->CreateSurface(dfb,&desc,&video);
}
DVFrameCallback video_callback(void) {
- primary->StretchBlit(primary,video,NULL,NULL);
+ primary->Blit(primary,video,NULL,0,0);
// flip_it;
return DFENUM_OK;
}