From 628fb89771762f8f4998a6be1e1dd0b922ea7e08 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 8 Sep 2024 22:57:29 +0200 Subject: [PATCH] Use original IOPort code again --- include/PSX/System/IOPorts/ioport.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/PSX/System/IOPorts/ioport.hpp b/include/PSX/System/IOPorts/ioport.hpp index 7bec4c6d..63c72ce0 100644 --- a/include/PSX/System/IOPorts/ioport.hpp +++ b/include/PSX/System/IOPorts/ioport.hpp @@ -77,13 +77,14 @@ namespace JabyEngine { template struct IOPort { using Value = T; + T value; T read() const { - return {const_cast(reinterpret_cast(this))->raw}; + return {const_cast*>(this)->value.raw}; } void write(T value) { - const_cast(reinterpret_cast(this))->raw = value.raw; + const_cast*>(this)->value.raw = value.raw; } };