mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-03 12:28:10 +03:00
Add support for Debug Adapter Protocol
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user