From 49f182b9efc06cbc36f70a7f816bca44553584b9 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 2 Feb 2019 16:38:58 +0100 Subject: [PATCH] Fix progressbar flickering --- Stub/DiabloUI/progress.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Stub/DiabloUI/progress.cpp b/Stub/DiabloUI/progress.cpp index b4b857ab5..86c67f89b 100644 --- a/Stub/DiabloUI/progress.cpp +++ b/Stub/DiabloUI/progress.cpp @@ -22,7 +22,7 @@ void progress_Loade(char *msg) dwSmlButHeight = dwData[1]; if (font != NULL) { - SDL_Color color = palette->colors[224]; + SDL_Color color = { 243, 243, 243 }; msgSurface = TTF_RenderUTF8_Solid(font, msg, color); cancleSurface = TTF_RenderUTF8_Solid(font, "Cancel", color); @@ -76,9 +76,6 @@ void progress_Render(int progress) int __stdcall UiProgressDialog(HWND window, char *msg, int enable, int(__cdecl *fnfunc)(), int rate) { - int delay = rate ? 1000 / rate : 50; - - SetFadeLevel(256); progress_Loade(msg); bool endMenu = false; @@ -89,7 +86,6 @@ int __stdcall UiProgressDialog(HWND window, char *msg, int enable, int(__cdecl * CapFPS(); progress = fnfunc(); - printf("progress %d\n", progress); progress_Render(progress); DrawMouse();