From e0b86a23c167f9f43289839f60393f49f594a868 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 28 May 2024 17:46:27 -0400 Subject: more up-to-dating --- chip8.c | 3 +-- ui_sdl.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/chip8.c b/chip8.c index 9c3d7eb..a6dfbd5 100644 --- a/chip8.c +++ b/chip8.c @@ -1,10 +1,9 @@ +#define _XOPEN_SOURCE 500 #include #include #include #include #include -#include -#include #ifdef _WIN32 #include diff --git a/ui_sdl.c b/ui_sdl.c index 7ac32ca..f046cd1 100644 --- a/ui_sdl.c +++ b/ui_sdl.c @@ -17,8 +17,8 @@ SDL_Renderer *r; void setup(void) { - SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); - SDL_Window* win = SDL_CreateWindow("chip8", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, W, H, SDL_WINDOW_SHOWN); + SDL_Init(SDL_INIT_VIDEO); + SDL_Window* win = SDL_CreateWindow("chip8", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, W, H, SDL_WINDOW_SHOWN|SDL_WINDOW_RESIZABLE); r = SDL_CreateRenderer(win, -1, SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_ACCELERATED); SDL_RenderClear(r); } @@ -44,7 +44,7 @@ void draw(void) { int main(int argc, char* argv[]) { if (argc != 2) { - printf("./%s \n", argv[0]); + printf("%s \n", argv[0]); return 1; } -- cgit v1.2.3-101-g0448