I have the following code and get errors and I dont know why:
Code:
dword_result_t XamInputGetCapabilities(dword_t user_index, dword_t flags, pointer_t<X_INPUT_CAPABILITIES> caps_ptr) {
if (!caps_ptr) {
return X_ERROR_BAD_ARGUMENTS;
return;
}
if ((flags & 0xFF) && (flags & XINPUT_FLAG_GAMEPAD) == 0) {
// Ignore any query for other types of devices.
return X_ERROR_DEVICE_NOT_CONNECTED;
return;
}
if ((user_index & 0xFF) == 0xFF || (flags & XINPUT_FLAG_ANY_USER)) {
// Always pin user to 0.
user_index = 0;
}
auto input_system = kernel_state()->emulator()->input_system();
X_RESULT result = input_system->GetCapabilities(user_index, flags, caps_ptr);
return result;
}
The following errors:
error C2561: 'xe::kernel::xam::XamInputGetCapabilities': func
tion must return a value
error C2678: binary '=': no operator found which takes a left
-hand operand of type 'const xe::kernel::shim::ParamBase<uint32_t>
Now the parameters at this link and I am changing the code from a shim call to dword_result_t
shim_utils.h Source View - Source code download - xenia dword_t I am guessing is wrong for user_index unless I have to do something like user_index.value() = 0;