From 7de953329f52966f446d0236d82877c0dbecb584 Mon Sep 17 00:00:00 2001 From: Sakiko Date: Wed, 29 Jul 2026 21:18:38 +0800 Subject: [PATCH] fix(ohos): restore ohos cfg gate on set_danmaku_config `erika_presenter_set_danmaku_config` was gated on macos/ios/windows/android while its no-op stub was gated on `not(any(..., target_env = "ohos"))`, so the OpenHarmony target got neither definition and `erika_presenter_set_danmaku_config_ptr` failed to resolve it. The upscaler test lost the same predicate. Both gates came in through PR #58, whose branch predated OpenHarmony support. Co-Authored-By: Claude Opus 5 --- crates/erika_capi/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/erika_capi/src/lib.rs b/crates/erika_capi/src/lib.rs index 7160d50..37dfe0f 100644 --- a/crates/erika_capi/src/lib.rs +++ b/crates/erika_capi/src/lib.rs @@ -2180,7 +2180,8 @@ pub unsafe extern "C" fn erika_presenter_set_debug_hud_enabled( target_os = "macos", target_os = "ios", target_os = "windows", - target_os = "android" + target_os = "android", + target_env = "ohos" ))] #[unsafe(no_mangle)] pub unsafe extern "C" fn erika_presenter_set_danmaku_config( @@ -4156,7 +4157,8 @@ mod tests { target_os = "macos", target_os = "ios", target_os = "windows", - target_os = "android" + target_os = "android", + target_env = "ohos" ))] #[test] fn c_presenter_set_upscaler_accepts_valid_handle() {