mirror of https://github.com/AxioDL/metaforce.git
Fix SysReqTableView for non-x86
This commit is contained in:
parent
ac5745429c
commit
75f0a416de
|
@ -26,6 +26,12 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
|
|||
set(QUAZIP_INSTALL OFF CACHE BOOL "")
|
||||
add_subdirectory(quazip)
|
||||
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
|
||||
set(VectorISATableModel_HEADER VectorISATableModelIntel.hpp)
|
||||
else ()
|
||||
set(VectorISATableModel_HEADER "")
|
||||
endif ()
|
||||
|
||||
add_executable(hecl-gui WIN32 MACOSX_BUNDLE
|
||||
ArgumentEditor.cpp
|
||||
ArgumentEditor.hpp
|
||||
|
@ -54,7 +60,7 @@ add_executable(hecl-gui WIN32 MACOSX_BUNDLE
|
|||
SysReqTableView.cpp
|
||||
SysReqTableView.hpp
|
||||
VectorISATableModel.hpp
|
||||
VectorISATableModelIntel.hpp
|
||||
${VectorISATableModel_HEADER}
|
||||
VectorISATableView.cpp
|
||||
VectorISATableView.hpp
|
||||
|
||||
|
|
|
@ -55,8 +55,11 @@ public:
|
|||
const SysReqTableModel& getModel() const { return m_model; }
|
||||
const VectorISATableView& getVectorISATable() const { return m_vectorISATable; }
|
||||
bool willRun(const URDEVersion& v) const {
|
||||
return v.getArchitecture() == CurArchitecture && v.getPlatform() == CurPlatform &&
|
||||
m_vectorISATable.willRun(v.getVectorISA());
|
||||
return v.getArchitecture() == CurArchitecture && v.getPlatform() == CurPlatform
|
||||
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||
&& m_vectorISATable.willRun(v.getVectorISA())
|
||||
#endif
|
||||
;
|
||||
}
|
||||
bool isBlenderVersionOk() const { return m_model.isBlenderVersionOk(); }
|
||||
void updateFreeDiskSpace(const QString& path) { m_model.updateFreeDiskSpace(path); }
|
||||
|
|
|
@ -16,8 +16,10 @@ void VectorISATableView::paintEvent(QPaintEvent* e) {
|
|||
width += columnWidth(j);
|
||||
} else {
|
||||
tableX = p->verticalHeader()->width() + columnViewportPosition(m_maxISA + 1);
|
||||
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||
for (int j = m_maxISA + 1; j < m_model.columnCount({}); ++j)
|
||||
width += columnWidth(j);
|
||||
#endif
|
||||
}
|
||||
|
||||
QWidget* w = std::get<0>(m_backgroundWidgets[i]);
|
||||
|
@ -40,6 +42,7 @@ void VectorISATableView::paintEvent(QPaintEvent* e) {
|
|||
}
|
||||
|
||||
VectorISATableView::VectorISATableView(QWidget* parent) : QTableView(parent) {
|
||||
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||
setModel(&m_model);
|
||||
|
||||
for (int i = 0; i < m_model.columnCount({}); ++i) {
|
||||
|
@ -48,6 +51,7 @@ VectorISATableView::VectorISATableView(QWidget* parent) : QTableView(parent) {
|
|||
else
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
horizontalHeader()->hide();
|
||||
horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
|
|
|
@ -20,6 +20,8 @@ class VectorISATableView : public QTableView {
|
|||
public:
|
||||
VectorISATableView(QWidget* parent = Q_NULLPTR);
|
||||
void paintEvent(QPaintEvent* e) override;
|
||||
#if ZEUS_ARCH_X86_64 || ZEUS_ARCH_X86
|
||||
VectorISA getISA() const { return m_model.getISA(m_maxISA); }
|
||||
bool willRun(VectorISA visa) const { return m_model.willRun(visa); }
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue