Verify that the version is 2.0.0+ in swkbdInlineCreate.

This commit is contained in:
yellows8 2019-02-18 16:42:12 -05:00
parent 11b7bece4a
commit e3f021bab3
2 changed files with 4 additions and 1 deletions

View File

@ -390,7 +390,7 @@ void swkbdConfigSetTextCheckCallback(SwkbdConfig* c, SwkbdTextCheckCb cb);
Result swkbdShow(SwkbdConfig* c, char* out_string, size_t out_string_size);
/**
* @brief Creates a SwkbdInline object.
* @brief Creates a SwkbdInline object. Only available on 2.0.0+.
* @note This is essentially an asynchronous version of the regular swkbd.
* @note This calls \ref swkbdInlineSetUtf8Mode internally with flag=true.
* @param s SwkbdInline object.

View File

@ -347,6 +347,9 @@ Result swkbdInlineCreate(SwkbdInline* s) {
_swkbdInitVersion(&s->version);
//swkbd-inline is only available on 2.0.0+.
if (s->version < 0x10006) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
s->calcArg.unk_x0 = 0x30000;
s->calcArg.size = sizeof(s->calcArg);