Removal of old code trying to detect trackpads.
This was causing error in previous commit "wheel only worked after using trackpad once".
This commit is contained in:
@@ -574,13 +574,7 @@ GHOST_SystemCocoa::GHOST_SystemCocoa()
|
||||
rstring = (char*)malloc( len );
|
||||
sysctl( mib, 2, rstring, &len, NULL, 0 );
|
||||
|
||||
//Hack on MacBook revision, as multitouch avail. function missing
|
||||
//MacbookAir or MacBook version >= 5 (retina is MacBookPro10,1)
|
||||
if (strstr(rstring,"MacBookAir") ||
|
||||
(strstr(rstring,"MacBook") && (rstring[strlen(rstring)-3]>='5') && (rstring[strlen(rstring)-3]<='9')) ||
|
||||
(strstr(rstring,"MacBook") && (rstring[strlen(rstring)-4]>='1') && (rstring[strlen(rstring)-4]<='9')))
|
||||
m_hasMultiTouchTrackpad = true;
|
||||
else m_hasMultiTouchTrackpad = false;
|
||||
m_hasMultiTouchTrackpad = false;
|
||||
|
||||
free( rstring );
|
||||
rstring = NULL;
|
||||
@@ -1576,6 +1570,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* these events only happen on swiping trackpads */
|
||||
case NSEventTypeBeginGesture:
|
||||
m_hasMultiTouchTrackpad = 1;
|
||||
break;
|
||||
@@ -1587,7 +1583,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
{
|
||||
int momentum = [event momentumPhase];
|
||||
|
||||
/* standard scrollwheel case */
|
||||
/* standard scrollwheel case, if no swiping happened, and no momentum (kinetic scroll) works */
|
||||
if (!m_hasMultiTouchTrackpad && momentum == 0) {
|
||||
GHOST_TInt32 delta;
|
||||
|
||||
|
||||
@@ -1016,12 +1016,12 @@ static void icon_preview_endjob(void *customdata)
|
||||
|
||||
if (GS(ip->id->name) == ID_BR)
|
||||
WM_main_add_notifier(NC_BRUSH | NA_EDITED, ip->id);
|
||||
|
||||
#if 0
|
||||
if (GS(ip->id->name) == ID_MA) {
|
||||
Material *ma = (Material *)ip->id;
|
||||
PreviewImage *prv_img = ma->preview;
|
||||
int i;
|
||||
|
||||
|
||||
/* signal to gpu texture */
|
||||
for (i = 0; i < NUM_ICON_SIZES; ++i) {
|
||||
if (prv_img->gputexture[i]) {
|
||||
@@ -1031,6 +1031,7 @@ static void icon_preview_endjob(void *customdata)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user