From d4604e24692e86fcce1229e70ac8c0e248136296 Mon Sep 17 00:00:00 2001 From: fanta Date: Wed, 25 Feb 2026 10:15:28 +0100 Subject: [PATCH] =?UTF-8?q?peque=C3=B1os=20cambios=20en=20presentator=20y?= =?UTF-8?q?=20notas=20en=20el=20Readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 ++++++++++++++++++++++++++++++ presentator.c | 4 +++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 26df2a9..1c3f77b 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,33 @@ Programa escrito en C para mostrar una serie de diapositivas de forma molona y sencilla. fanta 2026 + +Dependencias: + +
+apt-get install libxmp-dev libsdl2-dev libsdl2-image-dev
+
+ +Compilar: + +
+make
+
+ +Ejecutar: + +
+./presentator
+
+ +Teclas: + +**1-9** para reproducir los modulos que se encuentran en el directorio mods. +**Down/UP** para controlar el sonido. +**Left/Right** para pasar las slides. +**q** para salir (q de quit). + +Y eso es todo amigo/a/e. Si quieres añadir más diapositivas mira en el directorio slides y pon tus propias diapositivas. +Indica el orden en el archivo index. + +Un saludo cordial. diff --git a/presentator.c b/presentator.c index 4323089..c525a91 100644 --- a/presentator.c +++ b/presentator.c @@ -24,6 +24,7 @@ SDL_Window * window; SDL_Renderer * render; SDL_Texture *textureVolume = NULL; SDL_Texture *textureSlide = NULL; +SDL_Texture *textureProgressRect = NULL; SDL_Event evento; xmp_context ctx; @@ -46,7 +47,7 @@ int refreshVolumeArea(int iv){ static void playBuffer(void *udata, Uint8 *stream, int len) { - if (xmp_play_buffer((xmp_context)udata, stream, len, 0) < 0){ modPlaying = 0; } + if (xmp_play_buffer((xmp_context)udata, stream, len, 0) < 0){ modPlaying = 0; } } static int initAudio(xmp_context ctx) { @@ -99,6 +100,7 @@ int loadSlide(int nslide){ nline = nline +1; } fclose(fp); + nline = nline - 1; if (line){ free(line); }; return 0; }