From b726bd936ce416044d447ce81409dcc0a9d9aaae Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 7 Oct 2022 20:34:48 +0200 Subject: Implement first GUI demonstration with SDL --- sdl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sdl.c') diff --git a/sdl.c b/sdl.c index c17e0f8..fcc9581 100644 --- a/sdl.c +++ b/sdl.c @@ -1,11 +1,26 @@ +#include + #include "net.h" #include "data.h" void gui_run(void) { + int cont = 1; + SDL_Event event; + + SDL_Init(SDL_INIT_EVERYTHING); + SDL_WM_SetCaption("LimoX", NULL); + SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE); + while (cont) { + SDL_WaitEvent(&event); + if (event.type == SDL_QUIT) + cont = 0; + } + SDL_Quit(); + } void gui_connected(char* jid, char* password) { -- cgit v1.2.3-70-g09d2