Skip to content

Commit 1ef7fb1

Browse files
author
Sebi
committed
Fixing Linux build
1 parent 7692814 commit 1ef7fb1

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ add_subdirectory("Thirdparty/nativefiledialog-extended")
5858
# DasherUI
5959
###############################
6060

61-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
61+
IF (WIN32)
62+
# Hide console window
63+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
64+
ENDIF()
65+
6266
ADD_Executable(DasherUI
6367
${PROJECT_SOURCE_DIR}/src/DasherController.cpp
6468
${PROJECT_SOURCE_DIR}/src/DasherController.h

DasherCore

src/DasherController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "DasherUIScreen.h"
55
#include "imgui.h"
66
#include "imgui_internal.h"
7+
#include <memory>
78

89

910
class DasherController : public Dasher::CDashIntfScreenMsgs

src/DasherUIScreen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void DasherUIScreen::DrawRectangle(Dasher::screenint x1, Dasher::screenint y1, D
3333

3434
if(iThickness > 0)
3535
{
36-
const Dasher::CColourIO::ColourInfo::PaletteColor OutlineColor = this->pColorScheme->Colors[Colour];
36+
const Dasher::CColourIO::ColourInfo::PaletteColor OutlineColor = this->pColorScheme->Colors[iOutlineColour > 0 ? iOutlineColour : 3]; //Apparently Outline Color 3 is the default
3737
const ImVec4 ImOutlineColor = { static_cast<float>(OutlineColor.Red) / 255.0f, static_cast<float>(OutlineColor.Green) / 255.0f, static_cast<float>(OutlineColor.Blue) / 255.0f, 1.0f };
3838

3939
ImGui::GetWindowDrawList()->AddRect(CanvasPos + p1, CanvasPos + p2, ImGui::ColorConvertFloat4ToU32(ImOutlineColor),0,0, static_cast<float>(iThickness));
@@ -49,7 +49,7 @@ void DasherUIScreen::DrawCircle(Dasher::screenint iCX, Dasher::screenint iCY, Da
4949

5050
if (iLineWidth > 0)
5151
{
52-
const Dasher::CColourIO::ColourInfo::PaletteColor OutlineColor = this->pColorScheme->Colors[iLineColour];
52+
const Dasher::CColourIO::ColourInfo::PaletteColor OutlineColor = this->pColorScheme->Colors[iLineColour > 0 ? iLineColour : 3];
5353
const ImVec4 ImOutlineColor = { static_cast<float>(OutlineColor.Red) / 255.0f, static_cast<float>(OutlineColor.Green) / 255.0f, static_cast<float>(OutlineColor.Blue) / 255.0f, 1.0f };
5454

5555
ImGui::GetWindowDrawList()->AddCircle(CanvasPos + ImVec2(static_cast<float>(iCX), static_cast<float>(iCY)), static_cast<float>(iR), ImGui::ColorConvertFloat4ToU32(ImFillColor),0, static_cast<float>(iLineWidth));

0 commit comments

Comments
 (0)