ampler/ampler.c

24 lines
384 B
C

// ampler.c
#include <stdio.h>
#include <stdlib.h>
#include <SDL2/SDL.h>
int ampler_main(SDL_Window *w, SDL_Renderer *r, void **u_data) {
SDL_Event e;
while (1) {
while(SDL_PollEvent(&e))
if (e.type == SDL_QUIT)
return 1;
SDL_RenderPresent(r);
SDL_Delay(1);
if (!remove("reload-trigger")) {
puts("removed reload-trigger, reloading...");
return 0;
}
}
}