]> git.sesse.net Git - vlc/blobdiff - plugins/glide/vout_glide.c
. Correction of bugs in ifo parsing. Now the structures should be well
[vlc] / plugins / glide / vout_glide.c
index 6d6ff9c761bcef7ea8b77f824045760872e99fe2..757bb14043bafb229acbd88fccd18026ed0be24d 100644 (file)
@@ -46,8 +46,8 @@
 #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
 
@@ -74,25 +74,25 @@ static int     GlideOpenDisplay   ( vout_thread_t *p_vout );
 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 );
     }
@@ -101,50 +101,50 @@ int vout_SysCreate( vout_thread_t *p_vout, char *psz_display,
 }
 
 /*****************************************************************************
- * 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 );
 
@@ -154,7 +154,7 @@ void vout_SysDisplay( vout_thread_t *p_vout )
                    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" );
     }
 }
 
@@ -168,7 +168,7 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
 {
     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;
@@ -188,7 +188,8 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
     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 );
     }
 
@@ -197,7 +198,7 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
 
     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 );
     }
 
@@ -205,7 +206,7 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
     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 );
     }
 
@@ -227,7 +228,7 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
                    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 );
     }
@@ -237,7 +238,7 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
                    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 );
     }