[0.4.11][CYLFRAC] Fix 3 MSVC2010SP1 x86 dbg warnings C4305 CORE-18104

can be observed with MSVC 2010SP1 (16.0.40219.1) x86 target in dbg configuration:
C:\047rls\reactos\modules\rosapps\applications\screensavers\cylfrac\cylfrac.c(109) : warning C4305: 'function' : truncation from 'double' to 'float'
C:\047rls\reactos\modules\rosapps\applications\screensavers\cylfrac\cylfrac.c(110) : warning C4305: 'function' : truncation from 'double' to 'float'
C:\047rls\reactos\modules\rosapps\applications\screensavers\cylfrac\cylfrac.c(137) : warning C4305: 'initializing' : truncation from 'double' to 'GLfloat'

partial pick of 0.4.15-dev-2951-g 5d8e834897
This commit is contained in:
Joachim Henze 2022-03-31 06:14:08 +02:00
parent 105fcc38b4
commit 04e8d95820

View file

@ -106,8 +106,8 @@ void DrawScene(HWND hwnd, HDC dc, int ticks)
angle += ticks * 0.01;
colorh += ticks * 0.003;
if (colorh > 360.0) colorh -= 360.0;
HLStoRGB(colorh, 1.0, 0.7, &rval, &gval, &bval);
DrawCylinder(lvls, angle, 0.2);
HLStoRGB(colorh, 1.0f, 0.7f, &rval, &gval, &bval);
DrawCylinder(lvls, angle, 0.2f);
SwapBuffers(dc);
EndPaint(hwnd, &ps);
}
@ -134,7 +134,7 @@ void MyPixelFormat(HDC dc)
void InitGL(HWND hwnd)
{
GLfloat lightpos[4] = {2.0, 2.0, -2.0, 0.7};
GLfloat lightpos[4] = {2.0f, 2.0f, -2.0f, 0.7f};
GLfloat ca = 1.0;
dc = GetDC(hwnd);
MyPixelFormat(dc);