keyboard button profile test

This commit is contained in:
True Zhuanjia committed 2024-08-11 21:55:29 +08:00
1 parent d90bf747fc
commit 6065b4f742
14 files changed
+277 -65

No files matched your search

+2 -1
View File
@@ -272,7 +272,8 @@ static float L3_Y;
NSLog(@"_activeCustomOscButtonPositionDict update: STARTOVER");
for (NSData *buttonStateEncoded in oscProfile.buttonStates) {
OnScreenButtonState *buttonState = [NSKeyedUnarchiver unarchivedObjectOfClass:[OnScreenButtonState class] fromData:buttonStateEncoded error:nil];
if(!buttonState.isHidden && [validPositionButtonNames containsObject:buttonState.name] ){
if(!buttonState.isHidden && [validPositionButtonNames containsObject:buttonState.name] && (buttonState.buttonType == GameControllerButton || [profilesManager getIndexOfSelectedProfile] == 0 ) ){
[_activeCustomOscButtonPositionDict setObject:[NSValue valueWithCGPoint:buttonState.position] forKey:buttonState.name]; // we got a buttonname -> position dict here
NSLog(@"_activeCustomOscButtonPositionDict update, button name:%@, position: %f, %f", buttonState.name, buttonState.position.x, buttonState.position.y);
}