~l3kn/quad

3650dec72f86d02b583e787af9aae256e58beb99 — Leon Rische 6 months ago 3db0a0e
Only print dm if query successful
1 files changed, 12 insertions(+), 8 deletions(-)

M quad.c
M quad.c => quad.c +12 -8
@@ 224,14 224,17 @@ int main(void) {
  }

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

  SDL_GetCurrentDisplayMode(0, &dm);
  printf("Current: %d,%d\n", dm.w, dm.h);
  if (!SDL_GetCurrentDisplayMode(0, &dm)) {
    printf("Current: %d,%d\n", dm.w, dm.h);
  }

  SDL_GetDisplayMode(0, 0, &dm);
  printf("General: %d,%d\n", dm.w, dm.h);
  if (!SDL_GetDisplayMode(0, 0, &dm)) {
    printf("General: %d,%d\n", dm.w, dm.h);
  }

  if (SDL_CreateWindowAndRenderer(WIDTH, HEIGHT, 0,
                                  &window, &windowRenderer) != 0) {


@@ 241,8 244,9 @@ int main(void) {

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

  reset();
  draw(true);