Allow mouse capture on internal mice even if mouse_type is not actually set to MOUSE_TYPE_INTERNAL, fixes #2682.
This commit is contained in:
@@ -335,6 +335,7 @@ extern int machine_get_max_ram(int m);
|
||||
extern int machine_get_ram_granularity(int m);
|
||||
extern int machine_get_type(int m);
|
||||
extern void machine_close(void);
|
||||
extern int machine_has_mouse(void);
|
||||
|
||||
extern uint8_t machine_get_p1(void);
|
||||
extern void machine_load_p1(int m);
|
||||
|
@@ -11990,3 +11990,9 @@ machine_get_machine_from_internal_name(char *s)
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int
|
||||
machine_has_mouse(void)
|
||||
{
|
||||
return(machines[machine].flags & MACHINE_MOUSE);
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ void plat_setfullscreen(int on) {
|
||||
}
|
||||
|
||||
void plat_mouse_capture(int on) {
|
||||
if (!kbd_req_capture && (mouse_type == MOUSE_TYPE_NONE))
|
||||
if (!kbd_req_capture && (mouse_type == MOUSE_TYPE_NONE) && !machine_has_mouse())
|
||||
return;
|
||||
|
||||
main_window->setMouseCapture(on > 0 ? true : false);
|
||||
|
@@ -1549,7 +1549,7 @@ plat_mouse_capture(int on)
|
||||
{
|
||||
RECT rect;
|
||||
|
||||
if (!kbd_req_capture && (mouse_type == MOUSE_TYPE_NONE))
|
||||
if (!kbd_req_capture && (mouse_type == MOUSE_TYPE_NONE) && !machine_has_mouse())
|
||||
return;
|
||||
|
||||
if (on && !mouse_capture) {
|
||||
|
Reference in New Issue
Block a user