From 8dd727fc0192b445ca82ec112d2138aa7ffaa082 Mon Sep 17 00:00:00 2001 From: rogerman Date: Sat, 8 Dec 2012 01:18:13 +0000 Subject: [PATCH] Cocoa Port: - Remove some test code that accidentally snuck into r4423. --- .../src/cocoa/userinterface/displayView.mm | 29 ++----------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/desmume/src/cocoa/userinterface/displayView.mm b/desmume/src/cocoa/userinterface/displayView.mm index e2a6515c6..86cb9b696 100644 --- a/desmume/src/cocoa/userinterface/displayView.mm +++ b/desmume/src/cocoa/userinterface/displayView.mm @@ -78,7 +78,6 @@ CGLContextObj OSXOpenGLRendererContext = NULL; spinlockDisplayOrder = OS_SPINLOCK_INIT; normalSize = NSMakeSize(GPU_DISPLAY_WIDTH, GPU_DISPLAY_HEIGHT * 2.0); - comboScreenGap = (normalSize.height/2.0) * DS_DISPLAY_VERTICAL_GAP_TO_HEIGHT_RATIO; sendPortDisplay = nil; cdsController = nil; isHudEnabled = NO; @@ -136,28 +135,6 @@ CGLContextObj OSXOpenGLRendererContext = NULL; return theSize; } -- (NSSize) normalSizeWithGap -{ - OSSpinLockLock(&spinlockNormalSize); - NSSize theSize = normalSize; - OSSpinLockUnlock(&spinlockNormalSize); - - NSInteger theType = [self displayType]; - if (theType == DS_DISPLAY_TYPE_COMBO) - { - if ([self displayOrientation] == DS_DISPLAY_ORIENTATION_VERTICAL) - { - theSize.height += (theSize.height/2.0) * DS_DISPLAY_VERTICAL_GAP_TO_HEIGHT_RATIO; - } - else - { - theSize.width += (theSize.width/2.0) * DS_DISPLAY_VERTICAL_GAP_TO_HEIGHT_RATIO; - } - } - - return theSize; -} - - (void) setGpuStateFlags:(UInt32)flags { OSSpinLockLock(&spinlockGpuStateFlags); @@ -436,7 +413,7 @@ CGLContextObj OSXOpenGLRendererContext = NULL; viewAngle = CLOCKWISE_DEGREES(viewAngle); } - NSPoint touchLoc = GetNormalPointFromTransformedPoint(clickLoc, [self normalSizeWithGap], [[self view] bounds].size, [self scale], viewAngle); + NSPoint touchLoc = GetNormalPointFromTransformedPoint(clickLoc, [self normalSize], [[self view] bounds].size, [self scale], viewAngle); // Normalize the touch location to the DS. if ([self displayType] == DS_DISPLAY_TYPE_COMBO) @@ -446,11 +423,11 @@ CGLContextObj OSXOpenGLRendererContext = NULL; if (theOrientation == DS_DISPLAY_ORIENTATION_VERTICAL && theOrder == DS_DISPLAY_ORDER_TOUCH_FIRST) { - touchLoc.y -= GPU_DISPLAY_HEIGHT /* + transformedGap */; + touchLoc.y -= GPU_DISPLAY_HEIGHT; } else if (theOrientation == DS_DISPLAY_ORIENTATION_HORIZONTAL && theOrder == DS_DISPLAY_ORDER_MAIN_FIRST) { - touchLoc.x -= GPU_DISPLAY_WIDTH /* + transformedGap */; + touchLoc.x -= GPU_DISPLAY_WIDTH; } }