(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)
This commit is contained in:
darkvater
2004-09-23 21:14:20 +00:00
parent d72abf6c3e
commit f3758d133a
4 changed files with 45 additions and 35 deletions

6
gfx.c
View File

@@ -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) {