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;
std::string overridenBy = "";
eHyprcursorResizeAlgo resizeAlgo = HC_RESIZE_NONE;
eHyprcursorDataType type = HC_DATA_PNG;
};
/*!
@ -126,7 +127,7 @@ namespace Hyprcursor {
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) {
SCursorRawShapeImageC* cimage = &CDATA->images[i];

View file

@ -53,6 +53,7 @@ struct SCursorRawShapeDataC {
float hotspotY;
char* overridenBy;
enum eHyprcursorResizeAlgo resizeAlgo;
enum eHyprcursorDataType type;
};
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->hotspotY = shape->hotspotY;
data->type = shape->shapeType == SHAPE_PNG ? HC_DATA_PNG : HC_DATA_SVG;
break;
}