diff options
-rw-r--r-- | demo.c | 3 | ||||
-rw-r--r-- | lzr.c | 4 | ||||
-rw-r--r-- | lzr.h | 1 |
3 files changed, 6 insertions, 2 deletions
@@ -1,10 +1,9 @@ #include "lzr.h" -#include <dx/log.h> #include <stdbool.h> int main(void) { - LZR_Config cfg = {400, 224, 60, 16, "LZR demo", 0.0, false}; + LZR_Config cfg = {400, 224, 60, 16, "LZR demo", 0.0, false, true}; if (LZR_Init(cfg)) return 1; float darkness = 0.0f; @@ -233,6 +233,10 @@ int LZR_Init(LZR_Config cfg) min_dt = 1000 / config.target_fps; next_time = SDL_GetTicks64(); } + if (config.hide_cursor && SDL_ShowCursor(SDL_DISABLE) < 0) { + SDL_Log("%s", SDL_GetError()); + return -1; + } return 0; } @@ -35,6 +35,7 @@ typedef struct LZR_Config { const char *title; double ratio; bool disable_bind_menu; + bool hide_cursor; } LZR_Config; typedef enum LZR_EventType { |