From 0ef7d52448d972c13e203407f4f63c153f51f2d9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 25 Dec 2002 12:53:47 +0000 Subject: fixed mouse cursor code to cope with CMI svn-id: r6125 --- backends/sdl/sdl-common.cpp | 3 +++ backends/sdl/sdl-common.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'backends/sdl') diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp index 464f569f17..d4d31148fb 100644 --- a/backends/sdl/sdl-common.cpp +++ b/backends/sdl/sdl-common.cpp @@ -400,6 +400,9 @@ void OSystem_SDL_Common::set_mouse_pos(int x, int y) { } void OSystem_SDL_Common::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { + + assert(0 < w && w <= MAX_MOUSE_W); + assert(0 < h && h <= MAX_MOUSE_H); _mouseCurState.w = w; _mouseCurState.h = h; diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h index ad168e2572..05a7d9e9b0 100644 --- a/backends/sdl/sdl-common.h +++ b/backends/sdl/sdl-common.h @@ -151,8 +151,8 @@ protected: enum { NUM_DIRTY_RECT = 100, - MAX_MOUSE_W = 40, - MAX_MOUSE_H = 40, + MAX_MOUSE_W = 80, + MAX_MOUSE_H = 80, MAX_SCALING = 3 }; -- cgit v1.2.3