Skip to content

Commit

Permalink
修正_EOS_VERSION_GREATER_THAN_1_6_1宏的使用
Browse files Browse the repository at this point in the history
  • Loading branch information
Daylily-Zeleen committed Apr 15, 2024
1 parent 4f80572 commit ac80025
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gd_eos/eos_code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

sdk_inclide_dir = "thirdparty/eos-sdk/SDK/Include"

_gen_dir = "gd_eos/gen/"
gen_include_dir = os.path.join(_gen_dir, "include")
gen_src_dir = os.path.join(_gen_dir, "src")
gen_dir = "gd_eos/gen/"
gen_include_dir = os.path.join(gen_dir, "include")
gen_src_dir = os.path.join(gen_dir, "src")

# 解析结果
struct2additional_method_requirements: dict[str, dict[str, bool]] = {}
Expand Down Expand Up @@ -442,7 +442,7 @@ def gen_files(file_base_name: str, infos: dict):
if interface_low == "rtc_data":
# 1.6.2 新增
# TODO: 考虑移除改宏,是否生成依赖于用户使用的SDK版本
interface_handle_cpp_lines.append(f"#ifdef _EOS_VERSION_GREATER_THAN_1_6_1")
interface_handle_cpp_lines.append(f"#if _EOS_VERSION_GREATER_THAN_1_6_1")
interface_handle_cpp_lines.append(f"#ifndef {_disabled_macro}")
interface_handle_cpp_lines.append(f"#include <interfaces/eos_{interface_low}_interface.h>")
interface_handle_cpp_lines.append(f"#endif // {_disabled_macro}")
Expand Down Expand Up @@ -872,7 +872,7 @@ def _gen_handle(
r_cpp_lines.append(f'#endif // {_gen_disabled_macro("EOS_HRTCAudio")}')

# 特殊处理 RTCData
r_cpp_lines.append(f"#ifdef _EOS_VERSION_GREATER_THAN_1_6_1")
r_cpp_lines.append(f"#if _EOS_VERSION_GREATER_THAN_1_6_1")
r_cpp_lines.append(f'#ifndef {_gen_disabled_macro("EOS_HRTCData")}')
r_cpp_lines.append(f"\tif (m_handle) {{")
r_cpp_lines.append(f"\t\tauto rtc_data_handle = EOS_RTC_GetDataInterface(m_handle);")
Expand Down

0 comments on commit ac80025

Please sign in to comment.