Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code not running at exit #41

Open
victorliu opened this issue Feb 22, 2025 · 0 comments
Open

Code not running at exit #41

victorliu opened this issue Feb 22, 2025 · 0 comments

Comments

@victorliu
Copy link

victorliu commented Feb 22, 2025

On Mac OS 12.5.1 (on Apple silicon), modifying the minimal white noise example to the following:

// main.c
#include "fenster.h"
#define W 320
#define H 240
int main() {
  uint32_t buf[W * H];
  struct fenster f = { .title = "hello", .width = W, .height = H, .buf = buf };
  fenster_open(&f);
  while (fenster_loop(&f) == 0) {
    for (int i = 0; i < W; i++) {
      for (int j = 0; j < H; j++) {
        fenster_pixel(&f, i, j) = rand();
      }
    }
  }
  printf("here\n");
  fenster_close(&f);
  return 0;
}

Does not print "here" when the window is closed. This is the output of cc -v:

Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin21.6.0
Thread model: posix

Compiled with the recommended command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant