UP 模拟器 加入key的模拟支持

This commit is contained in:
JiXieShi
2024-06-22 22:51:58 +08:00
parent 0c7c6bb1e9
commit 5876461531
9 changed files with 201 additions and 35 deletions

14
sim/thread/sim_thread.h Normal file
View File

@@ -0,0 +1,14 @@
#ifndef HW_LIB_SIM_THREAD_H
#define HW_LIB_SIM_THREAD_H
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*Thread_Func_t)(void *pArg);
void ThreadCreat(Thread_Func_t func, unsigned int stackSize, void *pArg);
void ThreadStop();
#ifdef __cplusplus
}
#endif
#endif //HW_LIB_SIM_THREAD_H

11
sim/thread/thread.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "sim_thread.h"
#include <windows.h>
#include <process.h>
void ThreadCreat(Thread_Func_t func, unsigned int stackSize, void *pArg) {
_beginthread(func, stackSize, pArg);
}
void ThreadStop() {
_endthread();
}