diff options
Diffstat (limited to 'libvo/vo_3dfx.c')
-rw-r--r-- | libvo/vo_3dfx.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c index 32198f5740..4759a40833 100644 --- a/libvo/vo_3dfx.c +++ b/libvo/vo_3dfx.c @@ -27,6 +27,8 @@ #include <string.h> #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include "video_out.h" #include "video_out_internal.h" @@ -167,12 +169,12 @@ create_window(Display *display, char *title) bpp = attribs.depth; if (bpp != 16) { - printf("Only 16bpp supported!"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_Only16BppSupported); exit(-1); } XMatchVisualInfo(display,screen,bpp,TrueColor,&vinfo); - printf("visual id is %lx\n",vinfo.visualid); + mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_3DFX_VisualIdIs,vinfo.visualid); theCmap = XCreateColormap(display, RootWindow(display,screen), vinfo.visual, AllocNone); @@ -333,7 +335,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin // Open driver device if ( fd == -1 ) { - printf("Device not opened /dev/3dfx\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_UnableToOpenDevice); return -1; } @@ -352,7 +354,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin data.device = 0; if ((retval = ioctl(fd,_IOC(_IOC_READ,'3',3,0),&data)) < 0) { - printf("Error: %d\n",retval); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_Error,retval); return -1; } @@ -363,7 +365,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin data.device = 0; if ((retval = ioctl(fd,_IOC(_IOC_READ,'3',3,0),&data)) < 0) { - printf("Error: %d\n",retval); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_Error,retval); return -1; } @@ -372,7 +374,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin memBase1 = mmap(0,3*page_space,PROT_READ | PROT_WRITE,MAP_SHARED,fd,baseAddr1); if (memBase0 == (uint32_t *) 0xFFFFFFFF || memBase1 == (uint32_t *) 0xFFFFFFFF) { - printf("Couldn't map 3dfx memory areas: %p,%p,%d\n", + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_CouldntMapMemoryArea, memBase0,memBase1,errno); } @@ -411,7 +413,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin atexit(restore); - printf("(display) 3dfx initialized %p\n",memBase1); + mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_3DFX_DisplayInitialized,memBase1); return 0; } @@ -483,13 +485,13 @@ static int preinit(const char *arg) { if ( (fd = open("/dev/3dfx",O_RDWR) ) == -1) { - printf("Couldn't open /dev/3dfx\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_UnableToOpenDevice); return -1; } if(arg) { - printf("vo_3dfx: Unknown subdevice: %s\n",arg); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_UnknownSubdevice,arg); return ENOSYS; } return 0; |