Blitting isn't working fullscreen in WinXP

I’ve got an SDL program that uses a combination of SDL_FillRect,
SDL_BlitSurface, and a couple of methods that access the screen memory
directly. In a window it’s all fine and everything works, but if I change my
code to go fullscreen, the fillrect and the blitting don’t do anything, you
can only see the effects of the methods accessing memory, drawing onto a
black screen. My graphics card is a Matrox G400.

Not only have I got the same source working fine fullscreen on Red Hat (with
an nVidia card), but my friend is having the exact same problem, and he has
a GeForce 4 MX.

Oh yeah and it’s using the SDL 1.2.7 release.

Thanks for any thoughts you may have, cheers–
Nick H

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Are you sure to make right use of lock/unlock ?

Maybe some code snippet could help…

Le dimanche 13 Juin 2004 19:11, Nick Howes a ?crit :

I’ve got an SDL program that uses a combination of SDL_FillRect,
SDL_BlitSurface, and a couple of methods that access the screen memory
directly. In a window it’s all fine and everything works, but if I change
my code to go fullscreen, the fillrect and the blitting don’t do anything,
you can only see the effects of the methods accessing memory, drawing onto
a black screen. My graphics card is a Matrox G400.

Not only have I got the same source working fine fullscreen on Red Hat
(with an nVidia card), but my friend is having the exact same problem, and
he has a GeForce 4 MX.

Oh yeah and it’s using the SDL 1.2.7 release.

Thanks for any thoughts you may have, cheers


Nick H


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Michel Nolard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAzWTSyAKwOMHoSb0RAo/PAKCnU4zx2ZH5sAa9z9zPrNqdaokPDwCfY6Eq
htv0jwfB/oIF4ThqMkSga7M=
=V4mq
-----END PGP SIGNATURE-----

“Michel Nolard” <michel.nolard at outmax.org> wrote in message
news:200406141041.57619.michel.nolard at outmax.org…>-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

Are you sure to make right use of lock/unlock ?

Maybe some code snippet could help…


Yep I lock and unlock before and after each paint… here’s the essential
bits (taken out things like event pumping to save space). without
SDL_FULLSCREEN it does it fine and paints. In fullscreen I just get the
cursor but the background is black.

Uint32 flags = SDL_HWSURFACE | SDL_FULLSCREEN;
if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
atexit(SDL_Quit);

screen = SDL_SetVideoMode(SCREENWIDTH, SCREENHEIGHT, SCREENDEPTH, flags );
else {

while (!done)
{

if ( SDL_MUSTLOCK(screen) ) {
if ( SDL_LockSurface(screen) < 0 ) {
return 1;
}
}

SDL_FillRect(screen, NULL, SDL_MapRGBA( screen->format, 0xdd ,0xdd, 0xcd,
0xff ) );

if ( SDL_MUSTLOCK(screen) ) { SDL_UnlockSurface(screen); }

SDL_Flip(screen);
}

I’ve got an SDL program that uses a combination of SDL_FillRect,
SDL_BlitSurface, and a couple of methods that access the screen memory
directly. In a window it’s all fine and everything works, but if I change my
code to go fullscreen, the fillrect and the blitting don’t do anything, you
can only see the effects of the methods accessing memory, drawing onto a
black screen. My graphics card is a Matrox G400.

Not only have I got the same source working fine fullscreen on Red Hat (with
an nVidia card), but my friend is having the exact same problem, and he has
a GeForce 4 MX.

Are you running under X11? Using DGA? etc.?

-Sam Lantinga, Software Engineer, Blizzard Entertainment

“Sam Lantinga” wrote in message
news:E1Banvg-0007Aq-00 at twomix.devolution.com

I’ve got an SDL program that uses a combination of SDL_FillRect,
SDL_BlitSurface, and a couple of methods that access the screen memory
directly. In a window it’s all fine and everything works, but if I
change my

code to go fullscreen, the fillrect and the blitting don’t do anything,
you

can only see the effects of the methods accessing memory, drawing onto a
black screen. My graphics card is a Matrox G400.

Not only have I got the same source working fine fullscreen on Red Hat
(with

an nVidia card), but my friend is having the exact same problem, and he
has

a GeForce 4 MX.

Are you running under X11? Using DGA? etc.?

-Sam Lantinga, Software Engineer, Blizzard Entertainment

Under Red Hat? I’m not sure, it’s not my machine. I don’t really know how to
tell, it’s just running KDE.