fixed a few compiler issues

This commit is contained in:
georgemoralis 2024-05-22 14:18:05 +03:00
parent 8730968385
commit b0243dd3e5
2 changed files with 7 additions and 2 deletions

View File

@ -90,3 +90,6 @@ endif()
# sirit # sirit
add_subdirectory(sirit EXCLUDE_FROM_ALL) add_subdirectory(sirit EXCLUDE_FROM_ALL)
if (WIN32)
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
endif()

View File

@ -7,6 +7,7 @@
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/singleton.h" #include "common/singleton.h"
#include "common/types.h" #include "common/types.h"
#include "magic_enum.hpp"
#include <functional> #include <functional>
#include <mutex> #include <mutex>
@ -24,7 +25,8 @@ enum class InterruptId : u32 {
Compute5RelMem = 5u, Compute5RelMem = 5u,
Compute6RelMem = 6u, Compute6RelMem = 6u,
GfxEop = 7u, GfxEop = 7u,
GfxFlip = 8u GfxFlip = 8u,
MaxValue
}; };
using IrqHandler = std::function<void(InterruptId)>; using IrqHandler = std::function<void(InterruptId)>;
@ -79,7 +81,7 @@ private:
std::queue<IrqHandler> one_time_subscribers{}; std::queue<IrqHandler> one_time_subscribers{};
std::mutex m_lock{}; std::mutex m_lock{};
}; };
std::array<IrqContext, 8> irq_contexts{}; std::array<IrqContext, (int)InterruptId::MaxValue> irq_contexts{};
}; };
using IrqC = Common::Singleton<IrqController>; using IrqC = Common::Singleton<IrqController>;