comparison src/video/ps2gs/SDL_gsmouse.c @ 136:717f739d6ec1

Added hardware stretching code to scale 640x480 to TV resolution There's a bug of some kind in the 16bpp code. ??
author Sam Lantinga <slouken@libsdl.org>
date Wed, 01 Aug 2001 08:41:45 +0000
parents f590dd383b5d
children e8157fcb3114
comparison
equal deleted inserted replaced
135:0bfcf0d2b874 136:717f739d6ec1
77 screen = this->screen; 77 screen = this->screen;
78 saved_pixels = screen->pixels; 78 saved_pixels = screen->pixels;
79 screen->pixels = mapped_mem + screen->offset; 79 screen->pixels = mapped_mem + screen->offset;
80 screen_updated = 0; 80 screen_updated = 0;
81 if ( cursor_drawn ) { 81 if ( cursor_drawn ) {
82 SDL_EraseCursorNoLock(this->screen); 82 SDL_EraseCursorNoLock(screen);
83 cursor_drawn = 0; 83 cursor_drawn = 0;
84 screen_updated = 1; 84 screen_updated = 1;
85 } 85 }
86 86
87 /* Save the current mouse area */ 87 /* Save the current mouse area */
112 } 112 }
113 if ( (area.y+area.h) > mouse_y2 ) { 113 if ( (area.y+area.h) > mouse_y2 ) {
114 mouse_y2 = area.y+area.h; 114 mouse_y2 = area.y+area.h;
115 } 115 }
116 image = screen_image; 116 image = screen_image;
117 image.y = screen->offset / screen->pitch + mouse_y1; 117 image.y += screen->offset / screen->pitch + mouse_y1;
118 image.h = mouse_y2 - mouse_y1; 118 image.h = mouse_y2 - mouse_y1;
119 image.ptr = mapped_mem + image.y * screen->pitch; 119 image.ptr = mapped_mem +
120 (image.y - screen_image.y) * screen->pitch;
120 ioctl(console_fd, PS2IOC_LOADIMAGE, &image); 121 ioctl(console_fd, PS2IOC_LOADIMAGE, &image);
122
123 /* Need to scale offscreen image to TV output */
124 if ( image.y > 0 ) {
125 scaleimage_nonblock(console_fd,
126 tex_tags_mem, scale_tags_mem);
127 }
121 } 128 }
122 129
123 /* We're finished */ 130 /* We're finished */
124 SDL_UnlockCursor(); 131 SDL_UnlockCursor();
125 } 132 }