Open fwsGonzo opened 5 months ago
inline std::optional<intptr_t> Game::setting(std::string_view setting) { register const char* name_ptr asm("a0") = setting.begin(); register unsigned name_len asm("a1") = setting.size(); register long sysno asm("a7") = ECALL_GAME_SETTING; register bool has_value asm("a0"); register intptr_t result asm("a1"); asm("ecall" : "=r"(has_value), "=r"(result) : "m"(*(const char(*)[name_len])name_ptr), "r"(name_ptr), "r"(name_len), "r"(sysno)); if (has_value) return int64_t(result); return std::nullopt; }
Looking at this, I cannot see what's wrong. It just doesn't work. Can you see what's wrong?
Looking at this, I cannot see what's wrong. It just doesn't work. Can you see what's wrong?