c-module ready

This commit is contained in:
TrueZhuanjia committed 2025-07-04 21:00:04 +08:00
1 parent 29700e6f18
commit 6a9891adee
4 files changed
+6 -11

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[submodule "moonlight-common/moonlight-common-c"] [submodule "moonlight-common/moonlight-common-c"]
path = moonlight-common/moonlight-common-c path = moonlight-common/moonlight-common-c
url=https://github.com/TrueZhuangJia/voidlink-common-c.git url=https://github.com/TrueZhuangJia/voidlink-c.git
[submodule "X1Kit"] [submodule "X1Kit"]
path = X1Kit path = X1Kit
url = https://github.com/cgutman/X1Kit.git url = https://github.com/cgutman/X1Kit.git
@@ -330,9 +330,8 @@ static CGRect streamViewBounds;
// save on-screen game controller buttons & sticks as buttonstate: // save on-screen game controller buttons & sticks as buttonstate:
for (CALayer *oscButtonLayer in oscButtonLayers) { for (CALayer *oscButtonLayer in oscButtonLayers) {
oscButtonLayer.position = [self normalizeWidgetPosition:oscButtonLayer.position]; CGPoint normalizedPosition = [self normalizeWidgetPosition:oscButtonLayer.position];
OnScreenButtonState *buttonState = [[OnScreenButtonState alloc] initWithButtonName:oscButtonLayer.name buttonType:LegacyOscButton andPosition:oscButtonLayer.position]; OnScreenButtonState *buttonState = [[OnScreenButtonState alloc] initWithButtonName:oscButtonLayer.name buttonType:LegacyOscButton andPosition:normalizedPosition];
oscButtonLayer.position = [self denormalizeWidgetPosition:oscButtonLayer.position];
// add hidden attr here // add hidden attr here
buttonState.isHidden = oscButtonLayer.isHidden; buttonState.isHidden = oscButtonLayer.isHidden;
buttonState.oscLayerSizeFactor = [OnScreenControls getControllerLayerSizeFactor:oscButtonLayer]; buttonState.oscLayerSizeFactor = [OnScreenControls getControllerLayerSizeFactor:oscButtonLayer];
@@ -356,10 +355,8 @@ static CGRect streamViewBounds;
// save on-screen widget views (keyboard & mouse command) as buttonstate: // save on-screen widget views (keyboard & mouse command) as buttonstate:
for(OnScreenWidgetView* widgetView in OnScreenWidgetViews){ for(OnScreenWidgetView* widgetView in OnScreenWidgetViews){
CGPoint normalizedPosition = [self normalizeWidgetPosition:widgetView.center];
widgetView.center = [self normalizeWidgetPosition:widgetView.center]; OnScreenButtonState *buttonState = [[OnScreenButtonState alloc] initWithButtonName:widgetView.cmdString buttonType:CustomOnScreenWidget andPosition:normalizedPosition];
OnScreenButtonState *buttonState = [[OnScreenButtonState alloc] initWithButtonName:widgetView.buttonLabel buttonType:CustomOnScreenWidget andPosition:widgetView.center];
widgetView.center = [self denormalizeWidgetPosition:widgetView.center];
buttonState.alias = widgetView.buttonLabel; buttonState.alias = widgetView.buttonLabel;
buttonState.widthFactor = widgetView.widthFactor; buttonState.widthFactor = widgetView.widthFactor;
buttonState.heightFactor = widgetView.heightFactor; buttonState.heightFactor = widgetView.heightFactor;
@@ -203,7 +203,6 @@ const double NAV_BAR_HEIGHT = 50;
[self presentViewController:picker animated:YES completion:nil]; [self presentViewController:picker animated:YES completion:nil];
} }
- (IBAction) importDataTapped:(id)sender { - (IBAction) importDataTapped:(id)sender {
self.currentFileOperation = Import; self.currentFileOperation = Import;
// 2. 创建文件选择器 // 2. 创建文件选择器
@@ -251,7 +250,6 @@ didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
} }
} }
- (void)fileToProfiles:(NSURL* )sourceURL{ - (void)fileToProfiles:(NSURL* )sourceURL{
bool restoreFailed = false; bool restoreFailed = false;
if (![sourceURL startAccessingSecurityScopedResource]) { if (![sourceURL startAccessingSecurityScopedResource]) {