Add support for Debug Adapter Protocol

This commit is contained in:
kichikuou
2024-12-28 14:09:56 +09:00
parent 8883bd5d68
commit 909140f3bc
15 changed files with 684 additions and 63 deletions
+18
View File
@@ -6,6 +6,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "nact.h"
#include "encoding.h"
#include "ags.h"
@@ -843,6 +844,23 @@ void NACT::sys_sleep(int ms) {
#endif
}
void NACT::set_string(int index, const char* value)
{
const char *src = value;
char *dst = tvar[index];
int remaining = sizeof(tvar[0]) - 1;
while (*src) {
int len = encoding->mblen(*src);
if (len > remaining)
break;
memcpy(dst, src, len);
src += len;
dst += len;
remaining -= len;
}
*dst = '\0';
}
// WinMainとのインターフェース
int NACT::get_screen_height()