mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(desktop): drop game capture injection and pin dll search (#2069)
This commit is contained in:
1 parent
9ad026b8ce
commit
9d0be1ebd1
43 files changed
+158
-12089
No files matched your search
-7
@@ -278,10 +278,6 @@ const DEVELOPER_OPTION_DESCRIPTOR = msg({
|
||||
message: 'Developer option',
|
||||
comment: 'Developer tools debug menu label. Internal-only surface for developers; translators may keep this terse.',
|
||||
});
|
||||
const GAME_CAPTURE_INJECTION_METHOD_DESCRIPTOR = msg({
|
||||
message: 'Game capture injection (Windows)',
|
||||
comment: 'Developer tools debug menu label. Internal-only surface for developers; translators may keep this terse.',
|
||||
});
|
||||
const DEVELOPER_OPTION_LABEL_FALLBACKS: Partial<Record<keyof DeveloperOptionsState, MessageDescriptor>> = {
|
||||
mockAttachmentStates: ATTACHMENT_MOCKS_DESCRIPTOR,
|
||||
};
|
||||
@@ -327,7 +323,6 @@ const formatDeveloperOptionValue = <K extends keyof DeveloperOptionsState>(
|
||||
case 'mockRequiredActionsResendOutcome':
|
||||
case 'mockTitlebarPlatformOverride':
|
||||
case 'mockUpdaterState':
|
||||
case 'gameCaptureInjectionMethod':
|
||||
return String(value).replace(/_/g, ' ');
|
||||
case 'premiumSinceOverride':
|
||||
case 'premiumUntilOverride':
|
||||
@@ -410,8 +405,6 @@ export const getDeveloperOptionLabel = (key: keyof DeveloperOptionsState): Messa
|
||||
return VANITY_URL_DISCLAIMER_DESCRIPTOR;
|
||||
case 'forceShowVoiceConnection':
|
||||
return VOICE_CONNECTION_DEBUG_DESCRIPTOR;
|
||||
case 'gameCaptureInjectionMethod':
|
||||
return GAME_CAPTURE_INJECTION_METHOD_DESCRIPTOR;
|
||||
case 'premiumTypeOverride':
|
||||
return PREMIUM_TYPE_DESCRIPTOR;
|
||||
case 'premiumLifetimeSequenceOverride':
|
||||
|
||||
-13
@@ -1,15 +1,11 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {getDeveloperOptionLabel} from '@app/features/channel/components/channel_header_components/developer_tools/DeveloperOptionLabels';
|
||||
import {DeveloperOptionRadioSubmenu} from '@app/features/channel/components/channel_header_components/developer_tools/DeveloperToolsMenuComponents';
|
||||
import {translateDescriptor} from '@app/features/channel/components/channel_header_components/developer_tools/DeveloperToolsShared';
|
||||
import {getGameCaptureInjectionMethodOptions} from '@app/features/channel/components/channel_header_components/developer_tools/OptionPresets';
|
||||
import {getToggleGroups, type ToggleGroup} from '@app/features/devtools/components/DeveloperOptionsToggleGroups';
|
||||
import type {DeveloperOptionsState} from '@app/features/devtools/state/DeveloperOptions';
|
||||
import DeveloperOptions from '@app/features/devtools/state/DeveloperOptions';
|
||||
import {CheckboxItem} from '@app/features/ui/action_menu/ContextMenu';
|
||||
import {MenuItemSubmenu} from '@app/features/ui/action_menu/MenuItemSubmenu';
|
||||
import {getNativePlatformSync} from '@app/features/ui/utils/NativeUtils';
|
||||
import * as UserSettingsCommands from '@app/features/user/commands/UserSettingsCommands';
|
||||
import UserSettings from '@app/features/user/state/UserSettings';
|
||||
import Users from '@app/features/user/state/Users';
|
||||
@@ -71,7 +67,6 @@ export const GeneralDeveloperOptionsMenu: React.FC = observer(() => {
|
||||
const currentUser = Users.currentUser;
|
||||
const canConfigureMentionSuppression = currentUser?.isStaff() ?? false;
|
||||
const suppressUnprivilegedSelfMentions = UserSettings.getSuppressUnprivilegedSelfMentions();
|
||||
const isWindows = getNativePlatformSync() === 'windows';
|
||||
return (
|
||||
<>
|
||||
{toggleGroups.map((group, index) => (
|
||||
@@ -81,14 +76,6 @@ export const GeneralDeveloperOptionsMenu: React.FC = observer(() => {
|
||||
data-flx="channel.channel-header-components.developer-tools-context-menu.general-developer-options-menu.toggle-group-submenu"
|
||||
/>
|
||||
))}
|
||||
{isWindows && (
|
||||
<DeveloperOptionRadioSubmenu
|
||||
label={translateDescriptor(i18n, getDeveloperOptionLabel('gameCaptureInjectionMethod'))}
|
||||
optionKey="gameCaptureInjectionMethod"
|
||||
options={getGameCaptureInjectionMethodOptions()}
|
||||
data-flx="channel.channel-header-components.developer-tools-context-menu.general-developer-options-menu.game-capture-injection"
|
||||
/>
|
||||
)}
|
||||
{canConfigureMentionSuppression && (
|
||||
<MenuItemSubmenu
|
||||
label={i18n._(MENTION_CONTROLS_DESCRIPTOR)}
|
||||
|
||||
-11
@@ -196,14 +196,3 @@ export const getGiftDurationOptions = (): Array<RadioMenuOption<DeveloperOptions
|
||||
{value: 12, label: MESSAGE_12_MONTHS_1_YEAR_DESCRIPTOR},
|
||||
{value: 0, label: LIFETIME_DESCRIPTOR},
|
||||
];
|
||||
export const INJECT_METHOD_AUTOMATIC_DESCRIPTOR = msg({
|
||||
message: 'Automatic',
|
||||
comment: 'Developer tools debug menu label. Internal-only surface for developers; translators may keep this terse.',
|
||||
});
|
||||
export const getGameCaptureInjectionMethodOptions = (): Array<
|
||||
RadioMenuOption<DeveloperOptionsState['gameCaptureInjectionMethod']>
|
||||
> => [
|
||||
{value: 'auto', label: INJECT_METHOD_AUTOMATIC_DESCRIPTOR},
|
||||
{value: 'remote-thread', label: 'CreateRemoteThread'},
|
||||
{value: 'set-windows-hook', label: 'SetWindowsHookEx'},
|
||||
];
|
||||
-1
@@ -69,7 +69,6 @@ export const DEFAULT_DEVELOPER_OPTIONS = {
|
||||
mockTitlebarPlatformOverride: 'auto',
|
||||
mockAttachmentStates: {},
|
||||
noOpInAppReports: false,
|
||||
gameCaptureInjectionMethod: 'auto',
|
||||
} satisfies DeveloperOptionsState;
|
||||
const PREMIUM_SCENARIO_OVERRIDE_KEYS = new Set<keyof DeveloperOptionsState>([
|
||||
'premiumTypeOverride',
|
||||
|
||||
Reference in new issue
Block a user