summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-05-14 14:01:42 +0200
committerRay <[email protected]>2021-05-14 14:01:42 +0200
commit3baba7ffe84b184aa0dd555628a8a4eef92a9526 (patch)
tree2c8f8a99efcfd52a1266a537e5a744bf17dc43dc /src/core.c
parentfff06d24da52c82f0f792088d97e7b0589eaeba2 (diff)
downloadraylib-3baba7ffe84b184aa0dd555628a8a4eef92a9526.tar.gz
raylib-3baba7ffe84b184aa0dd555628a8a4eef92a9526.zip
Review some VS warnings and messages
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c14
1 files changed, 7 insertions, 7 deletions
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)