diff --git a/DS2AnimToolset/morphemeEditor/GuiManager/GuiManager.cpp b/DS2AnimToolset/morphemeEditor/GuiManager/GuiManager.cpp index a68131b8..acd7cadd 100644 --- a/DS2AnimToolset/morphemeEditor/GuiManager/GuiManager.cpp +++ b/DS2AnimToolset/morphemeEditor/GuiManager/GuiManager.cpp @@ -8,6 +8,8 @@ #include "WorkerThread/WorkerThread.h" #include "Camera/Camera.h" +#define MSAA_SETTING_COUNT 4 + namespace { void trackEditorColorSelector(TrackEditor::TrackEditorBase* trackEditor) @@ -676,10 +678,12 @@ void GuiManager::rootWindow() { RenderManager* renderMan = RenderManager::getInstance(); - const char* msaaQualitySettings[6] = { "Off", "2x", "4x", "8x", "16x" }; + const char* msaaQualitySettings[5] = { "Off", "2x", "4x", "8x", "16x" }; int selectedSetting = 0; - switch (renderMan->getSettings()->msaaCount) + int msaaCountSetting = renderMan->getSettings()->msaaCount; + + switch (msaaCountSetting) { case 1: selectedSetting = 0; @@ -696,11 +700,14 @@ void GuiManager::rootWindow() case 16: selectedSetting = 4; break; + default: + g_appLog->panicMessage("Unsupported MSAA count %d (maximum handled is 16, recommended maximum is 8)\n", msaaCountSetting); + break; } if (ImGui::BeginCombo("MSAA", msaaQualitySettings[selectedSetting])) { - for (size_t i = 0; i < 5; i++) + for (size_t i = 0; i < MSAA_SETTING_COUNT; i++) { ImGui::Selectable(msaaQualitySettings[i]); diff --git a/DS2AnimToolset/morphemeEditor/TrackEditor/TrackEditorBase.cpp b/DS2AnimToolset/morphemeEditor/TrackEditor/TrackEditorBase.cpp index b44161fa..c915bfa9 100644 --- a/DS2AnimToolset/morphemeEditor/TrackEditor/TrackEditorBase.cpp +++ b/DS2AnimToolset/morphemeEditor/TrackEditor/TrackEditorBase.cpp @@ -8,7 +8,7 @@ namespace { - int drawDurationEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, int framePixelWidth, int frameStart, int frameEnd, std::string label, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor) + int drawDurationEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, float framePixelWidth, int frameStart, int frameEnd, std::string label, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor) { ImVec2 slotP1(startOffset.x + frameStart * framePixelWidth - 1, startOffset.y + 2); ImVec2 slotP2(startOffset.x + frameEnd * framePixelWidth - 1, startOffset.y + itemHeight - 2); @@ -74,7 +74,7 @@ namespace return 0; } - int drawDiscreteEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, int framePixelWidth, int frameStart, std::string label, int idx, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor) + int drawDiscreteEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, float framePixelWidth, int frameStart, std::string label, int idx, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor) { ImVec2 slotD1(startOffset.x + frameStart * framePixelWidth - 6, startOffset.y + 2); ImVec2 slotD2(startOffset.x + frameStart * framePixelWidth + 4, startOffset.y + itemHeight - 7);