mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 00:42:48 +00:00
Cleanup
This commit is contained in:
parent
ae984b5ff5
commit
94f64a6e6f
@ -9,6 +9,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/asio/steady_timer.hpp>
|
#include <boost/asio/steady_timer.hpp>
|
||||||
|
|
||||||
|
#include "common/rdtsc.h"
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
|
||||||
namespace Core::Loader {
|
namespace Core::Loader {
|
||||||
@ -84,23 +85,18 @@ struct EqueueEvent {
|
|||||||
void TriggerDisplay(void* data) {
|
void TriggerDisplay(void* data) {
|
||||||
is_triggered = true;
|
is_triggered = true;
|
||||||
auto hint = reinterpret_cast<u64>(data);
|
auto hint = reinterpret_cast<u64>(data);
|
||||||
if (data == 0) {
|
if (hint != 0) {
|
||||||
event.data = (hint >> 12) & 0xF;
|
|
||||||
} else {
|
|
||||||
auto event_id = event.ident << 48;
|
auto event_id = event.ident << 48;
|
||||||
auto hint_h = u32(hint >> 8) & 0xFFFFFF;
|
auto hint_h = u32(hint >> 8) & 0xFFFFFF;
|
||||||
auto ident_h = u32(event.ident >> 40);
|
auto ident_h = u32(event.ident >> 40);
|
||||||
auto i = 0;
|
if ((u32(hint) & 0xFF) == event_id && event_id != 0xFE &&
|
||||||
if ((u32(hint) & 0xFF) == event_id && event_id != 0xFE && ((hint_h ^ ident_h) & 0xFF) == 0) {
|
((hint_h ^ ident_h) & 0xFF) == 0) {
|
||||||
auto time = __rdtsc();
|
auto time = Common::FencedRDTSC();
|
||||||
auto mask = 0xF000;
|
auto mask = 0xF000;
|
||||||
if ((u32(event.data) & 0xF000) != 0xF000) {
|
if ((u32(event.data) & 0xF000) != 0xF000) {
|
||||||
mask = (u32(event.data) + 0x1000) & 0xF000;
|
mask = (u32(event.data) + 0x1000) & 0xF000;
|
||||||
}
|
}
|
||||||
i = 1;
|
|
||||||
event.data = (mask | u64(u32(time) & 0xFFF) | (hint & 0xFFFFFFFFFFFF0000));
|
event.data = (mask | u64(u32(time) & 0xFFF) | (hint & 0xFFFFFFFFFFFF0000));
|
||||||
} else {
|
|
||||||
event.data = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user