更新super_access.c to remove redundant macro definitions and optimize conditional compilation; use resource strings instead of hard-coded text in MoreSettings.kt; add theme color string resource in strings.xml

This commit is contained in:
ShirkNeko
2025-04-13 01:33:40 +08:00
parent 70259a5ec5
commit 06324def38
5 changed files with 5 additions and 16 deletions

View File

@@ -29,7 +29,7 @@ on:
upload_lkm: upload_lkm:
required: true required: true
type: boolean type: boolean
default: false default: true
description: "Whether to upload lkm" description: "Whether to upload lkm"
jobs: jobs:
check-build-lkm: check-build-lkm:

View File

@@ -68,18 +68,9 @@ struct DynamicStructInfo {
#include <linux/version.h> #include <linux/version.h>
#define KERNEL_VERSION_6_6 KERNEL_VERSION(6, 6, 0)
#define KERNEL_VERSION_6_1 KERNEL_VERSION(6, 1, 0) #define KERNEL_VERSION_6_1 KERNEL_VERSION(6, 1, 0)
#define KERNEL_VERSION_5_15 KERNEL_VERSION(5, 15, 0) #define KERNEL_VERSION_5_15 KERNEL_VERSION(5, 15, 0)
#define KERNEL_VERSION_5_10 KERNEL_VERSION(5, 10, 0)
#define KERNEL_VERSION_4_14 KERNEL_VERSION(4, 14, 0)
#include <../fs/mount.h> #include <../fs/mount.h>
#include <linux/mount.h> #include <linux/mount.h>
@@ -121,9 +112,6 @@ DYNAMIC_STRUCT_BEGIN(kprobe)
DEFINE_MEMBER(kprobe, post_handler) DEFINE_MEMBER(kprobe, post_handler)
#if LINUX_VERSION_CODE < KERNEL_VERSION_5_15 #if LINUX_VERSION_CODE < KERNEL_VERSION_5_15
DEFINE_MEMBER(kprobe, fault_handler) DEFINE_MEMBER(kprobe, fault_handler)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION_5_10
DEFINE_MEMBER(kprobe, break_handler)
#endif #endif
DEFINE_MEMBER(kprobe, flags) DEFINE_MEMBER(kprobe, flags)
DYNAMIC_STRUCT_END(kprobe) DYNAMIC_STRUCT_END(kprobe)
@@ -267,4 +255,3 @@ int sukisu_super_container_of(
return -1; return -1;
} }
EXPORT_SYMBOL(sukisu_super_container_of); EXPORT_SYMBOL(sukisu_super_container_of);

View File

@@ -360,7 +360,7 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
) { ) {
ListItem( ListItem(
leadingContent = { Icon(Icons.Default.Palette, null) }, leadingContent = { Icon(Icons.Default.Palette, null) },
headlineContent = { Text("主题颜色") }, headlineContent = { Text(stringResource(R.string.theme_color)) },
supportingContent = { supportingContent = {
val currentThemeName = when (ThemeConfig.currentTheme) { val currentThemeName = when (ThemeConfig.currentTheme) {
is ThemeColors.Default -> stringResource(R.string.color_default) is ThemeColors.Default -> stringResource(R.string.color_default)

View File

@@ -258,4 +258,5 @@
<string name="confirm_uninstall_title">确认卸载</string> <string name="confirm_uninstall_title">确认卸载</string>
<string name="confirm_uninstall_confirm">删除</string> <string name="confirm_uninstall_confirm">删除</string>
<string name="confirm_uninstall_dismiss">取消</string> <string name="confirm_uninstall_dismiss">取消</string>
<string name="theme_color">主题颜色</string>
</resources> </resources>

View File

@@ -262,4 +262,5 @@
<string name="confirm_uninstall_title">Confirm uninstallation</string> <string name="confirm_uninstall_title">Confirm uninstallation</string>
<string name="confirm_uninstall_confirm">removing</string> <string name="confirm_uninstall_confirm">removing</string>
<string name="confirm_uninstall_dismiss">abolish</string> <string name="confirm_uninstall_dismiss">abolish</string>
<string name="theme_color">Theme Color</string>
</resources> </resources>