Hello,

I'm having trouble in two areas whilst trying to learn to programme the mouse 
under svgalib.

1. The programme that comes with the source mousetest.c once compiled will run 
correctly for root but not for me (ivan). The error is "svgalib: Failed to 
initialise mouse."

This programme is setuid root & there is no difficulty in setting up the 
display - it's just the mouse operations that aren't recognised.  BTW, another 
mouse driven programme spin.c works perfectly no matter who runs it.

Also, the mouse works in X and on the console.

Does anyone have any ideas on this - I have checked the code numerous times & 
can't find any reason for this peculiar behaviour ?

2. I have a small programme that I have written myself

<code_snippet>

int main(void)
{
        int mousex,mousey;
        int i;
        vga_init();
        vga_setmode(35);
        gl_setcontextvga(35);
        gl_enableclipping();
        vga_setmousesupport(1);
        printf("mousetype %d\n",vga_getmousetype());
        mousex=mousey=100;
        draw_mouse_cursor(mousex,mousey);
        for(;;)
        {
                mouse_update();
                mousex = mouse_getx();
                mousey = mouse_gety();
                draw_mouse_cursor(mousex,mousey);
                if(vga_getkey()!=0) break;
        }

</code_snippet>

This I have checked also and is setuid root as it should be but no matter who 
runs the programme the mouse movement is not recognised.

I realise this is not the best place for detailed programming questions but the 
c language newsgroup (comp.languages.c IIRC) seems to be pathologically devoted 
to ANSII discussion only.

As always, any and all comments, answers & questions welcomed.  A copy of 
libvga.config file supplied on request.

Ivan.

Reply via email to