From 0fb71beff2d3d3f763bd8b004febf76e77f3f6d7 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; } };