add missing type arg

This commit is contained in:
Vaxry 2024-04-05 16:53:46 +01:00
parent df2eed871e
commit 35411a6184
3 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,7 @@ namespace Hyprcursor {
float hotspotY = 0; float hotspotY = 0;
std::string overridenBy = ""; std::string overridenBy = "";
eHyprcursorResizeAlgo resizeAlgo = HC_RESIZE_NONE; eHyprcursorResizeAlgo resizeAlgo = HC_RESIZE_NONE;
eHyprcursorDataType type = HC_DATA_PNG;
}; };
/*! /*!
@ -126,7 +127,7 @@ namespace Hyprcursor {
return d; return d;
} }
SCursorRawShapeData data{.hotspotX = CDATA->hotspotX, .hotspotY = CDATA->hotspotY, .overridenBy = "", .resizeAlgo = CDATA->resizeAlgo}; SCursorRawShapeData data{.hotspotX = CDATA->hotspotX, .hotspotY = CDATA->hotspotY, .overridenBy = "", .resizeAlgo = CDATA->resizeAlgo, .type = CDATA->type};
for (size_t i = 0; i < CDATA->len; ++i) { for (size_t i = 0; i < CDATA->len; ++i) {
SCursorRawShapeImageC* cimage = &CDATA->images[i]; SCursorRawShapeImageC* cimage = &CDATA->images[i];

View File

@ -53,6 +53,7 @@ struct SCursorRawShapeDataC {
float hotspotY; float hotspotY;
char* overridenBy; char* overridenBy;
enum eHyprcursorResizeAlgo resizeAlgo; enum eHyprcursorResizeAlgo resizeAlgo;
enum eHyprcursorDataType type;
}; };
typedef struct SCursorRawShapeDataC hyprcursor_cursor_raw_shape_data; typedef struct SCursorRawShapeDataC hyprcursor_cursor_raw_shape_data;

View File

@ -379,6 +379,7 @@ SCursorRawShapeDataC* CHyprcursorManager::getRawShapeDataC(const char* shape_) {
data->hotspotX = shape->hotspotX; data->hotspotX = shape->hotspotX;
data->hotspotY = shape->hotspotY; data->hotspotY = shape->hotspotY;
data->type = shape->shapeType == SHAPE_PNG ? HC_DATA_PNG : HC_DATA_SVG;
break; break;
} }