~l3kn/quad

7b8ceb7efc21baf2d2b552c1db27341c80debd0a — Leon Rische 6 months ago 5850cbe
Print different sizes / display modes
1 files changed, 9 insertions(+), 3 deletions(-)

M quad.c
M quad.c => quad.c +9 -3
@@ 224,10 224,11 @@ int main(void) {
  }

  SDL_DisplayMode dm;
  SDL_GetDesktopDisplayMode(0, &dm);
  printf("Desktop: %d,%d\n", dm.w, dm.h);

  SDL_GetCurrentDisplayMode(0, &dm);
  size_t width = dm.w;
  size_t height = dm.h;
  printf("%d,%d\n", dm.w, dm.h);
  printf("Current: %d,%d\n", dm.w, dm.h);

  if (SDL_CreateWindowAndRenderer(WIDTH, HEIGHT,
                                  SDL_WINDOW_ALLOW_HIGHDPI,


@@ 236,6 237,11 @@ int main(void) {
    return 1;
  }

  int w;
  int h;
  SDL_GetRendererOutputSize(&windowRenderer, &w, &h);
  printf("Renderer: %d,%d\n", dm.w, dm.h);

  reset();
  draw(true);