ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/SDL/video_sdl.cpp
(Generate patch)

Comparing BasiliskII/src/SDL/video_sdl.cpp (file contents):
Revision 1.26 by gbeauche, 2006-05-13T16:58:44Z vs.
Revision 1.29 by gbeauche, 2006-05-14T14:11:46Z

# Line 27 | Line 27
27   *      Ctrl-F5 = grab mouse (in windowed mode)
28   *
29   *  FIXMEs and TODOs:
30 + *  - Windows requires an extra mouse event to update the actual cursor image?
31   *  - Ctr-Tab for suspend/resume but how? SDL does not support that for non-Linux
32   *  - Ctrl-Fn doesn't generate SDL_KEYDOWN events (SDL bug?)
33   *  - Mouse acceleration, there is no API in SDL yet for that
34   *  - Force relative mode in Grab mode even if SDL provides absolute coordinates?
34 *  - Fullscreen mode
35   *  - Gamma tables support is likely to be broken here
36   *  - Events processing is bound to the general emulation thread as SDL requires
37   *    to PumpEvents() within the same thread as the one that called SetVideoMode().
38   *    Besides, there can't seem to be a way to call SetVideoMode() from a child thread.
39 *  - Refresh performance is still slow. Use SDL_CreateRGBSurface()?
39   *  - Backport hw cursor acceleration to Basilisk II?
40   *  - Factor out code
41   */
# Line 49 | Line 48
48   #include <errno.h>
49   #include <vector>
50  
51 + #ifdef WIN32
52 + #include <malloc.h> /* alloca() */
53 + #endif
54 +
55   #include "cpu_emulation.h"
56   #include "main.h"
57   #include "adb.h"
# Line 2186 | Line 2189 | static inline void do_video_refresh(void
2189                  LOCK_EVENTS;
2190                  SDL_FreeCursor(sdl_cursor);
2191                  sdl_cursor = SDL_CreateCursor(MacCursor + 4, MacCursor + 36, 16, 16, MacCursor[2], MacCursor[3]);
2192 <                if (sdl_cursor)
2192 >                if (sdl_cursor) {
2193                          SDL_SetCursor(sdl_cursor);
2194 + #ifdef WIN32
2195 +                        // XXX Windows apparently needs an extra mouse event to
2196 +                        // make the new cursor image visible
2197 +                        int visible = SDL_ShowCursor(-1);
2198 +                        if (visible) {
2199 +                                int x, y;
2200 +                                SDL_GetMouseState(&x, &y);
2201 +                                SDL_WarpMouse(x, y);
2202 +                        }
2203 + #endif
2204 +                }
2205                  UNLOCK_EVENTS;
2206          }
2207   #endif
# Line 2262 | Line 2276 | void video_set_dirty_area(int x, int y,
2276  
2277   #ifdef ENABLE_VOSF
2278          if (use_vosf) {
2279 <                vosf_set_dirty_area(x, y, w, h, screen_width, bytes_per_row);
2279 >                vosf_set_dirty_area(x, y, w, h, screen_width, screen_height, bytes_per_row);
2280                  return;
2281          }
2282   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines