Search
lxdream.org :: lxdream/src/pvr2/pvr2.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.c
changeset 144:7f0714e89aaa
prev133:249aeda31f02
next151:3d3135644b8e
author nkeynes
date Mon May 15 08:28:52 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Rename video_driver to display_driver
Add input source to display
Implement configuration file support
Hook controllers up to configuration
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.c Thu Mar 30 11:30:59 2006 +0000
1.2 +++ b/src/pvr2/pvr2.c Mon May 15 08:28:52 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.c,v 1.22 2006-03-30 11:30:59 nkeynes Exp $
1.6 + * $Id: pvr2.c,v 1.23 2006-05-15 08:28:52 nkeynes Exp $
1.7 *
1.8 * PVR2 (Video) Core module implementation and MMIO registers.
1.9 *
1.10 @@ -18,7 +18,7 @@
1.11 #define MODULE pvr2_module
1.12
1.13 #include "dream.h"
1.14 -#include "video.h"
1.15 +#include "display.h"
1.16 #include "mem.h"
1.17 #include "asic.h"
1.18 #include "pvr2/pvr2.h"
1.19 @@ -41,7 +41,7 @@
1.20 pvr2_save_state, pvr2_load_state };
1.21
1.22
1.23 -video_driver_t video_driver = NULL;
1.24 +display_driver_t display_driver = NULL;
1.25
1.26 struct video_timing {
1.27 int fields_per_second;
1.28 @@ -136,19 +136,6 @@
1.29 return pvr2_state.frame_count;
1.30 }
1.31
1.32 -void video_set_driver( video_driver_t driver )
1.33 -{
1.34 - if( video_driver != NULL && video_driver->shutdown_driver != NULL )
1.35 - video_driver->shutdown_driver();
1.36 -
1.37 - video_driver = driver;
1.38 - if( driver->init_driver != NULL )
1.39 - driver->init_driver();
1.40 - driver->set_display_format( 640, 480, COLFMT_RGB32 );
1.41 - driver->set_render_format( 640, 480, COLFMT_RGB32, FALSE );
1.42 - texcache_gl_init();
1.43 -}
1.44 -
1.45 /**
1.46 * Display the next frame, copying the current contents of video ram to
1.47 * the window. If the video configuration has changed, first recompute the
1.48 @@ -193,18 +180,18 @@
1.49 break;
1.50 }
1.51
1.52 - if( video_driver != NULL ) {
1.53 + if( display_driver != NULL ) {
1.54 if( buffer->hres != last->hres ||
1.55 buffer->vres != last->vres ||
1.56 buffer->colour_format != last->colour_format) {
1.57 - video_driver->set_display_format( buffer->hres, buffer->vres,
1.58 + display_driver->set_display_format( buffer->hres, buffer->vres,
1.59 buffer->colour_format );
1.60 }
1.61 if( MMIO_READ( PVR2, DISPCFG2 ) & 0x08 ) { /* Blanked */
1.62 uint32_t colour = MMIO_READ( PVR2, DISPBORDER );
1.63 - video_driver->display_blank_frame( colour );
1.64 + display_driver->display_blank_frame( colour );
1.65 } else if( !pvr2_render_display_frame( PVR2_RAM_BASE + display_addr ) ) {
1.66 - video_driver->display_frame( buffer );
1.67 + display_driver->display_frame( buffer );
1.68 }
1.69 }
1.70 } else {
.