]> hackdaworld.org Git - my-code/ivac.git/commitdiff
test
authorhackbard <hackbard>
Thu, 27 Feb 2003 15:48:08 +0000 (15:48 +0000)
committerhackbard <hackbard>
Thu, 27 Feb 2003 15:48:08 +0000 (15:48 +0000)
dfb_api.c

index c530831a7b63115d54f9ec8e7ed9acb583a6a10d..8ed8fd3371219259b26a414835f079befb372a58 100644 (file)
--- a/dfb_api.c
+++ b/dfb_api.c
@@ -90,10 +90,15 @@ int create_logo_surface(void) {
 }
 
 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);
@@ -145,7 +150,7 @@ int flip_it(void) {
 }
 
 DVFrameCallback video_callback(void) {
- primary->StretchBlit(primary,video,NULL,NULL);
+ primary->Blit(primary,video,NULL,0,0);
  // flip_it;
  return DFENUM_OK;
 }