From 3baba7ffe84b184aa0dd555628a8a4eef92a9526 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 14 May 2021 14:01:42 +0200 Subject: Review some VS warnings and messages --- src/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index 00cdfffb..c5924595 100644 --- a/src/core.c +++ b/src/core.c @@ -2318,7 +2318,7 @@ void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture) // Returns a ray trace from mouse position Ray GetMouseRay(Vector2 mouse, Camera camera) { - Ray ray; + Ray ray = { 0 }; // Calculate normalized device coordinates // NOTE: y value is negative @@ -4551,14 +4551,14 @@ static void Wait(float ms) while ((nextTime - prevTime) < ms/1000.0f) nextTime = GetTime(); #else #if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) - #define DEFAULT_PARTIALBUSY_WAIT_TIME 4 - #define PARTIALBUSY_WAIT_FACTOR 0.95f - float halfWait = DEFAULT_PARTIALBUSY_WAIT_TIME; - if (CORE.Time.target > 0) - halfWait = CORE.Time.target * PARTIALBUSY_WAIT_FACTOR; + #define DEFAULT_PARTIALBUSY_WAIT_TIME 4 + #define PARTIALBUSY_WAIT_FACTOR 0.95 + + double halfWait = DEFAULT_PARTIALBUSY_WAIT_TIME; + if (CORE.Time.target > 0) halfWait = CORE.Time.target*PARTIALBUSY_WAIT_FACTOR; double destTime = GetTime() + ms/1000; - if (ms > halfWait) ms -= halfWait; + if (ms > halfWait) ms -= (float)halfWait; #endif #if defined(_WIN32) -- cgit v1.2.3