I was calling SDL_UpdateRect (Page,0,0,0,0)
to update all the screen area:
it works well in win95
it works well in win98 first edition
in win98 second edition I have to call SDL_UpdateRect (Page,0,0,639,479)
I’ve fixed my program by calling always the last one,
but I wonder if there’s a problem to fix in SDL sources,
because in them there are calls to SDL_UpdateRect (,0,0,0,0);
in win98 second edition I have to call SDL_UpdateRect (Page,0,0,639,479)
Bah, I’ve tried reducing the bottom left coordinates by one, and it actually
doesn’t draw the bottom-most left pixel in DirectX. Is this using the GDI
driver or DirectX?
Thanks!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
in win98 second edition I have to call SDL_UpdateRect (Page,0,0,639,479)
Bah, I’ve tried reducing the bottom left coordinates by one, and it actually
doesn’t draw the bottom-most left pixel in DirectX. Is this using the GDI
driver or DirectX?
It is in DirectX full screen.
Have you been able to see the same bug on your computer?
Maybe in src/video/windx5/SDL_dx5video.c
in function DX5_WindowUpdate we can add something like this?
if (rects[i].w == 0) rects[i].w = -1;
if (rects[i].h == 0) rects[i].h = -1;
in win98 second edition I have to call SDL_UpdateRect (Page,0,0,639,479)
Bah, I’ve tried reducing the bottom left coordinates by one, and it actually
doesn’t draw the bottom-most left pixel in DirectX. Is this using the GDI
driver or DirectX?
It is in DirectX full screen.
Have you been able to see the same bug on your computer?
No, though I don’t have access to Win98SE.
It may be a bug in earlier versions of DirectX, where the corner pixel was
not being drawn, and now it is. I was really surprised to find that the
corner pixel was not being drawn, as the docs indicate that the rectangle
should be specified as (x,y) (x+w-1,y+h-1) but the rectangle necessary to
actually update the entire rectangle was (x,y), (x+w,y+h).
Try making that change in SDL_dx5video.c in UpdateRects, and let me know
if that works for all images.
See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
Ooops! I’m really really sorry…
I’ve found that there was another bug on MY program!
I was calling a procedure called UpdateArea (top,left,right,bottom)
like this:
void Screen::UpdateArea (int top, int left, int right, int bottom)
{
SDL_UpdateRect (Page, top, left, right-left+1, bottom-top+1);
}
So, by calling UpdateArea (0,0,0,0) I was calling SDL_UpdateRect (0,0,1,1),
and by calling UpdateArea (0,0,639,479) I was calling SDL_UpdateRect (0,0,640,480)
Now I don’t understand why the program has worked before this change!
Ooops! I’m really really sorry…
I’ve found that there was another bug on MY program!
I was calling a procedure called UpdateArea (top,left,right,bottom)
like this:
void Screen::UpdateArea (int top, int left, int right, int bottom)
{
SDL_UpdateRect (Page, top, left, right-left+1, bottom-top+1);
}
So, by calling UpdateArea (0,0,0,0) I was calling SDL_UpdateRect
(0,0,1,1),
and by calling UpdateArea (0,0,639,479) I was calling SDL_UpdateRect
(0,0,640,480)
That’s correct, isn’t it? SDL_UpdateRect(0, 0, 640, 480) should update the
whole screen in 640x480 mode.–
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor