diff --git a/ICE/System/src/RenderSystem.cpp b/ICE/System/src/RenderSystem.cpp index 8af08bd..b28ed8b 100644 --- a/ICE/System/src/RenderSystem.cpp +++ b/ICE/System/src/RenderSystem.cpp @@ -47,7 +47,9 @@ void RenderSystem::setTarget(const std::shared_ptr &fb) { } void RenderSystem::setViewport(int x, int y, int w, int h) { - m_renderer->resize(w, h); + if (w > 0 && h > 0) { + m_renderer->resize(w, h); + } } } // namespace ICE \ No newline at end of file diff --git a/ICEBERG/UI/ViewportWidget.h b/ICEBERG/UI/ViewportWidget.h index 75ddc07..ace88e6 100644 --- a/ICEBERG/UI/ViewportWidget.h +++ b/ICEBERG/UI/ViewportWidget.h @@ -55,9 +55,8 @@ class ViewportWidget : public Widget { callback("lc_pressed"); } } - ImVec2 view = ImGui::GetContentRegionAvail(); callback("resize", window_width, window_height); - ImGuizmo::SetRect(pos.x, pos.y, view.x, view.y); + ImGuizmo::SetRect(pos.x, pos.y, window_width, window_height); ImGuizmo::SetDrawlist(ImGui::GetWindowDrawList()); ImGui::End(); } diff --git a/ICEBERG/src/Iceberg.cpp b/ICEBERG/src/Iceberg.cpp index ce9da2e..43ddccd 100644 --- a/ICEBERG/src/Iceberg.cpp +++ b/ICEBERG/src/Iceberg.cpp @@ -17,16 +17,7 @@ #include "Editor.h" #include "ProjectSelection.h" -#ifdef __cplusplus -extern "C" { -#endif -__declspec(dllexport) unsigned long NvOptimusEnablement = 1; -__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; - -#ifdef __cplusplus -} -#endif enum class UIState { PROJECT_SELECTION, EDITOR }; class Iceberg {