--- nono/vm/power.h 2026/04/29 17:05:28 1.1.1.5 +++ nono/vm/power.h 2026/04/29 17:06:00 1.1.1.7 @@ -11,10 +11,10 @@ #pragma once #include "device.h" -#include "event.h" #include "message.h" class Syncer; +class UIMessage; // 定数 enum class PowerButtonState @@ -85,6 +85,7 @@ class PowerDevice : public Device bool led {}; Syncer *syncer {}; + UIMessage *uimessage {}; }; class LunaPowerDevice : public PowerDevice @@ -100,10 +101,10 @@ class LunaPowerDevice : public PowerDevi void SetSystemPowerOn(bool poweron) override; private: - void PowerCallback(Event&); + void PowerCallback(Event *); // 電源オフイベント - Event event { this }; + Event *event {}; }; class X68030PowerDevice : public PowerDevice @@ -132,6 +133,6 @@ class X68030PowerDevice : public PowerDe bool alarm_out {}; }; -static inline PowerDevice *GetPowerDevice() { +inline PowerDevice *GetPowerDevice() { return Object::GetObject(OBJ_POWER); }