Closed r58Playz closed 3 months ago
Also note for touch support:
I tried using the GCVirtualController API and initializing it with a DllImport
'd C function, but the controller only shows up for less than a second. This hook works well, but I still have to integrate it into the code without making it a hook.
#import <Foundation/Foundation.h>
#import <GameController/GameController.h>
#import <CoreGraphics/CoreGraphics.h>
GCVirtualController *CONTROLLER = NULL;
%hook SDL_uikitmetalview
-(id)initWithFrame:(CGRect)frame scale:(CGFloat)scale {
id orig = %orig;
if ([GCController controllers].count == 0 && ![GCKeyboard coalescedKeyboard]) {
if (!CONTROLLER) {
GCVirtualControllerConfiguration *configuration = [GCVirtualControllerConfiguration new];
configuration.elements = [NSSet setWithArray:@[
GCInputButtonA,
GCInputButtonB,
GCInputButtonX,
GCInputButtonY,
GCInputRightTrigger,
GCInputLeftTrigger,
GCInputRightShoulder,
GCInputLeftShoulder,
GCInputDirectionPad,
GCInputButtonMenu
]];
CONTROLLER = [GCVirtualController virtualControllerWithConfiguration:configuration];
}
[CONTROLLER connectWithReplyHandler:NULL];
}
return orig;
}
%end
i mean, i suppose a hook would be fine. i just feel there's a way to do this without depending on substrate.
i just feel there's a way to do this without depending on substrate.
I've added an SDL2 patch that initializes GCVirtualController
and a prompt to apply it in the build script.
i'll look into this once i'm home again, thanks you!
also, before I merge this: is it fine by you if I license this repo under a permissive license first (to avoid any sort of legal trouble) - i'm thinking of MIT or GPLv3 @r58Playz
also, before I merge this: is it fine by you if I license this repo under a permissive license first (to avoid any sort of legal trouble) - i'm thinking of MIT or GPLv3
That's fine.
hi @r58Playz, i licensed this project under MIT - if you agree to have your changes under this license, can you rebase your commits?
thank you so much !!
This fixes disabling code signing on the latest visual studio for mac. Combined with the fnalibs-ios-builder-celeste PR, builds should now work on latest macos/xcode/visual studio for mac.