diff options
| author | 2024-05-28 17:46:27 -0400 | |
|---|---|---|
| committer | 2024-05-28 17:46:27 -0400 | |
| commit | e0b86a23c167f9f43289839f60393f49f594a868 (patch) | |
| tree | 995bbf6430ab026fa8229067cae38d2acc2ead9a | |
| parent | 229829f0c8352120bc108ca0190b5d8d982d47f3 (diff) | |
| download | chip8-e0b86a23c167f9f43289839f60393f49f594a868.tar.gz chip8-e0b86a23c167f9f43289839f60393f49f594a868.tar.bz2 chip8-e0b86a23c167f9f43289839f60393f49f594a868.zip | |
more up-to-dating
| -rw-r--r-- | chip8.c | 3 | ||||
| -rw-r--r-- | ui_sdl.c | 6 |
2 files changed, 4 insertions, 5 deletions
@@ -1,10 +1,9 @@ +#define _XOPEN_SOURCE 500 #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> -#include <math.h> -#include <time.h> #ifdef _WIN32 #include <winsock.h> @@ -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 <rom file>\n", argv[0]); + printf("%s <rom file>\n", argv[0]); return 1; } |