diff --git a/stepmania/src/archutils/Darwin/SMMainThread.h b/stepmania/src/archutils/Darwin/SMMainThread.h index 0e2209dd02..543f814c64 100644 --- a/stepmania/src/archutils/Darwin/SMMainThread.h +++ b/stepmania/src/archutils/Darwin/SMMainThread.h @@ -9,6 +9,7 @@ - (void) dealloc; - (void) addAction:(SEL)sel withTarget:(id)target; - (void) addAction:(SEL)sel withTarget:(id)target andObject:(id)object; +- (void) addAction:(SEL)sel withTarget:(id)target andBool:(BOOL)b; // You must pass pointers to the objects to this method. - (void) addAction:(SEL)sel withTarget:(id)target andNumObjects:(int)num, ...; - (void) performOnMainThread; @@ -16,6 +17,9 @@ #define ADD_ACTION0(mt, t, s) [mt addAction:@selector(s) withTarget:(t)] #define ADD_ACTION1(mt, t, s, o) [mt addAction:@selector(s) withTarget:(t) andObject:(o)] +#define ADD_ACTIONb(mt, t, s, b) [mt addAction:@selector(s) withTarget:(t) andBool:(b)] +#define ADD_ACTIONn(mt, t, s, n, ...) \ +[mt addAction:@selector(s) withTarget:(t) andNumObjects:(n), ## __VA_ARGS__] /* * (c) 2006 Steve Checkoway diff --git a/stepmania/src/archutils/Darwin/SMMainThread.m b/stepmania/src/archutils/Darwin/SMMainThread.m index 7da7054238..aa4282cebf 100644 --- a/stepmania/src/archutils/Darwin/SMMainThread.m +++ b/stepmania/src/archutils/Darwin/SMMainThread.m @@ -36,6 +36,11 @@ [self addAction:sel withTarget:target andNumObjects:1, &object]; } +- (void) addAction:(SEL)sel withTarget:(id)target andBool:(BOOL)b +{ + [self addAction:sel withTarget:target andNumObjects:1, &b]; +} + - (void) addAction:(SEL)sel withTarget:(id)target andNumObjects:(int)num, ... { NSMethodSignature *sig = [target methodSignatureForSelector:sel];