Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
bugfix: allows haptic engine to run in background
Browse files Browse the repository at this point in the history
Signed-off-by: 82Flex <[email protected]>
  • Loading branch information
Lessica committed Feb 20, 2024
1 parent 37b63a7 commit e775a6e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARCHS := arm64 # arm64e
TARGET := iphone:clang:latest:14.0
TARGET := iphone:clang:15.5:14.0
INSTALL_TARGET_PROCESSES := TrollSpeed
ENT_PLIST := $(PWD)/supports/entitlements.plist
LAUNCHD_PLIST := $(PWD)/layout/Library/LaunchDaemons/ch.xxtou.hudapp.plist
Expand Down
2 changes: 1 addition & 1 deletion gen-control.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Depends: firmware (>= 14.0), mobilesubstrate (>= 0.9.7000)
Architecture: iphoneos-arm
Author: Lessica <[email protected]>
Maintainer: Lessica <[email protected]>
Description: Troll speed, but jailbroken.
Description: Troll your speed, but jailbroken.
__EOF__

# Set permissions
Expand Down
25 changes: 0 additions & 25 deletions sources/HUDMainApplication.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@
#import "HUDMainApplication.h"
#import "UIApplication+Private.h"

static void DumpThreads(void)
{
char name[256];
mach_msg_type_number_t count;
thread_act_array_t list;
task_threads(mach_task_self(), &list, &count);
for (int i = 0; i < count; ++i)
{
pthread_t pt = pthread_from_mach_thread_np(list[i]);
if (pt)
{
name[0] = '\0';
__unused int rc = pthread_getname_np(pt, name, sizeof name);
log_debug(OS_LOG_DEFAULT, "mach thread %u: getname returned %d: %{public}s", list[i], rc, name);
}
else
{
log_debug(OS_LOG_DEFAULT, "mach thread %u: no pthread found", list[i]);
}
}
}

@implementation HUDMainApplication

- (instancetype)init
Expand Down Expand Up @@ -150,9 +128,6 @@ - (instancetype)init
{
/* Tested on iOS 15.1.1 and below */
[fetcher setValue:dispatcher forKey:@"eventFetcherSink"];

/* Print NSThread names */
DumpThreads();
}

[self setValue:fetcher forKey:@"eventFetcher"];
Expand Down
2 changes: 2 additions & 0 deletions supports/entitlements.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<true/>
<key>com.apple.backboard.client</key>
<true/>
<key>com.apple.private.allow-background-haptics</key>
<true/>
<key>com.apple.private.hid.client.event-dispatch</key>
<true/>
<key>com.apple.private.hid.client.event-filter</key>
Expand Down

0 comments on commit e775a6e

Please sign in to comment.