summaryrefslogtreecommitdiffhomepage
path: root/examples/web/core/core_input_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web/core/core_input_keys.c')
-rw-r--r--examples/web/core/core_input_keys.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/web/core/core_input_keys.c b/examples/web/core/core_input_keys.c
index 334676e..259009c 100644
--- a/examples/web/core/core_input_keys.c
+++ b/examples/web/core/core_input_keys.c
@@ -18,11 +18,10 @@
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
-int screenWidth = 800;
-int screenHeight = 450;
-
-Vector2 ballPosition;
+const int screenWidth = 800;
+const int screenHeight = 450;
+Vector2 ballPosition = { 0 };
//----------------------------------------------------------------------------------
// Module Functions Declaration
@@ -30,7 +29,7 @@ Vector2 ballPosition;
void UpdateDrawFrame(void); // Update and Draw one frame
//----------------------------------------------------------------------------------
-// Main Enry Point
+// Program Main Entry Point
//----------------------------------------------------------------------------------
int main(void)
{
@@ -39,13 +38,13 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [core] example - keyboard input");
ballPosition = (Vector2){ (float)screenWidth/2, (float)screenHeight/2 };
-
+
#if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
#else
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
-
+
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{