#include "intf_msg.h"
#include "main.h"
-#define WIDTH 640
-#define HEIGHT 480
+#define WIDTH 800
+#define HEIGHT 600
#define BITS_PER_PLANE 16
#define BYTES_PER_PIXEL 2
static void GlideCloseDisplay ( vout_thread_t *p_vout );
/*****************************************************************************
- * vout_SysCreate: allocates Glide video thread output method
+ * vout_GlideCreate: allocates Glide video thread output method
*****************************************************************************
* This function allocates and initializes a Glide vout method.
*****************************************************************************/
-int vout_SysCreate( vout_thread_t *p_vout, char *psz_display,
+int vout_GlideCreate( vout_thread_t *p_vout, char *psz_display,
int i_root_window, void *p_data )
{
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s\n", strerror(ENOMEM) );
+ intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Open and initialize device */
if( GlideOpenDisplay( p_vout ) )
{
- intf_ErrMsg("vout error: can't open display\n");
+ intf_ErrMsg("vout error: can't open display");
free( p_vout->p_sys );
return( 1 );
}
}
/*****************************************************************************
- * vout_SysInit: initialize Glide video thread output method
+ * vout_GlideInit: initialize Glide video thread output method
*****************************************************************************/
-int vout_SysInit( vout_thread_t *p_vout )
+int vout_GlideInit( vout_thread_t *p_vout )
{
return( 0 );
}
/*****************************************************************************
- * vout_SysEnd: terminate Glide video thread output method
+ * vout_GlideEnd: terminate Glide video thread output method
*****************************************************************************/
-void vout_SysEnd( vout_thread_t *p_vout )
+void vout_GlideEnd( vout_thread_t *p_vout )
{
;
}
/*****************************************************************************
- * vout_SysDestroy: destroy Glide video thread output method
+ * vout_GlideDestroy: destroy Glide video thread output method
*****************************************************************************
* Terminate an output method created by vout_CreateOutputMethod
*****************************************************************************/
-void vout_SysDestroy( vout_thread_t *p_vout )
+void vout_GlideDestroy( vout_thread_t *p_vout )
{
GlideCloseDisplay( p_vout );
free( p_vout->p_sys );
}
/*****************************************************************************
- * vout_SysManage: handle Glide events
+ * vout_GlideManage: handle Glide events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
*****************************************************************************/
-int vout_SysManage( vout_thread_t *p_vout )
+int vout_GlideManage( vout_thread_t *p_vout )
{
return 0;
}
/*****************************************************************************
- * vout_SysDisplay: displays previously rendered output
+ * vout_GlideDisplay: displays previously rendered output
*****************************************************************************
* This function send the currently rendered image to Glide image, waits until
* it is displayed and switch the two rendering buffers, preparing next frame.
*****************************************************************************/
-void vout_SysDisplay( vout_thread_t *p_vout )
+void vout_GlideDisplay( vout_thread_t *p_vout )
{
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
&p_vout->p_sys->p_buffer_info) == FXFALSE )
{
- intf_ErrMsg( "vout error: can't take 3dfx back buffer lock\n" );
+ intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
}
}
{
static char version[80];
GrHwConfiguration hwconfig;
- GrScreenResolution_t resolution = GR_RESOLUTION_640x480;
+ GrScreenResolution_t resolution = GR_RESOLUTION_800x600;
GrLfbInfo_t p_front_buffer_info; /* front buffer info */
p_vout->i_width = WIDTH;
p_vout->p_sys->p_video = malloc( p_vout->p_sys->i_page_size * 2 );
if( (int)p_vout->p_sys->p_video == -1 )
{
- intf_ErrMsg( "vout error: can't map video memory (%s)\n", strerror(errno) );
+ intf_ErrMsg( "vout error: can't map video memory (%s)",
+ strerror(errno) );
return( 1 );
}
if( !grSstQueryHardware(&hwconfig) )
{
- intf_ErrMsg( "vout error: can't get 3dfx hardware config\n" );
+ intf_ErrMsg( "vout error: can't get 3dfx hardware config" );
return( 1 );
}
if( !grSstWinOpen(0, resolution, GR_REFRESH_60Hz,
GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1) )
{
- intf_ErrMsg( "vout error: can't open 3dfx screen\n" );
+ intf_ErrMsg( "vout error: can't open 3dfx screen" );
return( 1 );
}
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
&p_front_buffer_info) == FXFALSE )
{
- intf_ErrMsg( "vout error: can't take 3dfx front buffer lock\n" );
+ intf_ErrMsg( "vout error: can't take 3dfx front buffer lock" );
grGlideShutdown();
return( 1 );
}
GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE,
&p_vout->p_sys->p_buffer_info) == FXFALSE )
{
- intf_ErrMsg( "vout error: can't take 3dfx back buffer lock\n" );
+ intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" );
grGlideShutdown();
return( 1 );
}