Added to_outside accessible for JavaScript to offset a pointer from the flyff client, solving a bug around text input
This commit is contained in:
parent
2fa1a801a3
commit
c477678e60
|
|
@ -67,8 +67,13 @@ void get_text(const std::string& text) {
|
|||
std::cout << text << " = \"" << result << "\"" << std::endl;
|
||||
}
|
||||
|
||||
uintptr_t to_outside(uint32_t ptr) {
|
||||
return fugg::wasm::kMemory.address_of(ptr);
|
||||
}
|
||||
|
||||
EMSCRIPTEN_BINDINGS(fugg) {
|
||||
emscripten::function("get_text", &get_text);
|
||||
emscripten::function("to_outside", &to_outside);
|
||||
};
|
||||
|
||||
int main() {
|
||||
|
|
|
|||
Reference in New Issue