From 711fda469e4dc33903f1e0911ec665a06122e53b Mon Sep 17 00:00:00 2001 From: Arisotura Date: Wed, 12 Jun 2019 01:39:12 +0200 Subject: [PATCH] stop fast-forward hotkeys from getting lost every damn time --- src/Config.cpp | 6 +++--- src/libui_sdl/OSD.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index 42f18c79..58aef58b 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -77,12 +77,12 @@ void Load() if (!f) return; char linebuf[1024]; - char entryname[16]; + char entryname[32]; char entryval[1024]; while (!feof(f)) { fgets(linebuf, 1024, f); - int ret = sscanf(linebuf, "%15[A-Za-z_0-9]=%[^\t\n]", entryname, entryval); + int ret = sscanf(linebuf, "%32[A-Za-z_0-9]=%[^\t\n]", entryname, entryval); if (ret < 2) continue; ConfigEntry* entry = &ConfigFile[0]; @@ -97,7 +97,7 @@ void Load() c++; } - if (!strncmp(entry->Name, entryname, 15)) + if (!strncmp(entry->Name, entryname, 32)) { if (entry->Type == 0) *(int*)entry->Value = strtol(entryval, NULL, 10); diff --git a/src/libui_sdl/OSD.cpp b/src/libui_sdl/OSD.cpp index c8d5f83e..8b87e9d3 100644 --- a/src/libui_sdl/OSD.cpp +++ b/src/libui_sdl/OSD.cpp @@ -202,7 +202,7 @@ void RenderText(u32 color, const char* text, Item* item) int breaks[64]; bool rainbow = (color == 0); - u32 rainbowinc = (text[0] * 17) % 600; + u32 rainbowinc = ((text[0] * 17) + (SDL_GetTicks() * 13)) % 600; color |= 0xFF000000; const u32 shadow = 0xE0000000;