Skip to content

Commit 6bb801e

Browse files
committed
修正 DLL 导入名称为小写,并添加 VSCode 设置文件
1 parent b78f79b commit 6bb801e

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cmake.ignoreCMakeListsMissing": true
3+
}

src/LVGLSharp.Runtime.Linux/DrmView.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ namespace LVGLSharp.Runtime.Linux;
1010

1111
public unsafe sealed class DrmView : ViewLifetimeBase
1212
{
13-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_create")]
13+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_create")]
1414
private static extern lv_display_t* lv_linux_drm_create_native();
1515

16-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_set_file")]
16+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_set_file")]
1717
private static extern lv_result_t lv_linux_drm_set_file_native(lv_display_t* display, byte* file, long connectorId);
1818

19-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_find_device_path")]
19+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_find_device_path")]
2020
private static extern byte* lv_linux_drm_find_device_path_native();
2121

22-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_set_mode_cb")]
22+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_set_mode_cb")]
2323
private static extern void lv_linux_drm_set_mode_cb_native(lv_display_t* display, delegate* unmanaged[Cdecl]<lv_display_t*, IntPtr, nuint, nuint> callback);
2424

25-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_get_horizontal_resolution")]
25+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_get_horizontal_resolution")]
2626
private static extern int lv_linux_drm_mode_get_horizontal_resolution_native(IntPtr mode);
2727

28-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_get_vertical_resolution")]
28+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_get_vertical_resolution")]
2929
private static extern int lv_linux_drm_mode_get_vertical_resolution_native(IntPtr mode);
3030

31-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_get_refresh_rate")]
31+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_get_refresh_rate")]
3232
private static extern int lv_linux_drm_mode_get_refresh_rate_native(IntPtr mode);
3333

34-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_is_preferred")]
34+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_drm_mode_is_preferred")]
3535
[return: MarshalAs(UnmanagedType.I1)]
3636
private static extern bool lv_linux_drm_mode_is_preferred_native(IntPtr mode);
3737

@@ -81,7 +81,7 @@ protected override void OnOpenCore()
8181
_display = lv_linux_drm_create_native();
8282
if (_display == null)
8383
{
84-
throw new InvalidOperationException("DRM display 创建失败。");
84+
throw new InvalidOperationException("DRM display ����ʧ�ܡ�");
8585
}
8686

8787
_resolvedDevicePath = ResolveDevicePath();
@@ -96,7 +96,7 @@ protected override void OnOpenCore()
9696
var result = lv_linux_drm_set_file_native(_display, devicePtr, _connectorId);
9797
if (result != LV_RESULT_OK)
9898
{
99-
throw new InvalidOperationException($"DRM 设备初始化失败。Device={_resolvedDevicePath}, Connector={_connectorId}, Result={result}.");
99+
throw new InvalidOperationException($"DRM �豸��ʼ��ʧ�ܡ�Device={_resolvedDevicePath}, Connector={_connectorId}, Result={result}.");
100100
}
101101
}
102102

src/LVGLSharp.Runtime.Linux/FrameBufferView.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ namespace LVGLSharp.Runtime.Linux
1313
{
1414
public unsafe class FrameBufferView : ViewLifetimeBase
1515
{
16-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_fbdev_create")]
16+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_fbdev_create")]
1717
private static extern lv_display_t* lv_linux_fbdev_create_native();
1818

19-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_fbdev_set_file")]
19+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_linux_fbdev_set_file")]
2020
private static extern lv_result_t lv_linux_fbdev_set_file_native(lv_display_t* disp, byte* file);
2121

22-
[DllImport("LVGL", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_evdev_create")]
22+
[DllImport("lvgl", CallingConvention = CallingConvention.Cdecl, EntryPoint = "lv_evdev_create")]
2323
private static extern lv_indev_t* lv_evdev_create_native(lv_indev_type_t indev_type, byte* dev_path);
2424

2525
static lv_display_t* g_display;

0 commit comments

Comments
 (0)