[Kernel] Fix return of XamUserGetDeviceContext.
This commit is contained in:
parent
dc5bd83098
commit
da06cb4f06
|
@ -28,15 +28,13 @@ using xe::hid::X_INPUT_VIBRATION;
|
||||||
constexpr uint32_t XINPUT_FLAG_GAMEPAD = 0x01;
|
constexpr uint32_t XINPUT_FLAG_GAMEPAD = 0x01;
|
||||||
constexpr uint32_t XINPUT_FLAG_ANY_USER = 1 << 30;
|
constexpr uint32_t XINPUT_FLAG_ANY_USER = 1 << 30;
|
||||||
|
|
||||||
dword_result_t XamResetInactivity(dword_t unk) {
|
void XamResetInactivity() {
|
||||||
// Result ignored.
|
// Do we need to do anything?
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT(XamResetInactivity, ExportTag::kInput | ExportTag::kStub);
|
DECLARE_XAM_EXPORT(XamResetInactivity, ExportTag::kInput | ExportTag::kStub);
|
||||||
|
|
||||||
dword_result_t XamEnableInactivityProcessing(dword_t zero, dword_t unk) {
|
dword_result_t XamEnableInactivityProcessing(dword_t unk, dword_t enable) {
|
||||||
// Expects 0.
|
return X_ERROR_SUCCESS;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT(XamEnableInactivityProcessing,
|
DECLARE_XAM_EXPORT(XamEnableInactivityProcessing,
|
||||||
ExportTag::kInput | ExportTag::kStub);
|
ExportTag::kInput | ExportTag::kStub);
|
||||||
|
@ -186,16 +184,16 @@ dword_result_t XamInputGetKeystrokeEx(lpdword_t user_index_ptr, dword_t flags,
|
||||||
DECLARE_XAM_EXPORT(XamInputGetKeystrokeEx,
|
DECLARE_XAM_EXPORT(XamInputGetKeystrokeEx,
|
||||||
ExportTag::kInput | ExportTag::kImplemented);
|
ExportTag::kInput | ExportTag::kImplemented);
|
||||||
|
|
||||||
dword_result_t XamUserGetDeviceContext(dword_t user_index, dword_t unk,
|
X_HRESULT_result_t XamUserGetDeviceContext(dword_t user_index, dword_t unk,
|
||||||
lpdword_t out_ptr) {
|
lpdword_t out_ptr) {
|
||||||
// Games check the result - usually with some masking.
|
// Games check the result - usually with some masking.
|
||||||
// If this function fails they assume zero, so let's fail AND
|
// If this function fails they assume zero, so let's fail AND
|
||||||
// set zero just to be safe.
|
// set zero just to be safe.
|
||||||
*out_ptr = 0;
|
*out_ptr = 0;
|
||||||
if (!user_index || (user_index & 0xFF) == 0xFF) {
|
if (!user_index || (user_index & 0xFF) == 0xFF) {
|
||||||
return 0;
|
return X_E_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return X_E_DEVICE_NOT_CONNECTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT(XamUserGetDeviceContext,
|
DECLARE_XAM_EXPORT(XamUserGetDeviceContext,
|
||||||
|
|
Loading…
Reference in New Issue