summaryrefslogtreecommitdiff
path: root/gfx.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-23 21:14:20 +0000
committerdarkvater <darkvater@openttd.org>2004-09-23 21:14:20 +0000
commitf3758d133a2a0330cdaee175383807bac0ad0249 (patch)
treeaa2a36ed9fc21776897ac8ece0176964b2798d57 /gfx.c
parentd72abf6c3ed68fe8e410f29458211aa04521c4ab (diff)
downloadopenttd-f3758d133a2a0330cdaee175383807bac0ad0249.tar.xz
(svn r312) -Fix: [926105] ctrl + d bug. Longest outstanding bug has been fixed \o/ 2004-03-30 (Tron)
-Fix: [1030393] some screensizes crashes OTTD. Fix in general bug that only allows resolutions which were multiple of 8 in width and height. Also use closest possible resolution in fullscreen if window size is not a valid resolution (Tron)
Diffstat (limited to 'gfx.c')
-rw-r--r--gfx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx.c b/gfx.c
index bbd760f51..4a877328f 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1660,7 +1660,7 @@ void DrawMouseCursor()
memcpy_pitch(
_cursor_backup,
_screen.dst_ptr + _cursor.draw_pos.x + _cursor.draw_pos.y * _screen.pitch,
- _cursor.draw_size.x, _cursor.draw_size.y, _screen.width, _cursor.draw_size.x);
+ _cursor.draw_size.x, _cursor.draw_size.y, _screen.pitch, _cursor.draw_size.x);
// Draw cursor on screen
_cur_dpi = &_screen;
@@ -1711,8 +1711,8 @@ void DrawDirtyBlocks()
{
byte *b = _dirty_blocks;
int x=0,y=0;
- int w = (_screen.width + 63) & ~63;
- int h = _screen.height;
+ const int w = (_screen.width + 63) & ~63;
+ const int h = (_screen.height + 7) & ~7;
do {
if (*b != 0) {