mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-30 10:58:07 +03:00
nact: Change tvar from char array to std::string
This commit is contained in:
@@ -19,7 +19,7 @@ Uint32 custom_event_type = static_cast<Uint32>(-1);
|
||||
void NACT::text_dialog()
|
||||
{
|
||||
static char buf[256];
|
||||
std::string oldstr = encoding->toUtf8(tvar[tvar_index - 1]);
|
||||
std::string oldstr = encoding->toUtf8(tvar[tvar_index - 1].c_str());
|
||||
int ok = EM_ASM_({
|
||||
var r = xsystem35.shell.inputString("文字列を入力してください", UTF8ToString($0), $1);
|
||||
if (r) {
|
||||
@@ -29,7 +29,7 @@ void NACT::text_dialog()
|
||||
return 0;
|
||||
}, oldstr.c_str(), tvar_maxlen, buf, sizeof buf);
|
||||
if (ok) {
|
||||
strcpy_s(tvar[tvar_index - 1], 22, encoding->fromUtf8(buf).c_str());
|
||||
tvar[tvar_index - 1] = encoding->fromUtf8(buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user