Browse Source

Update rcore.c

pull/5169/merge
Ray 4 days ago
parent
commit
ec3cb7045f
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/rcore.c

+ 6
- 3
src/rcore.c View File

@ -679,12 +679,15 @@ void InitWindow(int width, int height, const char *title)
// Initialize window data // Initialize window data
CORE.Window.screen.width = width; CORE.Window.screen.width = width;
CORE.Window.screen.height = height; CORE.Window.screen.height = height;
CORE.Window.currentFbo.width = CORE.Window.screen.width;
CORE.Window.currentFbo.height = CORE.Window.screen.height;
CORE.Window.eventWaiting = false; CORE.Window.eventWaiting = false;
CORE.Window.screenScale = MatrixIdentity(); // No draw scaling required by default
CORE.Window.screenScale = MatrixIdentity(); // No draw scaling required by default
if ((title != NULL) && (title[0] != 0)) CORE.Window.title = title; if ((title != NULL) && (title[0] != 0)) CORE.Window.title = title;
// Initialize global input state // Initialize global input state
memset(&CORE.Input, 0, sizeof(CORE.Input)); // Reset CORE.Input structure to 0
memset(&CORE.Input, 0, sizeof(CORE.Input)); // Reset CORE.Input structure to 0
CORE.Input.Keyboard.exitKey = KEY_ESCAPE; CORE.Input.Keyboard.exitKey = KEY_ESCAPE;
CORE.Input.Mouse.scale = (Vector2){ 1.0f, 1.0f }; CORE.Input.Mouse.scale = (Vector2){ 1.0f, 1.0f };
CORE.Input.Mouse.cursor = MOUSE_CURSOR_ARROW; CORE.Input.Mouse.cursor = MOUSE_CURSOR_ARROW;
@ -696,7 +699,7 @@ void InitWindow(int width, int height, const char *title)
if (result != 0) if (result != 0)
{ {
TRACELOG(LOG_WARNING, "SYSTEM: Failed to initialize Platform");
TRACELOG(LOG_WARNING, "SYSTEM: Failed to initialize platform");
return; return;
} }
//-------------------------------------------------------------- //--------------------------------------------------------------

Loading…
Cancel
Save