Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing destructor to base class IDRMImplementation #61

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/aquamarine/allocator/Swapchain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Aquamarine {
class IBackendImplementation;

struct SSwapchainOptions {
size_t length = 0;
Hyprutils::Math::Vector2D size;
size_t length = 0;
Hyprutils::Math::Vector2D size = Hyprutils::Math::Vector2D(0, 0);
uint32_t format = DRM_FORMAT_INVALID; // if you leave this on invalid, the swapchain will choose an appropriate format (and modifier) for you.
bool scanout = false, cursor = false /* requires scanout = true */, multigpu = false /* if true, will force linear */;
};
Expand Down
5 changes: 3 additions & 2 deletions include/aquamarine/backend/DRM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ namespace Aquamarine {
};

struct SDRMConnectorCommitData {
Hyprutils::Memory::CSharedPointer<CDRMFB> mainFB, cursorFB;
Hyprutils::Memory::CSharedPointer<CDRMFB> mainFB = nullptr, cursorFB = nullptr;
bool modeset = false;
bool blocking = false;
uint32_t flags = 0;
bool test = false;
drmModeModeInfo modeInfo;
drmModeModeInfo modeInfo{0};

struct {
uint32_t gammaLut = 0;
Expand Down Expand Up @@ -323,6 +323,7 @@ namespace Aquamarine {

class IDRMImplementation {
public:
virtual ~IDRMImplementation() = default;
virtual bool commit(Hyprutils::Memory::CSharedPointer<SDRMConnector> connector, SDRMConnectorCommitData& data) = 0;
virtual bool reset() = 0;

Expand Down
4 changes: 2 additions & 2 deletions include/aquamarine/buffer/Buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace Aquamarine {
class CWLBufferResource;

struct SDMABUFAttrs {
bool success = false;
Hyprutils::Math::Vector2D size;
bool success = false;
Hyprutils::Math::Vector2D size = Hyprutils::Math::Vector2D(0, 0);
uint32_t format = 0; // fourcc
uint64_t modifier = 0;

Expand Down
2 changes: 1 addition & 1 deletion include/aquamarine/output/Output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Aquamarine {
Hyprutils::Math::Vector2D pixelSize;
unsigned int refreshRate = 0 /* in mHz */;
bool preferred = false;
std::optional<drmModeModeInfo> modeInfo; // if this is a drm mode, this will be populated.
std::optional<drmModeModeInfo> modeInfo = std::nullopt; // if this is a drm mode, this will be populated.
};

enum eOutputPresentationMode : uint32_t {
Expand Down
2 changes: 1 addition & 1 deletion src/backend/Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void Aquamarine::CBackend::updateIdleTimer() {
clock_gettime(CLOCK_MONOTONIC, &now);
timespecAddNs(&now, ADD_NS);

itimerspec ts = {.it_value = now};
itimerspec ts = {.it_interval{0, 0}, .it_value = now};

if (timerfd_settime(idle.fd, TFD_TIMER_ABSTIME, &ts, nullptr))
log(AQ_LOG_ERROR, std::format("backend: failed to arm timerfd: {}", strerror(errno)));
Expand Down
2 changes: 1 addition & 1 deletion src/backend/Headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void Aquamarine::CHeadlessBackend::updateTimerFD() {
clock_gettime(CLOCK_MONOTONIC, &now);
timespecAddNs(&now, lowestNs);

itimerspec ts = {.it_value = now};
itimerspec ts = {.it_interval{0, 0}, .it_value = now};

if (timerfd_settime(timers.timerfd, TFD_TIMER_ABSTIME, &ts, nullptr))
backend->log(AQ_LOG_ERROR, std::format("headless: failed to arm timerfd: {}", strerror(errno)));
Expand Down
5 changes: 3 additions & 2 deletions src/backend/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,9 @@ void Aquamarine::CSession::handleLibinputEvent(libinput_event* e) {
auto tool = hlDevice->toolFrom(libinput_event_tablet_tool_get_tool(tte));

ITablet::SAxisEvent event = {
.tool = tool,
.timeMs = (uint32_t)(libinput_event_tablet_tool_get_time_usec(tte) / 1000),
.tool = tool,
.timeMs = (uint32_t)(libinput_event_tablet_tool_get_time_usec(tte) / 1000),
.absolute = Hyprutils::Math::Vector2D(0, 0),
};

if (libinput_event_tablet_tool_x_has_changed(tte)) {
Expand Down
Loading