Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGcGamer committed Nov 29, 2022
0 parents commit 3a168b7
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dragon
packages
28 changes: 28 additions & 0 deletions DragonMake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: LaunchPad
id: com.mrgcgamer.launchpad
depends: mobilesubstrate
architecture: iphoneos-arm
version: 0.0.1
description: To Infinity, And Beyond!
author: MrGcGamer
section: Tweaks

all:
targetvers: 15.0
optim: "3"
cflags: "-flto"

LaunchPad:
type: tweak
frameworks:
- Foundation
filter:
executables:
- SpringBoard
files:
- LaunchPad.mm

Strip:
type: stage
stage:
- tweakStrip.sh
46 changes: 46 additions & 0 deletions LaunchPad.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#import <objc/runtime.h>
#import <substrate.h>
@import Foundation;

@class SBFloatingDockController;
static BOOL hook_isFloatingDockSupported(Class self, SEL _cmd) {
return YES;
}

@class SBFloatingDockDefaults;
static BOOL hook_appLibraryEnabled(SBFloatingDockDefaults *self, SEL _cmd) {
return YES;
}
static void (* orig_setAppLibraryEnabled) (SBFloatingDockDefaults *self, SEL _cmd, BOOL enabled);
static void hook_setAppLibraryEnabled(SBFloatingDockDefaults *self, SEL _cmd, BOOL enabled) {
orig_setAppLibraryEnabled(self, _cmd, YES);
}

static BOOL hook_recentsEnabled(SBFloatingDockDefaults *self, SEL _cmd) {
return NO;
}
static void (* orig_setRecentsEnabled) (SBFloatingDockDefaults *self, SEL _cmd, BOOL enabled);
static void hook_setRecentsEnabled(SBFloatingDockDefaults *self, SEL _cmd, BOOL enabled) {
orig_setRecentsEnabled(self, _cmd, NO);
}

@class SBDeckSwitcherModifier;
static BOOL hook_shouldConfigureInAppDockHiddenAssertion(SBFloatingDockDefaults *self, SEL _cmd) {
return YES;
}

@class SBFloatingDockBehaviorAssertion;
static BOOL hook_gesturePossible(SBFloatingDockBehaviorAssertion *self, SEL _cmd) {
return NO;
}

static void __attribute__((constructor)) ctor () {
MSHookMessageEx(object_getClass(objc_getClass("SBFloatingDockController")), @selector(isFloatingDockSupported), (IMP)&hook_isFloatingDockSupported, NULL);
id floatingDockDefaults = objc_getClass("SBFloatingDockDefaults");
MSHookMessageEx(floatingDockDefaults, @selector(appLibraryEnabled), (IMP) &hook_appLibraryEnabled, NULL);
MSHookMessageEx(floatingDockDefaults, @selector(setAppLibraryEnabled:), (IMP) &hook_setAppLibraryEnabled, (IMP *) &orig_setAppLibraryEnabled);
MSHookMessageEx(floatingDockDefaults, @selector(recentsEnabled), (IMP) &hook_recentsEnabled, NULL);
MSHookMessageEx(floatingDockDefaults, @selector(setRecentsEnabled:), (IMP) &hook_setRecentsEnabled, (IMP *) &orig_setRecentsEnabled);
MSHookMessageEx(objc_getClass("SBDeckSwitcherModifier"), @selector(shouldConfigureInAppDockHiddenAssertion), (IMP) &hook_shouldConfigureInAppDockHiddenAssertion, NULL);
MSHookMessageEx(objc_getClass("SBFloatingDockBehaviorAssertion"), @selector(gesturePossible), (IMP) &hook_gesturePossible, NULL);
}

0 comments on commit 3a168b7

Please sign in to comment.