mirror of
https://github.com/hyprwm/aquamarine.git
synced 2025-12-20 04:40:12 +01:00
fmt: run clang-format
This commit is contained in:
parent
e481481986
commit
5d2598b9b0
4 changed files with 11 additions and 14 deletions
|
|
@ -18,8 +18,7 @@ using namespace Hyprutils::Memory;
|
|||
#define WP CWeakPointer
|
||||
|
||||
Aquamarine::CDRMDumbBuffer::CDRMDumbBuffer(const SAllocatorBufferParams& params, Hyprutils::Memory::CWeakPointer<CDRMDumbAllocator> allocator_,
|
||||
Hyprutils::Memory::CSharedPointer<CSwapchain> swapchain) :
|
||||
allocator(allocator_) {
|
||||
Hyprutils::Memory::CSharedPointer<CSwapchain> swapchain) : allocator(allocator_) {
|
||||
attrs.format = params.format;
|
||||
|
||||
if (int ret = drmModeCreateDumbBuffer(allocator->drmFD(), params.size.x, params.size.y, 32, 0, &handle, &stride, &bufferLen); ret < 0) {
|
||||
|
|
|
|||
|
|
@ -62,8 +62,7 @@ static SDRMFormat guessFormatFrom(std::vector<SDRMFormat> formats, bool cursor,
|
|||
}
|
||||
|
||||
Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hyprutils::Memory::CWeakPointer<CGBMAllocator> allocator_,
|
||||
Hyprutils::Memory::CSharedPointer<CSwapchain> swapchain) :
|
||||
allocator(allocator_) {
|
||||
Hyprutils::Memory::CSharedPointer<CSwapchain> swapchain) : allocator(allocator_) {
|
||||
if (!allocator)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,16 +99,17 @@ void Aquamarine::CDRMAtomicRequest::addConnector(Hyprutils::Memory::CSharedPoint
|
|||
|
||||
TRACE(backend->log(AQ_LOG_TRACE, std::format("atomic addConnector values: CRTC {}, mode {}", enable ? connector->crtc->id : 0, data.atomic.modeBlob)));
|
||||
|
||||
conn = connector;
|
||||
conn = connector;
|
||||
drmModeModeInfo* currentMode = connector->getCurrentMode();
|
||||
bool modeDiffers = true;
|
||||
bool modeDiffers = true;
|
||||
if (currentMode) {
|
||||
modeDiffers = memcmp(currentMode, &data.modeInfo, sizeof(drmModeModeInfo)) != 0;
|
||||
free(currentMode);
|
||||
}
|
||||
|
||||
if (modeDiffers) addConnectorModeset(connector, data);
|
||||
|
||||
if (modeDiffers)
|
||||
addConnectorModeset(connector, data);
|
||||
|
||||
addConnectorCursor(connector, data);
|
||||
|
||||
add(connector->id, connector->props.crtc_id, enable ? connector->crtc->id : 0);
|
||||
|
|
|
|||
|
|
@ -70,15 +70,13 @@ int main(int argc, char** argv, char** envp) {
|
|||
});
|
||||
|
||||
newMouseListener = aqBackend->events.newPointer.listen([](const SP<Aquamarine::IPointer>& pointer) {
|
||||
mouseMotionListener = pointer->events.warp.listen([](const Aquamarine::IPointer::SWarpEvent& event) {
|
||||
std::cout << "[Client] Mouse warped to " << std::format("{}", event.absolute) << "\n";
|
||||
});
|
||||
mouseMotionListener = pointer->events.warp.listen(
|
||||
[](const Aquamarine::IPointer::SWarpEvent& event) { std::cout << "[Client] Mouse warped to " << std::format("{}", event.absolute) << "\n"; });
|
||||
});
|
||||
|
||||
newKeyboardListener = aqBackend->events.newKeyboard.listen([](const SP<Aquamarine::IKeyboard>& keyboard) {
|
||||
keyboardKeyListener = keyboard->events.key.listen([](const Aquamarine::IKeyboard::SKeyEvent& event) {
|
||||
std::cout << "[Client] Key " << std::format("{}", event.key) << " state: " << event.pressed << " \n";
|
||||
});
|
||||
keyboardKeyListener = keyboard->events.key.listen(
|
||||
[](const Aquamarine::IKeyboard::SKeyEvent& event) { std::cout << "[Client] Key " << std::format("{}", event.key) << " state: " << event.pressed << " \n"; });
|
||||
});
|
||||
|
||||
if (!aqBackend || !aqBackend->start()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue