Fixup DISPATCH_HEADER type_flags to its parts
This commit is contained in:
parent
4c9cab4346
commit
f96657ef7c
|
@ -32,7 +32,7 @@ void XEvent::InitializeNative(void* native_ptr, X_DISPATCH_HEADER& header) {
|
||||||
assert_null(native_handle_);
|
assert_null(native_handle_);
|
||||||
|
|
||||||
bool manual_reset;
|
bool manual_reset;
|
||||||
switch ((header.type_flags >> 24) & 0xFF) {
|
switch (header.type) {
|
||||||
case 0x00: // EventNotificationObject (manual reset)
|
case 0x00: // EventNotificationObject (manual reset)
|
||||||
manual_reset = true;
|
manual_reset = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -198,7 +198,7 @@ object_ref<XObject> XObject::GetNativeObject(KernelState* kernel_state,
|
||||||
auto header = reinterpret_cast<X_DISPATCH_HEADER*>(native_ptr);
|
auto header = reinterpret_cast<X_DISPATCH_HEADER*>(native_ptr);
|
||||||
|
|
||||||
if (as_type == -1) {
|
if (as_type == -1) {
|
||||||
as_type = (header->type_flags >> 24) & 0xFF;
|
as_type = header->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (header->wait_list_blink & 0x1) {
|
if (header->wait_list_blink & 0x1) {
|
||||||
|
|
|
@ -29,7 +29,26 @@ class object_ref;
|
||||||
|
|
||||||
// http://www.nirsoft.net/kernel_struct/vista/DISPATCHER_HEADER.html
|
// http://www.nirsoft.net/kernel_struct/vista/DISPATCHER_HEADER.html
|
||||||
typedef struct {
|
typedef struct {
|
||||||
xe::be<uint32_t> type_flags;
|
struct {
|
||||||
|
uint8_t type;
|
||||||
|
|
||||||
|
union {
|
||||||
|
uint8_t abandoned;
|
||||||
|
uint8_t absolute;
|
||||||
|
uint8_t npx_irql;
|
||||||
|
uint8_t signalling;
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
uint8_t size;
|
||||||
|
uint8_t hand;
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
uint8_t inserted;
|
||||||
|
uint8_t debug_active;
|
||||||
|
uint8_t dpc_active;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xe::be<uint32_t> signal_state;
|
xe::be<uint32_t> signal_state;
|
||||||
xe::be<uint32_t> wait_list_flink;
|
xe::be<uint32_t> wait_list_flink;
|
||||||
xe::be<uint32_t> wait_list_blink;
|
xe::be<uint32_t> wait_list_blink;
|
||||||
|
|
Loading…
Reference in New Issue