Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-15 07:34:06 +0300
committerCampbell Barton <campbell@blender.org>2022-06-15 07:34:06 +0300
commit08f5219d1c6c5efe76b7b8fb9579eb52f600ad78 (patch)
tree2d60746ba83cd0458194e109053df2827d343901
parent46f93ac6be00ad757822da4891a7ca82a402ee5f (diff)
Cleanup: use `int32_t[2]` for Wayland display size variables
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp12
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.h6
2 files changed, 10 insertions, 8 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index caf65f477a1..de9c865f163 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1833,8 +1833,8 @@ static void output_geometry(void *data,
output->transform = transform;
output->make = std::string(make);
output->model = std::string(model);
- output->width_mm = physical_width;
- output->height_mm = physical_height;
+ output->size_mm[0] = physical_width;
+ output->size_mm[1] = physical_height;
}
static void output_mode(void *data,
@@ -1845,8 +1845,8 @@ static void output_mode(void *data,
int32_t /*refresh*/)
{
output_t *output = static_cast<output_t *>(data);
- output->width_pxl = width;
- output->height_pxl = height;
+ output->size_native[0] = width;
+ output->size_native[1] = height;
}
/**
@@ -2182,8 +2182,8 @@ void GHOST_SystemWayland::getMainDisplayDimensions(uint32_t &width, uint32_t &he
{
if (getNumDisplays() > 0) {
/* We assume first output as main. */
- width = uint32_t(d->outputs[0]->width_pxl) / d->outputs[0]->scale;
- height = uint32_t(d->outputs[0]->height_pxl) / d->outputs[0]->scale;
+ width = uint32_t(d->outputs[0]->size_native[0]) / d->outputs[0]->scale;
+ height = uint32_t(d->outputs[0]->size_native[1]) / d->outputs[0]->scale;
}
}
diff --git a/intern/ghost/intern/GHOST_SystemWayland.h b/intern/ghost/intern/GHOST_SystemWayland.h
index 5b3e4f8ed75..dad7f38eb31 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.h
+++ b/intern/ghost/intern/GHOST_SystemWayland.h
@@ -23,8 +23,10 @@ struct display_t;
struct output_t {
struct wl_output *output;
- int32_t width_pxl, height_pxl; /* Dimensions in pixel. */
- int32_t width_mm, height_mm; /* Dimensions in millimeter. */
+ /** Dimensions in pixels. */
+ int32_t size_native[2];
+ /** Dimensions in millimeter. */
+ int32_t size_mm[2];
int transform;
int scale;
std::string make;