diff options
author | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-24 04:23:53 +0000 |
---|---|---|
committer | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-24 04:23:53 +0000 |
commit | 78417bf0ddb3e5711e6cc22ed98ed095286a0ece (patch) | |
tree | f7c5c3ca1c7ac07e6da82b70e3e1ce62e807a787 /libvo/vo_3dfx.c | |
parent | 141b72fe05ec33239e1be6ff6ce064a67440fb8f (diff) | |
download | mpv-78417bf0ddb3e5711e6cc22ed98ed095286a0ece.tar.bz2 mpv-78417bf0ddb3e5711e6cc22ed98ed095286a0ece.tar.xz |
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18235 b3059339-0415-0410-9bf9-f77b7e298cf2
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; |