feat(launcher): add device launch timing override
This commit is contained in:
@@ -128,10 +128,34 @@ function get_launch_profile(
|
||||
extension: string,
|
||||
file_obj?: any
|
||||
): LaunchProfile {
|
||||
const device_profiles = ($ae_loc as any).native_device?.launch_profiles ?? null;
|
||||
const native_device = ($ae_loc as any).native_device ?? null;
|
||||
const device_profiles =
|
||||
native_device?.other_json?.launcher?.launch_profiles ??
|
||||
native_device?.launch_profiles ??
|
||||
null;
|
||||
const local_profiles = ($events_loc as any).launcher?.launch_profiles ?? null;
|
||||
const display_override = file_obj?.cfg_json?.display_override ?? null;
|
||||
return resolve_launch_profile(extension, display_override, device_profiles, local_profiles);
|
||||
const profile = resolve_launch_profile(
|
||||
extension,
|
||||
display_override,
|
||||
device_profiles,
|
||||
local_profiles
|
||||
);
|
||||
|
||||
const device_post_delay_ms =
|
||||
native_device?.other_json?.launcher?.post_delay_ms ??
|
||||
native_device?.post_delay_ms ??
|
||||
null;
|
||||
const parsed_delay_ms =
|
||||
typeof device_post_delay_ms === 'string'
|
||||
? Number(device_post_delay_ms)
|
||||
: device_post_delay_ms;
|
||||
|
||||
if (Number.isFinite(parsed_delay_ms) && parsed_delay_ms >= 0) {
|
||||
profile.post_delay_ms = parsed_delay_ms;
|
||||
}
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
||||
Reference in New Issue
Block a user