mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 17:29:19 +00:00
Simplified (and sped up) mouse movement processing when in fullscreen mode.
This commit is contained in:
parent
ef73063528
commit
7726ef1b05
@ -193,6 +193,7 @@
|
|||||||
type: (NSEventType)type
|
type: (NSEventType)type
|
||||||
{
|
{
|
||||||
EmulatorView *view;
|
EmulatorView *view;
|
||||||
|
BOOL fullScreen;
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIPLE
|
#ifdef ENABLE_MULTIPLE
|
||||||
// We need to work out what window's Emulator should receive these messages
|
// We need to work out what window's Emulator should receive these messages
|
||||||
@ -204,21 +205,23 @@
|
|||||||
{
|
{
|
||||||
theEmulator = [emulators objectAtIndex: tmp];
|
theEmulator = [emulators objectAtIndex: tmp];
|
||||||
view = [theEmulator screen];
|
view = [theEmulator screen];
|
||||||
|
fullScreen = [view isFullScreen];
|
||||||
|
|
||||||
if ( [theEmulator isRunning] &&
|
if ( [theEmulator isRunning] &&
|
||||||
( [[theEmulator window] isMainWindow] || [view isFullScreen] ) )
|
( fullScreen || [[theEmulator window] isMainWindow] ) )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( tmp < [emulators count] ) // i.e. if we exited the for loop
|
if ( tmp < [emulators count] ) // i.e. if we exited the for loop
|
||||||
#else
|
#else
|
||||||
view = [theEmulator screen];
|
view = [theEmulator screen];
|
||||||
|
fullScreen = [view isFullScreen];
|
||||||
|
|
||||||
if ( [theEmulator isRunning] &&
|
if ( [theEmulator isRunning] &&
|
||||||
( [[theEmulator window] isMainWindow] || [view isFullScreen] ) )
|
( fullScreen || [[theEmulator window] isMainWindow] ) )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if ( [view mouseInView: event] )
|
if ( fullScreen || [view mouseInView: event] )
|
||||||
{
|
{
|
||||||
switch ( type )
|
switch ( type )
|
||||||
{
|
{
|
||||||
@ -230,7 +233,10 @@
|
|||||||
break;
|
break;
|
||||||
case NSLeftMouseDragged:
|
case NSLeftMouseDragged:
|
||||||
case NSMouseMoved:
|
case NSMouseMoved:
|
||||||
[view processMouseMove: event];
|
if ( fullScreen )
|
||||||
|
[view fullscreenMouseMove];
|
||||||
|
else
|
||||||
|
[view processMouseMove: event];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
[super sendEvent: event]; // NSApplication default
|
[super sendEvent: event]; // NSApplication default
|
||||||
|
Loading…
Reference in New Issue
Block a user