mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-22 21:44:19 +02:00
Apply clang-format
This commit is contained in:
parent
559009f780
commit
9a60bef105
3 changed files with 10 additions and 10 deletions
|
|
@ -195,8 +195,8 @@ message_set_output(struct cg_output *output, const char *string,
|
|||
wl_list_insert(&output->messages, &message->link);
|
||||
|
||||
double scale = output->wlr_output->scale;
|
||||
int width = buf->base.width/scale;
|
||||
int height = buf->base.height/scale;
|
||||
int width = buf->base.width / scale;
|
||||
int height = buf->base.height / scale;
|
||||
message->position->width = width;
|
||||
message->position->height = height;
|
||||
switch(align) {
|
||||
|
|
@ -234,7 +234,7 @@ message_set_output(struct cg_output *output, const char *string,
|
|||
wlr_scene_node_set_enabled(&message->message->node, true);
|
||||
struct wlr_box *outp_box = wlr_output_layout_get_box(
|
||||
output->server->output_layout, output->wlr_output);
|
||||
wlr_scene_buffer_set_dest_size(message->message,width,height);
|
||||
wlr_scene_buffer_set_dest_size(message->message, width, height);
|
||||
wlr_scene_node_set_position(&message->message->node,
|
||||
message->position->x + outp_box->x,
|
||||
message->position->y + outp_box->y);
|
||||
|
|
|
|||
6
output.c
6
output.c
|
|
@ -209,7 +209,7 @@ output_set_mode(struct wlr_output *output, int width, int height,
|
|||
wlr_log(WLR_DEBUG, "Assigning configured mode to %s", output->name);
|
||||
}
|
||||
wlr_output_set_mode(output, best);
|
||||
if (scale != NULL) {
|
||||
if(scale != NULL) {
|
||||
wlr_log(WLR_INFO, "Setting output scale to %f", *scale);
|
||||
wlr_output_set_scale(output, *scale);
|
||||
}
|
||||
|
|
@ -297,8 +297,8 @@ output_configure(struct cg_server *server, struct cg_output *output) {
|
|||
}
|
||||
if(config->pos.x != -1) {
|
||||
if(output_set_mode(wlr_output, config->pos.width,
|
||||
config->pos.height,
|
||||
config->refresh_rate, config->scale) != 0) {
|
||||
config->pos.height, config->refresh_rate,
|
||||
config->scale) != 0) {
|
||||
wlr_log(WLR_ERROR,
|
||||
"Setting output mode failed, disabling output.");
|
||||
output_clear(output);
|
||||
|
|
|
|||
8
parse.c
8
parse.c
|
|
@ -623,12 +623,12 @@ parse_output_config(char **saveptr, char **errstr) {
|
|||
char *scale_str = strtok_r(NULL, " ", saveptr);
|
||||
if(scale_str != NULL && strcmp(scale_str, "scale") == 0) {
|
||||
cfg->scale = malloc(sizeof(float));
|
||||
*cfg->scale = parse_float(saveptr, " ");
|
||||
*cfg->scale = parse_float(saveptr, " ");
|
||||
if(*cfg->scale <= 0.0) {
|
||||
*errstr =
|
||||
log_error("Error parsing scale of output configuration for "
|
||||
"output %s, expected positive float",
|
||||
name);
|
||||
log_error("Error parsing scale of output configuration for "
|
||||
"output %s, expected positive float",
|
||||
name);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue