@@ -85,41 +85,25 @@ bool fontDrawMessageMtxHandleCommand(const char *command, const char *commandVal
85
85
void drawFunctionOnDebugLayer (void (*func)())
86
86
{
87
87
ttyd::dispdrv::dispEntry (ttyd::dispdrv::CameraId::kDebug3d , 2 , 0 .f ,
88
- [](ttyd::dispdrv::CameraId cameraId, void *user)
89
- {
90
- (void )cameraId;
91
- reinterpret_cast <void (*)()>(user)();
92
- }, reinterpret_cast <void *>(func));
88
+ reinterpret_cast <ttyd::dispdrv::PFN_dispCallback>(func), nullptr );
93
89
}
94
90
95
91
void drawFunctionOnDebugLayerWithOrder (void (*func)(), float order)
96
92
{
97
93
ttyd::dispdrv::dispEntry (ttyd::dispdrv::CameraId::kDebug3d , 2 , order,
98
- [](ttyd::dispdrv::CameraId cameraId, void *user)
99
- {
100
- (void )cameraId;
101
- reinterpret_cast <void (*)()>(user)();
102
- }, reinterpret_cast <void *>(func));
94
+ reinterpret_cast <ttyd::dispdrv::PFN_dispCallback>(func), nullptr );
103
95
}
104
96
105
97
void drawFunctionOn2DLayer (void (*func)())
106
98
{
107
99
ttyd::dispdrv::dispEntry (ttyd::dispdrv::CameraId::k2d, 2 , 0 .f ,
108
- [](ttyd::dispdrv::CameraId cameraId, void *user)
109
- {
110
- (void )cameraId;
111
- reinterpret_cast <void (*)()>(user)();
112
- }, reinterpret_cast <void *>(func));
100
+ reinterpret_cast <ttyd::dispdrv::PFN_dispCallback>(func), nullptr );
113
101
}
114
102
115
103
void drawFunctionOn2DLayerWithOrder (void (*func)(), float order)
116
104
{
117
105
ttyd::dispdrv::dispEntry (ttyd::dispdrv::CameraId::k2d, 2 , order,
118
- [](ttyd::dispdrv::CameraId cameraId, void *user)
119
- {
120
- (void )cameraId;
121
- reinterpret_cast <void (*)()>(user)();
122
- }, reinterpret_cast <void *>(func));
106
+ reinterpret_cast <ttyd::dispdrv::PFN_dispCallback>(func), nullptr );
123
107
}
124
108
125
109
void drawMenuWindow ()
0 commit comments