[SDL] SDL works only for root
Lz
elezeta at gmail.com
Sun Jan 8 09:59:27 PST 2006
Hello, be sure you got the right privileges on the device... was it
/dev/fb0? then adding your user to the group which owns /dev/fb0 will
work :)
On 1/8/06, IraqiGeek <geek at iraqigeek.com> wrote:
> Hi all,
>
> I was finally able to get SDL running on LFS under vmware (sorta, cause I
> still cant get 24-bit color, but at least its working on 16-bit).
>
> Now, what happens is that if I run the test code below as root, it works
> fine, but if I run it as another user, it get back to "no available video
> device". How to get SDL running for everybody?
>
>
> #include <SDL/SDL.h>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> SDL_Surface *screen;
>
> if (SDL_Init(SDL_INIT_VIDEO) != 0) {
> printf("Unable to initialize SDL: %s\n", SDL_GetError());
> return 1;
> }
>
> atexit(SDL_Quit);
> screen = SDL_SetVideoMode(640, 480, 16, SDL_FULLSCREEN);
>
> if (screen == NULL) {
> printf("Unable to set video mode: %s\n", SDL_GetError());
> return 1;
> }
>
> printf("Success!\n");
> return 0;
> }
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>
--
Lz (elezeta at gmail.com).
http://elezeta.bounceme.net
More information about the SDL
mailing list