mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-24 10:32:32 +00:00
Revert of 9f58eb96dc
. Causes issues
with mouse coordinates under Sierra.
This commit is contained in:
parent
e07640979e
commit
5256a8e6f1
@ -31,6 +31,7 @@
|
|||||||
* - Ctr-Tab for suspend/resume but how? SDL does not support that for non-Linux
|
* - Ctr-Tab for suspend/resume but how? SDL does not support that for non-Linux
|
||||||
* - Ctrl-Fn doesn't generate SDL_KEYDOWN events (SDL bug?)
|
* - Ctrl-Fn doesn't generate SDL_KEYDOWN events (SDL bug?)
|
||||||
* - Mouse acceleration, there is no API in SDL yet for that
|
* - Mouse acceleration, there is no API in SDL yet for that
|
||||||
|
* - Force relative mode in Grab mode even if SDL provides absolute coordinates?
|
||||||
* - Gamma tables support is likely to be broken here
|
* - Gamma tables support is likely to be broken here
|
||||||
* - Events processing is bound to the general emulation thread as SDL requires
|
* - Events processing is bound to the general emulation thread as SDL requires
|
||||||
* to PumpEvents() within the same thread as the one that called SetVideoMode().
|
* to PumpEvents() within the same thread as the one that called SetVideoMode().
|
||||||
@ -692,7 +693,7 @@ void driver_base::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void driver_base::adapt_to_video_mode() {
|
void driver_base::adapt_to_video_mode() {
|
||||||
ADBSetRelMouseMode(mouse_grabbed);
|
ADBSetRelMouseMode(false);
|
||||||
|
|
||||||
// Init blitting routines
|
// Init blitting routines
|
||||||
SDL_PixelFormat *f = s->format;
|
SDL_PixelFormat *f = s->format;
|
||||||
@ -726,7 +727,7 @@ void driver_base::adapt_to_video_mode() {
|
|||||||
SDL_ShowCursor(hardware_cursor);
|
SDL_ShowCursor(hardware_cursor);
|
||||||
|
|
||||||
// Set window name/class
|
// Set window name/class
|
||||||
set_window_name(mouse_grabbed ? STR_WINDOW_TITLE_GRABBED : STR_WINDOW_TITLE);
|
set_window_name(STR_WINDOW_TITLE);
|
||||||
|
|
||||||
// Everything went well
|
// Everything went well
|
||||||
init_ok = true;
|
init_ok = true;
|
||||||
@ -806,7 +807,7 @@ void driver_base::grab_mouse(void)
|
|||||||
if (new_mode == SDL_GRAB_ON) {
|
if (new_mode == SDL_GRAB_ON) {
|
||||||
set_window_name(STR_WINDOW_TITLE_GRABBED);
|
set_window_name(STR_WINDOW_TITLE_GRABBED);
|
||||||
disable_mouse_accel();
|
disable_mouse_accel();
|
||||||
ADBSetRelMouseMode(mouse_grabbed = true);
|
mouse_grabbed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -819,7 +820,7 @@ void driver_base::ungrab_mouse(void)
|
|||||||
if (new_mode == SDL_GRAB_OFF) {
|
if (new_mode == SDL_GRAB_OFF) {
|
||||||
set_window_name(STR_WINDOW_TITLE);
|
set_window_name(STR_WINDOW_TITLE);
|
||||||
restore_mouse_accel();
|
restore_mouse_accel();
|
||||||
ADBSetRelMouseMode(mouse_grabbed = false);
|
mouse_grabbed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1751,11 +1752,7 @@ static void handle_events(void)
|
|||||||
|
|
||||||
// Mouse moved
|
// Mouse moved
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
if (mouse_grabbed) {
|
|
||||||
drv->mouse_moved(event.motion.xrel, event.motion.yrel);
|
|
||||||
} else {
|
|
||||||
drv->mouse_moved(event.motion.x, event.motion.y);
|
drv->mouse_moved(event.motion.x, event.motion.y);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Keyboard
|
// Keyboard
|
||||||
|
Loading…
Reference in New Issue
Block a user