/* functions from SGE library */
inline void sge_Line(SDL_Surface *, Sint16, Sint16, Sint16, Sint16, Uint32);
-#ifdef PLATFORM_WIN32
+/* #ifdef PLATFORM_WIN32 */
#define FULLSCREEN_BUG
-#endif
+/* #endif */
/* stuff needed to work around SDL/Windows fullscreen drawing bug */
static int fullscreen_width;
inline void SDLPutPixel(Bitmap *dst_bitmap, int x, int y, Pixel pixel)
{
+#ifdef FULLSCREEN_BUG
+ if (dst_bitmap == backbuffer || dst_bitmap == window)
+ {
+ x += video_xoffset;
+ y += video_yoffset;
+ }
+#endif
+
sge_PutPixel(dst_bitmap->surface, x, y, pixel);
}
}
else if (event->type == EVENT_MOTIONNOTIFY)
{
- if (((ButtonEvent *)event)->x > video_xoffset)
- ((ButtonEvent *)event)->x -= video_xoffset;
+ if (((MotionEvent *)event)->x > video_xoffset)
+ ((MotionEvent *)event)->x -= video_xoffset;
else
- ((ButtonEvent *)event)->x = 0;
- if (((ButtonEvent *)event)->y > video_yoffset)
- ((ButtonEvent *)event)->y -= video_yoffset;
+ ((MotionEvent *)event)->x = 0;
+ if (((MotionEvent *)event)->y > video_yoffset)
+ ((MotionEvent *)event)->y -= video_yoffset;
else
- ((ButtonEvent *)event)->y = 0;
+ ((MotionEvent *)event)->y = 0;
}
#endif
}