diff options
| author | epoch <epoch@hacking.allowed.org> | 2020-02-13 18:29:03 -0600 | 
|---|---|---|
| committer | epoch <epoch@hacking.allowed.org> | 2020-02-13 18:29:03 -0600 | 
| commit | b1a1a6e77bca4de0ae5003931739dac8734e7dbc (patch) | |
| tree | c81cad1d4eaf6069cb2077f476097a2b7d105b54 | |
| parent | cd860515cd91c07b6cd88fab8a9c23acd5dbb46d (diff) | |
| download | hackvr-b1a1a6e77bca4de0ae5003931739dac8734e7dbc.tar.gz hackvr-b1a1a6e77bca4de0ae5003931739dac8734e7dbc.zip | |
fixed whitespace in graphics_event_handler mess
| -rw-r--r-- | src/graphics_cs_x11.c | 26 | 
1 files changed, 13 insertions, 13 deletions
| diff --git a/src/graphics_cs_x11.c b/src/graphics_cs_x11.c index 28c9eb5..84fe387 100644 --- a/src/graphics_cs_x11.c +++ b/src/graphics_cs_x11.c @@ -519,22 +519,22 @@ int graphics_event_handler(int world_changed) { //should calling draw_screen be         redraw=1;         XGetGeometry(x11_global.dpy,x11_global.w,&root,&global.x,&global.y,&gra_global.width,&gra_global.height,&gra_global.border_width,&gra_global.depth);         if(gra_global.height * AR_W / AR_H != gra_global.width / (gra_global.split_screen / (gra_global.red_and_blue ? gra_global.split_screen : 1))) { -       // height / AR_H * AR_W = width / (ss / (rab ? ss : 1)) -       if(global.debug >= 2) { -        fprintf(stderr,"# %d != %d for some reason. probably your WM not respecting aspect ratio hints or calculating based on them differently. (would cause an off-by-one or so)\n",gra_global.height * AR_W / AR_H , gra_global.width / (gra_global.split_screen / (gra_global.red_and_blue ? gra_global.split_screen : 1))); +         // height / AR_H * AR_W = width / (ss / (rab ? ss : 1)) +         if(global.debug >= 2) { +           fprintf(stderr,"# %d != %d for some reason. probably your WM not respecting aspect ratio hints or calculating based on them differently. (would cause an off-by-one or so)\n",gra_global.height * AR_W / AR_H , gra_global.width / (gra_global.split_screen / (gra_global.red_and_blue ? gra_global.split_screen : 1))); +         } +         if(gra_global.width / (gra_global.red_and_blue ? 1 : gra_global.split_screen) * AR_H / AR_W < gra_global.height) { +           gra_global.height=gra_global.width / (gra_global.red_and_blue ? 1 : gra_global.split_screen) * AR_H / AR_W; +         } else { +           gra_global.width=gra_global.height * AR_W / AR_H * (gra_global.red_and_blue ? 1 : gra_global.split_screen); +         }         } -       if(gra_global.width / (gra_global.red_and_blue ? 1 : gra_global.split_screen) * AR_H / AR_W < gra_global.height) { -        gra_global.height=gra_global.width / (gra_global.red_and_blue ? 1 : gra_global.split_screen) * AR_H / AR_W; -       } else { -        gra_global.width=gra_global.height * AR_W / AR_H * (gra_global.red_and_blue ? 1 : gra_global.split_screen); -       } -      } -      gra_global.mapxoff=gra_global.width/(gra_global.split_screen / (gra_global.red_and_blue ? gra_global.split_screen : 1))/2; -      gra_global.mapyoff=gra_global.height/2; -      break; +       gra_global.mapxoff=gra_global.width/(gra_global.split_screen / (gra_global.red_and_blue ? gra_global.split_screen : 1))/2; +       gra_global.mapyoff=gra_global.height/2; +       break;      default: -//      fprintf(stderr,"# received unknown event with type: %d\n",e.type); +//       fprintf(stderr,"# received unknown event with type: %d\n",e.type);        break;    }   } | 
